net.sf.hibernate.MappingException: Resource: com/a/b/c.xml not found

Oracle Community | 3004 | 1 decade ago
  1. 0

    8.1sp2 EAR deployment ClassLoader cannot find resource

    Oracle Community | 1 decade ago | 3004
    net.sf.hibernate.MappingException: Resource: com/a/b/c.xml not found
  2. 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
  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

    Help « Exception « JPA Q&A

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

    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

      Resource: com/a/b/c.xml not found

      at net.sf.hibernate.cfg.Configuration.addResource()
    2. net.sf.hibernate
      ManagedConnectionFactoryImpl.createConnectionFactory
      1. net.sf.hibernate.cfg.Configuration.addResource(Configuration.java:327)
      2. net.sf.hibernate.jca.ManagedConnectionFactoryImpl.initialize(ManagedConnectionFactoryImpl.java:145)
      3. net.sf.hibernate.jca.ManagedConnectionFactoryImpl.createConnectionFactory(ManagedConnectionFactoryImpl.java:85)
      3 frames
    3. weblogic.connector.common
      ConnectionFactory.createResource
      1. weblogic.connector.common.internal.ConnectionPool.getConnectionFactory(ConnectionPool.java:1695)
      2. weblogic.connector.common.internal.ConnectionFactory.testConnectionProxyViability(ConnectionFactory.java:466)
      3. weblogic.connector.common.internal.ConnectionFactory.createResource(ConnectionFactory.java:207)
      3 frames
    4. weblogic.common.resourcepool
      ResourcePoolImpl.setInitialCapacity
      1. weblogic.common.resourcepool.ResourcePoolImpl.makeResources(ResourcePoolImpl.java:1103)
      2. weblogic.common.resourcepool.ResourcePoolImpl.makeResources(ResourcePoolImpl.java:1040)
      3. weblogic.common.resourcepool.ResourcePoolImpl.setInitialCapacity(ResourcePoolImpl.java:723)
      3 frames
    5. weblogic.connector.common
      ConnectionPoolManager.preparePool
      1. weblogic.connector.common.internal.ConnectionPoolManager.updateInitialCapacity(ConnectionPoolManager.java:495)
      2. weblogic.connector.common.internal.ConnectionPoolManager.preparePool(ConnectionPoolManager.java:140)
      2 frames
    6. weblogic.connector.deploy
      ConnectorModule.prepare
      1. weblogic.connector.deploy.Deployer.preparePool(Deployer.java:618)
      2. weblogic.connector.deploy.Deployer.prepare(Deployer.java:230)
      3. weblogic.connector.deploy.ConnectorModule.prepare(ConnectorModule.java:248)
      3 frames
    7. weblogic.j2ee
      J2EEApplicationContainer.prepare
      1. weblogic.j2ee.J2EEApplicationContainer.prepareModule(J2EEApplicationContainer.java:2962)
      2. weblogic.j2ee.J2EEApplicationContainer.prepareModules(J2EEApplicationContainer.java:1534)
      3. weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:1188)
      4. weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:1031)
      4 frames
    8. weblogic.management.deploy
      SlaveDeployer.prepareUpdate
      1. weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.prepareContainer(SlaveDeployer.java:2602)
      2. weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.createContainer(SlaveDeployer.java:2552)
      3. weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeployer.java:2474)
      4. weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:798)
      5. weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:507)
      6. weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:465)
      6 frames
    9. weblogic.drs.internal
      SlaveCallbackHandler$1.execute
      1. weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:25)
      1 frame
    10. weblogic.kernel
      ExecuteThread.run
      1. weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
      2. weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
      2 frames