• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

org.hibernate.MappingException: Unknown entity

 
Abhinav Ranjan
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1682
7
Android IntelliJ IDE Linux Mac OS X Spring
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Abhinav Ranjan
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1682
7
Android IntelliJ IDE Linux Mac OS X Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic