Hi
I am new to hibernate. I am using hibernate 3.3 and trying to make hbm2java work with it. I was able to configure the necessary jar files from this url:
http://www.onjava.com/pub/a/onjava/2005 ... tml?page=5
I have my hibernate.cfg.xml in the src/ directory. And i have placed my hbm files in the src/xml/hbm directory.
My mapping would look something like this in hibernate.cfg.xml:
<mapping resource="xml/hbm/User.hbm.xml" />
<mapping resource="xml/hbm/Authorization.hbm.xml"/>
<mapping resource="xml/hbm/UserDetails.hbm.xml"/>
...
....
When i try to build this, it gives me an exception
org.hibernate.MappingException: Resource: xml/hbm/User.hbm.xml not found
org.hibernate.MappingException: Resource: xml/hbm/User.hbm.xml not found
at org.hibernate.cfg.Configuration.addResource(Configuration.java:443)
at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1312)
at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1284)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1266)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1233)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1195)
at org.hibernate.tool.ant.ConfigurationTask.doConfiguration(ConfigurationTask.java:96)
at org.hibernate.tool.ant.ConfigurationTask.getConfiguration(ConfigurationTask.java:55)
at org.hibernate.tool.ant.HibernateToolTask.getConfiguration(HibernateToolTask.java:302)
at org.hibernate.tool.ant.HibernateToolTask.getProperties(HibernateToolTask.java:318)
at org.hibernate.tool.ant.ExporterTask.configureExporter(ExporterTask.java:94)
at org.hibernate.tool.ant.Hbm2JavaExporterTask.configureExporter(Hbm2JavaExporterTask.java:34)
at org.hibernate.tool.ant.ExporterTask.execute(ExporterTask.java:39)
at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:186)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.GeneratedMethodAccessor175.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:273)
at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:486)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:151)
BUILD FAILED (total time: 0 seconds)
I have it working fine with hibernate 2.x but i would like to move on to hibernate 3.x. Is there anything i could be missing?