net.sf.hibernate.MappingException: Error reading resource: equicom/offline/transmission/Transmission.hbm.xml

java2s.com | 2 months ago
  1. 0

    exception 1 « Exception « JPA Q&A

    java2s.com | 2 months ago
    net.sf.hibernate.MappingException: Error reading resource: equicom/offline/transmission/Transmission.hbm.xml
  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 | 6 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

    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
  6. 0

    Help « Exception « JPA Q&A

    java2s.com | 2 months ago
    net.sf.hibernate.MappingException: Error reading resource: HIBERNA_MYSQL/Amigo.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

      Error reading resource: equicom/offline/transmission/Transmission.hbm.xml

      at net.sf.hibernate.cfg.Configuration.addClass()
    2. net.sf.hibernate
      Configuration.addClass
      1. net.sf.hibernate.cfg.Configuration.addClass(Configuration.java:336)
      1 frame
    3. com.equifax.persistence
      PersistenceSession.init
      1. com.equifax.persistence.PersistenceSession.init(PersistenceSession.java:201)
      1 frame