aspose 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

Abhinav Ranjan
Greenhorn

Joined: Aug 07, 2012
Posts: 2
Please anyone help me out to resolve these type of issues, although i'm a new bee of spring as well as in Hibernate:
I'm pasting here my stack trace:-
org.hibernate.MappingException: Unknown entity: com.t8.card8.hibernate.FileControl
at org.hibernate.impl.SessionFactoryImpl.getEntityPersister(SessionFactoryImpl.java:550)
at org.hibernate.impl.SessionImpl.getEntityPersister(SessionImpl.java:1338)
at org.hibernate.engine.ForeignKeys.isTransient(ForeignKeys.java:180)
at org.hibernate.event.def.AbstractSaveEventListener.getEntityState(AbstractSaveEventListener.java:512)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:80)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70)
at org.hibernate.impl.SessionImpl.fireSaveOrUpdate(SessionImpl.java:507)
at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:499)
at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:495)

Bill Gorder
Bartender

Joined: Mar 07, 2010
Posts: 1632
    
    7

Abhinav,

Welcome to Java Ranch! You have marked this topic as resolved so it is unlikely you will get any responses to this topic. If this was unintentional let us know. If it was intentional it is often helpful to others to post the solution you found to your problem.

I am moving this to the ORM forum as it does not seem to be Spring related.


[How To Ask Questions][Read before you PM me]
Abhinav Ranjan
Greenhorn

Joined: Aug 07, 2012
Posts: 2
Hi Bill Gorder,
Sorry to say, by mistake i marked it as resolved but i didn't get any response till now, i'm still stuck and waiting for answer.
Please help me out if possible
Bill Gorder
Bartender

Joined: Mar 07, 2010
Posts: 1632
    
    7

I have marked this topic back to unresolved for you.

You have not posted any of your configuration so its hard to say much, but I would start by making sure your entity is annotated with javax.persistence.Entity not org.hibernate.annotations.Entity (check your imports)
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: org.hibernate.MappingException: Unknown entity
 
Similar Threads
hibernate3.3-spring3 project
getting MappingException:
Unknown entity: java.util.ArrayList ???
Problem of Unknown Entity
hbm file version working but annotation not