AnnotationException « Entity « JPA Q&A





1. hibernate.AnnotationException references an unknown entity    forum.hibernate.org

Hi, I've a problem with hibernate 3.3.1 Using hibernate-3.3.1.ga.jar, hibernate-annotations-3.4.0.ga.jar, hibernate-commons-annotations-3.4.0.ga.jar, hibernate-entitymanager-3.4.0.ga.jar, On deployment on Jboss 4.0.5 the following error occurs, could anybody help? Full stack trace of error: Error creating bean with name 'org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor#0' defined in ServletContext resource [/WEB-INF/application-service.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/application-data.xml]: Invocation of ...

2. AnnotationException - "unknown entity" but why?    forum.hibernate.org

I have two jars: one contains my domain model, the other my repository running JPA w/Hibernate. I am running a simple test where a domain model is persisted, but it fails with the following error: Code: Caused by: org.hibernate.AnnotationException: @OneToOne or @ManyToOne on xxx.model.product.Product.productInventory references an unknown entity: xxx.model.product.ProductInventory at org.hibernate.cfg.ToOneFkSecondPass.doSecondPass(ToOneFkSecondPass.java:81) at org.hibernate.cfg.AnnotationConfiguration.processEndOfQueue(AnnotationConfiguration.java:456) ...