org.hibernate.MappingException: Unknown entity: sts.business.entities.IndustryBo

Coderanch | manu chaox | 6 years ago
  1. 0

    spring + hibernate

    Coderanch | 6 years ago | manu chaox
    org.hibernate.MappingException: Unknown entity: sts.business.entities.IndustryBo
  2. 0

    Hibernate Eclipse Unknown Entity (using javax.persistence.Entity)

    Stack Overflow | 3 years ago | Mudassir Shahzad
    org.hibernate.MappingException: Unknown entity: com.mywebservice.domain.Account
  3. 0

    org.hibernate.MappingException: Unknown entity error as hibernate.cfg.xml does not get loaded

    Stack Overflow | 4 years ago | J888
    org.hibernate.MappingException: Unknown entity: net.viralpatel.contact.model.Developer
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    [HHH-4321] Getting org.hibernate.MappingException for basic Hibernate annotations application - Hibernate JIRA

    atlassian.net | 1 year ago
    org.hibernate.MappingException: Unknown entity: com.flylite.ticketing.model.FlightMaster
  6. 0

    Hi, I'm trying Hibernate annotations program along with a business object having 4 attributes. I referred one of the online tutorial and created BO class with annotations, HibernateUtil.java, hibernate.cfg.xml, and .java with main method in it for execution. Everything compiled successfully in eclipse but while executing I got below mentioned exception: Exception in thread "main" org.hibernate.MappingException: Unknown entity: com.flylite.ticketing.model.FlightMaster at org.hibernate.impl.SessionFactoryImpl.getEntityPersister(SessionFactoryImpl.java:557) at org.hibernate.impl.SessionImpl.getEntityPersister(SessionImpl.java:1342) at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:98) at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:187) at org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:33) at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:172) at org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:27) at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70) at org.hibernate.impl.SessionImpl.fireSave(SessionImpl.java:539) at org.hibernate.impl.SessionImpl.save(SessionImpl.java:527) at org.hibernate.impl.SessionImpl.save(SessionImpl.java:523) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:318) at $Proxy9.save(Unknown Source) at com.flylite.ticketing.application.TestFlightManager.main(TestFlightManager.java:23) I followed all the steps as per given in tutorial apart from @Table (name="") as we have to use appliesTo in latest version. I doubt (I may be wrong) on @Table(appliesTo="") tag, as I tried similar program couple of months back with lower version of Hibernate where tag was @Table(name=""), and it ran successfully. Please helpe me in this issue. Let me know in case I need to upload my files. Regards Mandar

    Hibernate JIRA | 8 years ago | Mandar Shukla
    org.hibernate.MappingException: Unknown entity: com.flylite.ticketing.model.FlightMaster

    1 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.hibernate.MappingException

      Unknown entity: sts.business.entities.IndustryBo

      at org.hibernate.impl.SessionFactoryImpl.getEntityPersister()
    2. Hibernate
      SessionImpl.save
      1. org.hibernate.impl.SessionFactoryImpl.getEntityPersister(SessionFactoryImpl.java:628)
      2. org.hibernate.impl.SessionImpl.getEntityPersister(SessionImpl.java:1366)
      3. org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:121)
      4. org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:210)
      5. org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:56)
      6. org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:195)
      7. org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:50)
      8. org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:93)
      9. org.hibernate.impl.SessionImpl.fireSave(SessionImpl.java:563)
      10. org.hibernate.impl.SessionImpl.save(SessionImpl.java:551)
      11. org.hibernate.impl.SessionImpl.save(SessionImpl.java:547)
      11 frames
    3. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:597)
      4 frames
    4. Hibernate
      ThreadLocalSessionContext$TransactionProtectionWrapper.invoke
      1. org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:342)
      1 frame
    5. Unknown
      $Proxy3.save
      1. $Proxy3.save(Unknown Source)
      1 frame
    6. sts.business.dao
      IndustryDaoImpl.insertIndustry
      1. sts.business.dao.impl.IndustryDaoImpl.insertIndustry(IndustryDaoImpl.java:43)
      1 frame
    7. sts.business.entities
      TestSpringApp.main
      1. sts.business.entities.TestSpringApp.main(TestSpringApp.java:24)
      1 frame