net.sf.hibernate.MappingException: Could not find class: com.thirdpillar.oz.model.jaxb.dnb.impl.ResponseImpl

Oracle Community | 579045 | 6 years ago
  1. 0

    migrating from OAS 10.1.3.1 to 01.1.3.5

    Oracle Community | 6 years ago | 579045
    net.sf.hibernate.MappingException: Could not find class: com.thirdpillar.oz.model.jaxb.dnb.impl.ResponseImpl
  2. 0

    <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 2.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd"> <hibernate-mapping schema="pkr"> <class name="edu.sdsc.pkr.orm.pkr.ProteinSequence" table="protein_sequences" > <id name="proteinSequenceId" column="protein_sequence_id" type="java.lang.Long" unsaved-value="null"> <generator class="assigned"/> </id> <property name="sequence" column="sequence" type="java.lang.TextType" not-null="true" unique="true" /> </class> </hibernate-mapping> ##The error is in the mapping in in line: -- name="sequence" column="sequence" type="java.lang.TextType" ##which should be ++name="sequence" column="sequence" type="net.sf.hibernate.type.TextType" But the error message "net.sf.hibernate.MappingException: duplicate import: ProteinSequence" is rather misleading. I believe a similar error was addressed in last release 2.1.1 <http://sourceforge.net/project/shownotes.php?group_id=40712&release_id=214960> <quote> * fixed a problem where mapping validation failure was reported as duplicate import (Michael Gloegl)"</quote> 11:53:35,323 INFO Environment:462 - Hibernate 2.1.2 11:53:35,390 INFO Environment:491 - hibernate.properties not found 11:53:35,412 INFO Environment:519 - using CGLIB reflection optimizer 11:53:35,428 INFO Configuration:854 - configuring from resource: /hibernate.cfg.xml 11:53:35,429 INFO Configuration:826 - Configuration resource: /hibernate.cfg.xml 11:53:38,080 INFO Configuration:311 - Mapping resource: edu/sdsc/pkr/orm/pkr/MasterSource.hbm.xml 11:53:38,318 INFO Binder:229 - Mapping class: edu.sdsc.pkr.orm.pkr.MasterSource -> master_source 11:53:38,407 INFO Configuration:311 - Mapping resource: edu/sdsc/pkr/orm/pkr/ProteinSequence.hbm.xml 11:53:38,671 INFO Binder:229 - Mapping class: edu.sdsc.pkr.orm.pkr.ProteinSequence -> protein_sequences 11:53:38,688 ERROR Configuration:252 - Could not compile the mapping document net.sf.hibernate.MappingException: Could not interpret type: java.lang.TextType at net.sf.hibernate.cfg.Binder.getTypeFromXML(Binder.java:910) at net.sf.hibernate.cfg.Binder.bindSimpleValue(Binder.java:411) at net.sf.hibernate.cfg.Binder.propertiesFromXML(Binder.java:1023) at net.sf.hibernate.cfg.Binder.bindRootClass(Binder.java:352) at net.sf.hibernate.cfg.Binder.bindRoot(Binder.java:1229) at net.sf.hibernate.cfg.Configuration.add(Configuration.java:249) at net.sf.hibernate.cfg.Configuration.addInputStream(Configuration.java:285) at net.sf.hibernate.cfg.Configuration.addResource(Configuration.java:315) at net.sf.hibernate.cfg.Configuration.doConfigure(Configuration.java:973) at net.sf.hibernate.cfg.Configuration.doConfigure(Configuration.java:928) at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:856) at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:842) at edu.sdsc.pkr.hibernate.HibernateUtil.<clinit>(HibernateUtil.java:8) at edu.sdsc.pkr.struts.ActionWithHbmSession.getSession(ActionWithHbmSession.java:33) at edu.sdsc.pkr.test.testPkrEntry.main(testPkrEntry.java:54) 11:53:38,807 INFO Configuration:311 - Mapping resource: edu/sdsc/pkr/orm/pkr/ProteinSequence.hbm.xml 11:53:39,045 ERROR Configuration:252 - Could not compile the mapping document net.sf.hibernate.MappingException: duplicate import: ProteinSequence at net.sf.hibernate.cfg.Mappings.addImport(Mappings.java:85) at net.sf.hibernate.cfg.Binder.bindClass(Binder.java:126) at net.sf.hibernate.cfg.Binder.bindRootClass(Binder.java:221) at net.sf.hibernate.cfg.Binder.bindRoot(Binder.java:1229) at net.sf.hibernate.cfg.Configuration.add(Configuration.java:249) at net.sf.hibernate.cfg.Configuration.addInputStream(Configuration.java:285) at net.sf.hibernate.cfg.Configuration.addResource(Configuration.java:315) at net.sf.hibernate.cfg.Configuration.doConfigure(Configuration.java:976) at net.sf.hibernate.cfg.Configuration.doConfigure(Configuration.java:928) at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:856) at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:842) at edu.sdsc.pkr.hibernate.HibernateUtil.<clinit>(HibernateUtil.java:8) at edu.sdsc.pkr.struts.ActionWithHbmSession.getSession(ActionWithHbmSession.java:33) at edu.sdsc.pkr.test.testPkrEntry.main(testPkrEntry.java:54) Exception in thread "main" java.lang.ExceptionInInitializerError at edu.sdsc.pkr.struts.ActionWithHbmSession.getSession(ActionWithHbmSession.java:33) at edu.sdsc.pkr.test.testPkrEntry.main(testPkrEntry.java:54) Caused by: java.lang.RuntimeException: Exception building SessionFactory: Error reading resource: edu/sdsc/pkr/orm/pkr/ProteinSequence.hbm.xml at edu.sdsc.pkr.hibernate.HibernateUtil.<clinit>(HibernateUtil.java:11) ... 2 more Caused by: net.sf.hibernate.MappingException: Error reading resource: edu/sdsc/pkr/orm/pkr/ProteinSequence.hbm.xml at net.sf.hibernate.cfg.Configuration.addResource(Configuration.java:318) at net.sf.hibernate.cfg.Configuration.doConfigure(Configuration.java:976) at net.sf.hibernate.cfg.Configuration.doConfigure(Configuration.java:928) at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:856) at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:842) at edu.sdsc.pkr.hibernate.HibernateUtil.<clinit>(HibernateUtil.java:8) ... 2 more Caused by: net.sf.hibernate.MappingException: duplicate import: ProteinSequence at net.sf.hibernate.cfg.Mappings.addImport(Mappings.java:85) at net.sf.hibernate.cfg.Binder.bindClass(Binder.java:126) at net.sf.hibernate.cfg.Binder.bindRootClass(Binder.java:221) at net.sf.hibernate.cfg.Binder.bindRoot(Binder.java:1229) at net.sf.hibernate.cfg.Configuration.add(Configuration.java:249) at net.sf.hibernate.cfg.Configuration.addInputStream(Configuration.java:285) at net.sf.hibernate.cfg.Configuration.addResource(Configuration.java:315) ... 7 more

    Hibernate JIRA | 1 decade ago | R. Hannes Niedner
    net.sf.hibernate.MappingException: Could not interpret type: java.lang.TextType
  3. 0

    <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 2.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd"> <hibernate-mapping schema="pkr"> <class name="edu.sdsc.pkr.orm.pkr.ProteinSequence" table="protein_sequences" > <id name="proteinSequenceId" column="protein_sequence_id" type="java.lang.Long" unsaved-value="null"> <generator class="assigned"/> </id> <property name="sequence" column="sequence" type="java.lang.TextType" not-null="true" unique="true" /> </class> </hibernate-mapping> ##The error is in the mapping in in line: -- name="sequence" column="sequence" type="java.lang.TextType" ##which should be ++name="sequence" column="sequence" type="net.sf.hibernate.type.TextType" But the error message "net.sf.hibernate.MappingException: duplicate import: ProteinSequence" is rather misleading. I believe a similar error was addressed in last release 2.1.1 <http://sourceforge.net/project/shownotes.php?group_id=40712&release_id=214960> <quote> * fixed a problem where mapping validation failure was reported as duplicate import (Michael Gloegl)"</quote> 11:53:35,323 INFO Environment:462 - Hibernate 2.1.2 11:53:35,390 INFO Environment:491 - hibernate.properties not found 11:53:35,412 INFO Environment:519 - using CGLIB reflection optimizer 11:53:35,428 INFO Configuration:854 - configuring from resource: /hibernate.cfg.xml 11:53:35,429 INFO Configuration:826 - Configuration resource: /hibernate.cfg.xml 11:53:38,080 INFO Configuration:311 - Mapping resource: edu/sdsc/pkr/orm/pkr/MasterSource.hbm.xml 11:53:38,318 INFO Binder:229 - Mapping class: edu.sdsc.pkr.orm.pkr.MasterSource -> master_source 11:53:38,407 INFO Configuration:311 - Mapping resource: edu/sdsc/pkr/orm/pkr/ProteinSequence.hbm.xml 11:53:38,671 INFO Binder:229 - Mapping class: edu.sdsc.pkr.orm.pkr.ProteinSequence -> protein_sequences 11:53:38,688 ERROR Configuration:252 - Could not compile the mapping document net.sf.hibernate.MappingException: Could not interpret type: java.lang.TextType at net.sf.hibernate.cfg.Binder.getTypeFromXML(Binder.java:910) at net.sf.hibernate.cfg.Binder.bindSimpleValue(Binder.java:411) at net.sf.hibernate.cfg.Binder.propertiesFromXML(Binder.java:1023) at net.sf.hibernate.cfg.Binder.bindRootClass(Binder.java:352) at net.sf.hibernate.cfg.Binder.bindRoot(Binder.java:1229) at net.sf.hibernate.cfg.Configuration.add(Configuration.java:249) at net.sf.hibernate.cfg.Configuration.addInputStream(Configuration.java:285) at net.sf.hibernate.cfg.Configuration.addResource(Configuration.java:315) at net.sf.hibernate.cfg.Configuration.doConfigure(Configuration.java:973) at net.sf.hibernate.cfg.Configuration.doConfigure(Configuration.java:928) at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:856) at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:842) at edu.sdsc.pkr.hibernate.HibernateUtil.<clinit>(HibernateUtil.java:8) at edu.sdsc.pkr.struts.ActionWithHbmSession.getSession(ActionWithHbmSession.java:33) at edu.sdsc.pkr.test.testPkrEntry.main(testPkrEntry.java:54) 11:53:38,807 INFO Configuration:311 - Mapping resource: edu/sdsc/pkr/orm/pkr/ProteinSequence.hbm.xml 11:53:39,045 ERROR Configuration:252 - Could not compile the mapping document net.sf.hibernate.MappingException: duplicate import: ProteinSequence at net.sf.hibernate.cfg.Mappings.addImport(Mappings.java:85) at net.sf.hibernate.cfg.Binder.bindClass(Binder.java:126) at net.sf.hibernate.cfg.Binder.bindRootClass(Binder.java:221) at net.sf.hibernate.cfg.Binder.bindRoot(Binder.java:1229) at net.sf.hibernate.cfg.Configuration.add(Configuration.java:249) at net.sf.hibernate.cfg.Configuration.addInputStream(Configuration.java:285) at net.sf.hibernate.cfg.Configuration.addResource(Configuration.java:315) at net.sf.hibernate.cfg.Configuration.doConfigure(Configuration.java:976) at net.sf.hibernate.cfg.Configuration.doConfigure(Configuration.java:928) at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:856) at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:842) at edu.sdsc.pkr.hibernate.HibernateUtil.<clinit>(HibernateUtil.java:8) at edu.sdsc.pkr.struts.ActionWithHbmSession.getSession(ActionWithHbmSession.java:33) at edu.sdsc.pkr.test.testPkrEntry.main(testPkrEntry.java:54) Exception in thread "main" java.lang.ExceptionInInitializerError at edu.sdsc.pkr.struts.ActionWithHbmSession.getSession(ActionWithHbmSession.java:33) at edu.sdsc.pkr.test.testPkrEntry.main(testPkrEntry.java:54) Caused by: java.lang.RuntimeException: Exception building SessionFactory: Error reading resource: edu/sdsc/pkr/orm/pkr/ProteinSequence.hbm.xml at edu.sdsc.pkr.hibernate.HibernateUtil.<clinit>(HibernateUtil.java:11) ... 2 more Caused by: net.sf.hibernate.MappingException: Error reading resource: edu/sdsc/pkr/orm/pkr/ProteinSequence.hbm.xml at net.sf.hibernate.cfg.Configuration.addResource(Configuration.java:318) at net.sf.hibernate.cfg.Configuration.doConfigure(Configuration.java:976) at net.sf.hibernate.cfg.Configuration.doConfigure(Configuration.java:928) at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:856) at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:842) at edu.sdsc.pkr.hibernate.HibernateUtil.<clinit>(HibernateUtil.java:8) ... 2 more Caused by: net.sf.hibernate.MappingException: duplicate import: ProteinSequence at net.sf.hibernate.cfg.Mappings.addImport(Mappings.java:85) at net.sf.hibernate.cfg.Binder.bindClass(Binder.java:126) at net.sf.hibernate.cfg.Binder.bindRootClass(Binder.java:221) at net.sf.hibernate.cfg.Binder.bindRoot(Binder.java:1229) at net.sf.hibernate.cfg.Configuration.add(Configuration.java:249) at net.sf.hibernate.cfg.Configuration.addInputStream(Configuration.java:285) at net.sf.hibernate.cfg.Configuration.addResource(Configuration.java:315) ... 7 more

    Hibernate JIRA | 1 decade ago | R. Hannes Niedner
    net.sf.hibernate.MappingException: Could not interpret type: java.lang.TextType
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    build error: ant import.tomcat.users

    xplanner | 1 decade ago | terryg
    net.sf.hibernate.MappingException: persistent class \[com.technoetic.xplanner.statistics.DataSample\] not found
  6. 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

    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 find class: com.thirdpillar.oz.model.jaxb.dnb.impl.ResponseImpl

      at net.sf.hibernate.cfg.Binder.bindManyToOne()
    2. net.sf.hibernate
      Binder.bindRoot
      1. net.sf.hibernate.cfg.Binder.bindManyToOne(Binder.java:635)
      2. net.sf.hibernate.cfg.Binder.propertiesFromXML(Binder.java:1034)
      3. net.sf.hibernate.cfg.Binder.bindRootClass(Binder.java:362)
      4. net.sf.hibernate.cfg.Binder.bindRoot(Binder.java:1256)
      4 frames