1
resposta

org.hibernate.AnnotationException , como pode ser resolvido?

org.hibernate.AnnotationException: No identifier specified for entity: br.com.brq.jpa.modelo.Conta
    at org.hibernate.cfg.InheritanceState.determineDefaultAccessType(InheritanceState.java:266)
    at org.hibernate.cfg.InheritanceState.getElementsToProcess(InheritanceState.java:211)
    at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:781)
    at org.hibernate.boot.model.source.internal.annotations.AnnotationMetadataSourceProcessorImpl.processEntityHierarchies(AnnotationMetadataSourceProcessorImpl.java:254)
    at org.hibernate.boot.model.process.spi.MetadataBuildingProcess$1.processEntityHierarchies(MetadataBuildingProcess.java:230)
    at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:273)
    at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:1224)
    at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1255)
    at org.hibernate.jpa.HibernatePersistenceProvider.createEntityManagerFactory(HibernatePersistenceProvider.java:56)
    at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:79)
    at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:54)
    at br.com.brq.jpa.testes.TenteCriaTabela.main(TenteCriaTabela.java:11)
1 resposta

Pelo erro está faltando a annotation @Id no atributo id da classe Conta