net.sf.hibernate.MappingException: Could not interpret type: classification.Status

Hibernate JIRA | Hao Chen | 1 decade ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    A super class has a field whose type is a subclass. Looks like Hibernate failed to load the subclass because the super class has not been initialized. Can we have a better algorithm to deal with this situation? ============================================================== My configurations: <hibernate-mapping> <class name="BaseEntity" dynamic-update="false" dynamic-insert="false" > <id name="id" column="id" type="java.lang.Long"> <generator class="native"> </generator> </id> <property name="name" type="java.lang.String" update="true" insert="true" column="name" length="100" not-null="true" /> <subclass name="resource.BaseResource" dynamic-update="false" dynamic-insert="false" > <property name="description" type="java.lang.String" update="true" insert="true" column="description" length="300" not-null="true" /> <property name="status" type="classification.Status" update="true" insert="true" column="status" not-null="true" /> ... <subclass name="classification.Status" dynamic-update="false" dynamic-insert="false" > <property name="description" type="java.lang.String" update="true" insert="true" column="description" length="100" not-null="true" /> </subclass> </subclass> </class> </hibernate-mapping> ================================================================================ INFO - Mapping subclass: resource.BaseResource -> BaseEntity DEBUG - Mapped property: description -> description, type: string ERROR - Could not compile the mapping document net.sf.hibernate.MappingException: Could not interpret type: classification.Status at net.sf.hibernate.cfg.Binder.getTypeFromXML(Binder.java:769) at net.sf.hibernate.cfg.Binder.bindValue(Binder.java:348) at net.sf.hibernate.cfg.Binder.propertiesFromXML(Binder.java:872) at net.sf.hibernate.cfg.Binder.bindSubclass(Binder.java:123) at net.sf.hibernate.cfg.Binder.propertiesFromXML(Binder.java:882) at net.sf.hibernate.cfg.Binder.bindRootClass(Binder.java:288) at net.sf.hibernate.cfg.Binder.bindRoot(Binder.java:1076) at net.sf.hibernate.cfg.Configuration.add(Configuration.java:230) at net.sf.hibernate.cfg.Configuration.addInputStream(Configuration.java:252) at net.sf.hibernate.cfg.Configuration.addClass(Configuration.java:286) at util.HibernateUtil.getSessionFactory(HibernateUtil.java:29) at util.HibernateUtil.main(HibernateUtil.java:53) Exception in thread "main" exception.SystemException: net.sf.hibernate.MappingException: Could not int erpret type: classification.Status at util.HibernateUtil.getSessionFactory(HibernateUtil.java:43) at util.HibernateUtil.main(HibernateUtil.java:53) Caused by: net.sf.hibernate.MappingException: Could not interpret type: classification.Status at net.sf.hibernate.cfg.Binder.getTypeFromXML(Binder.java:769) at net.sf.hibernate.cfg.Binder.bindValue(Binder.java:348) at net.sf.hibernate.cfg.Binder.propertiesFromXML(Binder.java:872) at net.sf.hibernate.cfg.Binder.bindSubclass(Binder.java:123) at net.sf.hibernate.cfg.Binder.propertiesFromXML(Binder.java:882) at net.sf.hibernate.cfg.Binder.bindRootClass(Binder.java:288) at net.sf.hibernate.cfg.Binder.bindRoot(Binder.java:1076) at net.sf.hibernate.cfg.Configuration.add(Configuration.java:230) at net.sf.hibernate.cfg.Configuration.addInputStream(Configuration.java:252) at net.sf.hibernate.cfg.Configuration.addClass(Configuration.java:286) at util.HibernateUtil.getSessionFactory(HibernateUtil.java:29) ... 1 more

    Hibernate JIRA | 1 decade ago | Hao Chen
    net.sf.hibernate.MappingException: Could not interpret type: classification.Status
  2. 0

    A super class has a field whose type is a subclass. Looks like Hibernate failed to load the subclass because the super class has not been initialized. Can we have a better algorithm to deal with this situation? ============================================================== My configurations: <hibernate-mapping> <class name="BaseEntity" dynamic-update="false" dynamic-insert="false" > <id name="id" column="id" type="java.lang.Long"> <generator class="native"> </generator> </id> <property name="name" type="java.lang.String" update="true" insert="true" column="name" length="100" not-null="true" /> <subclass name="resource.BaseResource" dynamic-update="false" dynamic-insert="false" > <property name="description" type="java.lang.String" update="true" insert="true" column="description" length="300" not-null="true" /> <property name="status" type="classification.Status" update="true" insert="true" column="status" not-null="true" /> ... <subclass name="classification.Status" dynamic-update="false" dynamic-insert="false" > <property name="description" type="java.lang.String" update="true" insert="true" column="description" length="100" not-null="true" /> </subclass> </subclass> </class> </hibernate-mapping> ================================================================================ INFO - Mapping subclass: resource.BaseResource -> BaseEntity DEBUG - Mapped property: description -> description, type: string ERROR - Could not compile the mapping document net.sf.hibernate.MappingException: Could not interpret type: classification.Status at net.sf.hibernate.cfg.Binder.getTypeFromXML(Binder.java:769) at net.sf.hibernate.cfg.Binder.bindValue(Binder.java:348) at net.sf.hibernate.cfg.Binder.propertiesFromXML(Binder.java:872) at net.sf.hibernate.cfg.Binder.bindSubclass(Binder.java:123) at net.sf.hibernate.cfg.Binder.propertiesFromXML(Binder.java:882) at net.sf.hibernate.cfg.Binder.bindRootClass(Binder.java:288) at net.sf.hibernate.cfg.Binder.bindRoot(Binder.java:1076) at net.sf.hibernate.cfg.Configuration.add(Configuration.java:230) at net.sf.hibernate.cfg.Configuration.addInputStream(Configuration.java:252) at net.sf.hibernate.cfg.Configuration.addClass(Configuration.java:286) at util.HibernateUtil.getSessionFactory(HibernateUtil.java:29) at util.HibernateUtil.main(HibernateUtil.java:53) Exception in thread "main" exception.SystemException: net.sf.hibernate.MappingException: Could not int erpret type: classification.Status at util.HibernateUtil.getSessionFactory(HibernateUtil.java:43) at util.HibernateUtil.main(HibernateUtil.java:53) Caused by: net.sf.hibernate.MappingException: Could not interpret type: classification.Status at net.sf.hibernate.cfg.Binder.getTypeFromXML(Binder.java:769) at net.sf.hibernate.cfg.Binder.bindValue(Binder.java:348) at net.sf.hibernate.cfg.Binder.propertiesFromXML(Binder.java:872) at net.sf.hibernate.cfg.Binder.bindSubclass(Binder.java:123) at net.sf.hibernate.cfg.Binder.propertiesFromXML(Binder.java:882) at net.sf.hibernate.cfg.Binder.bindRootClass(Binder.java:288) at net.sf.hibernate.cfg.Binder.bindRoot(Binder.java:1076) at net.sf.hibernate.cfg.Configuration.add(Configuration.java:230) at net.sf.hibernate.cfg.Configuration.addInputStream(Configuration.java:252) at net.sf.hibernate.cfg.Configuration.addClass(Configuration.java:286) at util.HibernateUtil.getSessionFactory(HibernateUtil.java:29) ... 1 more

    Hibernate JIRA | 1 decade ago | Hao Chen
    net.sf.hibernate.MappingException: Could not interpret type: classification.Status
  3. 0

    Hibernate + composite primary keys

    theserverside.com | 11 months ago
    net.sf.hibernate.MappingException: Error reading resource: com/auctioninfo/model/Person.hbm.xml
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    exception 1 « Exception « JPA Q&A

    java2s.com | 7 months ago
    net.sf.hibernate.MappingException: Error reading resource: equicom/offline/transmission/Transmission.hbm.xml
  6. 0

    hibernate.MappingException

    Coderanch | 1 decade ago | Karthik Vijayarajan
    net.sf.hibernate.MappingException: Error reading resource com/verizon/rct/CD.hbm.xml

    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. net.sf.hibernate.MappingException

      Could not interpret type: classification.Status

      at net.sf.hibernate.cfg.Binder.getTypeFromXML()
    2. net.sf.hibernate
      Configuration.addClass
      1. net.sf.hibernate.cfg.Binder.getTypeFromXML(Binder.java:769)
      2. net.sf.hibernate.cfg.Binder.bindValue(Binder.java:348)
      3. net.sf.hibernate.cfg.Binder.propertiesFromXML(Binder.java:872)
      4. net.sf.hibernate.cfg.Binder.bindSubclass(Binder.java:123)
      5. net.sf.hibernate.cfg.Binder.propertiesFromXML(Binder.java:882)
      6. net.sf.hibernate.cfg.Binder.bindRootClass(Binder.java:288)
      7. net.sf.hibernate.cfg.Binder.bindRoot(Binder.java:1076)
      8. net.sf.hibernate.cfg.Configuration.add(Configuration.java:230)
      9. net.sf.hibernate.cfg.Configuration.addInputStream(Configuration.java:252)
      10. net.sf.hibernate.cfg.Configuration.addClass(Configuration.java:286)
      10 frames
    3. FitNesse
      HibernateUtil.main
      1. util.HibernateUtil.getSessionFactory(HibernateUtil.java:29)
      2. util.HibernateUtil.main(HibernateUtil.java:53)
      2 frames