Pessoal estou recebendo o seguinte erro:
<blockquote>avax.persistence.PersistenceException: [PersistenceUnit: NotasPU] Unable to configure EntityManagerFactory
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:265)
at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:125)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:110)
at br.com.dnasolution.dao.ConexaoNotas.(ConexaoNotas.java:33)
at br.com.dnasolution.dao.ConexaoNotas.getInstance(ConexaoNotas.java:44)
at notas.Main.main(Main.java:140)
Caused by: org.hibernate.AnnotationException: Unknown Id.generator: tb_documento_cd_documento_seq
at org.hibernate.cfg.BinderHelper.makeIdGenerator(BinderHelper.java:428)
at org.hibernate.cfg.AnnotationBinder.bindId(AnnotationBinder.java:1908)
at org.hibernate.cfg.AnnotationBinder.processElementAnnotations(AnnotationBinder.java:1281)
at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:754)
</blockquote>
pelo q eu entendi e algum erro com a sequence gerenator da minha classe porem ela esta assim:
@SequenceGenerator(sequenceName="tb_documento_cd_documento_seq", allocationSize=1, name = "tb_documento_cd_documento_seq")
…
@Id
@GeneratedValue(strategy=GenerationType.IDENTITY, generator="tb_documento_cd_documento_seq")
@Column(name = "cd_documento", nullable = false)
o problema e que a sequence existe no banco… e outra. ele passa umas 30 classes iguais, com a mesma declaracao(mudando apenas o nome da sequence) mas nessa ele da erro… alguem sabe o pq??
valeu
agora foi