-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Strange Mapping Error when File exists
PostPosted: Fri Oct 13, 2006 10:16 am 
Newbie

Joined: Wed Oct 11, 2006 2:48 pm
Posts: 4
Hibernate version: 2.1.6

Mapping documents:

Code:
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
        "-//Hibernate/Hibernate Configuration DTD//EN"

"http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd">

<hibernate-configuration>
     
        <!-- mapping files -->
        <mapping resource="com/diatem/db/common/LockData.hbm.xml"/>
       
        <mapping resource="com/diatem/db/users/NetPortalUser.hbm.xml"/>
        <mapping resource="com/diatem/db/users/NetPortalGroup.hbm.xml"/>
       
    </session-factory>
</hibernate-configuration>



Full stack trace of any exception that occurs:

Code:
[Populate-DB] Initializing Hibernate Configuration...
[Populate-DB] 0 [main] INFO cfg.Environment  - Hibernate 2.1.6
[Populate-DB] 0 [main] INFO cfg.Environment  - loaded properties from resource hibernate.properties: {hibernate.connection.password=passwd, hibernate.query.imports=net.sf.hibernate.test, net.sf.hibernate.eg, hibernate.query.substitutions=true 1, false 0, yes 'Y', no 'N', hibernate.dbcp.whenExhaustedAction=1, hibernate.show_sql=false, hibernate.proxool.pool_alias=pool1, hibernate.jdbc.batch_size=0, hibernate.dbcp.ps.maxActive=6, hibernate.max_fetch_depth=0, hibernate.jdbc.use_streams_for_binary=true, hibernate.use_outer_join=false, hibernate.jdbc.use_scrollable_resultset=true, hibernate.connection.username=root, hibernate.dbcp.maxActive=10, hibernate.dbcp.ps.whenExhaustedAction=1, hibernate.dbcp.maxIdle=10, hibernate.connection.driver_class=com.ibm.db2.jcc.DB2Driver, hibernate.dbcp.ps.maxIdle=6, hibernate.cache.provider_class=net.sf.ehcache.hibernate.Provider, hibernate.dbcp.maxWait=120000, hibernate.dbcp.ps.maxWait=120000, hibernate.cglib.use_reflection_optimizer=true, hibernate.dialect=net.sf.hibernate.dialect.DB2Dialect, hibernate.connection.url=jdbc:db2://localhost:50000/TEST}
[Populate-DB] 0 [main] INFO cfg.Environment  - using java.io streams to persist binary types
[Populate-DB] 0 [main] INFO cfg.Environment  - using CGLIB reflection optimizer
[Populate-DB] 16 [main] INFO cfg.Configuration  - configuring from resource: /hibernate.cfg.xml
[Populate-DB] 16 [main] INFO cfg.Configuration  - Configuration resource: /hibernate.cfg.xml
[Populate-DB] 485 [main] INFO cfg.Configuration  - Mapping resource: com/diatem/db/common/LockData.hbm.xml
[Populate-DB] 657 [main] INFO cfg.Binder  - Mapping class: com.diatem.db.common.LockData -> LockData
[Populate-DB] 782 [main] INFO cfg.Configuration  - Mapping resource: com/diatem/db/users/NetPortalUser.hbm.xml
[Populate-DB] Exception in thread "main" net.sf.hibernate.MappingException: Resource: com/diatem/db/users/NetPortalUser.hbm.xml not found
[Populate-DB] at net.sf.hibernate.cfg.Configuration.addResource(Configuration.java:331)
[Populate-DB] at net.sf.hibernate.cfg.Configuration.doConfigure(Configuration.java:1005)
[Populate-DB] at net.sf.hibernate.cfg.Configuration.doConfigure(Configuration.java:961)
[Populate-DB] at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:889)
[Populate-DB] at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:875)
[Populate-DB] at com.diatem.db.populate.Main.initHibernate(Main.java:289)
[Populate-DB] at com.diatem.db.populate.Main.init(Main.java:213)
[Populate-DB] at com.diatem.db.populate.Main.main(Main.java:127)


Name and version of the database you are using: IBM DB2 v8.0


The problem is that the file exitst at the specied location. It is in a different Eclipse Project but the project is included as one of the dependecies of the one that contains the build.xml file.

Any ideas as to why the first file is found while the second one is not ?

Thanks


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.