File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Object Relational Mapping and the fly likes org.hibernate.MappingException: Unknown entity Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "org.hibernate.MappingException: Unknown entity " Watch "org.hibernate.MappingException: Unknown entity " New topic
Author

org.hibernate.MappingException: Unknown entity

Jitesh Sinha
Ranch Hand

Joined: Jun 19, 2004
Posts: 144
I am struggling wit this error for hours now.I know it is a simple configuration but somehow it does not work for me.

Here is relevant portion of my applicationcontext.xml :-



I have used both "annotatedClasses" and "packagesToScan" but to no avail.Here is my entity class.





problem appears when I try to save anything in that entity.here is Exception stack trace :-




Please help.
Jitesh Sinha
Ranch Hand

Joined: Jun 19, 2004
Posts: 144
After I turn on INFO for org.hibernate packages ,I see that binding is happening fine.

2013-04-04 20:55:19,741 INFO [(hibernate.cfg.AnnotationBinder)] Binding entity from annotated class: com.xxx.pkit.entities.DocumentDetails
2013-04-04 20:55:19,795 INFO [(cfg.annotations.EntityBinder)] Bind entity com.xxx.pkit.entities.DocumentDetails on table DOCUMENT_DETAILS

What can be the issue?
Jitesh Sinha
Ranch Hand

Joined: Jun 19, 2004
Posts: 144
can someone please help with this?I am totally stuck at this issue.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: org.hibernate.MappingException: Unknown entity
 
Similar Threads
Hibernate : Empty Table recreated when spring starts
Hibernate/Spring/Jboss Annotations + Entity Mapping problems
org.hibernate.MappingException: Unknown entity:
org.hibernate.MappingException: Could not determine type for:... with @ManyToOne
HibernateException: No Hibernate Session bound to thread