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,
|
|