-->
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.  [ 3 posts ] 
Author Message
 Post subject: The relative path of hbm.xml issue
PostPosted: Fri Feb 02, 2007 5:37 am 
Newbie

Joined: Tue Jan 30, 2007 12:00 pm
Posts: 7
It seems to me that HibernateTools doesn't support a relative pathed hbm.xml in the Hibernate configuration. The very same configuration xml (see below) that works in Hibernate runtime doesn't work in Hibernate console.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
...
<mapping resource="mapping/TradeConfirmation.hbm.xml" />
</session-factory>
</hibernate-configuration>


Here is the log :
org.hibernate.MappingNotFoundException: resource: mapping/TradeConfirmation.hbm.xml not found
at org.hibernate.cfg.Configuration.addResource(Configuration.java:517)
at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1511)
at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1479)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1458)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1432)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1386)
at org.hibernate.console.ConsoleConfiguration.loadConfigurationXML(ConsoleConfiguration.java:257)
at org.hibernate.console.ConsoleConfiguration.configureStandardConfiguration(ConsoleConfiguration.java:491)
at org.hibernate.console.ConsoleConfiguration.buildConfiguration(ConsoleConfiguration.java:463)
at org.hibernate.console.ConsoleConfiguration.access$0(ConsoleConfiguration.java:444)
at org.hibernate.console.ConsoleConfiguration$1.execute(ConsoleConfiguration.java:169)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:65)
at org.hibernate.console.ConsoleConfiguration.buildWith(ConsoleConfiguration.java:161)
at org.hibernate.console.ConsoleConfiguration.build(ConsoleConfiguration.java:107)
at org.hibernate.eclipse.console.workbench.ConsoleConfigurationWorkbenchAdapter.getChildren(ConsoleConfigurationWorkbenchAdapter.java:38)
at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.getChildren(BasicWorkbenchAdapter.java:88)
at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:94)
at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:207)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)

Regards,


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 02, 2007 7:07 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
so "mapping/TradeConfirmation.hbm.xml" is not in the classpath you specified the console configuration should use.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 02, 2007 8:10 am 
Newbie

Joined: Tue Jan 30, 2007 12:00 pm
Posts: 7
right, thank you.


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

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.