Hey,
I'm very new to Hibernate, just finished installing HibernateTools for Eclipse and I have a problem which seems to be very basic ;)
I followed the FLASH presentation of how to configure the Tools, I've created a new Configuration/Console Configuration and generated the XMLs/Classes of an existing DB,
My directory structure is:
dev-proj/test/hibernate/src - hibernate.hbm.xml
dev-proj/test/hibernate/src/org/revenge - all generated POJO entities/XMLs
When opening one of the generated classes it seems that Hibernate generated the classes with 'package org.revenge' which seems not to exist...
I assume the problem starts here unless I need to move 'org/revenge' to the root of the project?
In the configuration file, the resources are mapped like that:
<mapping resource="org/revenge/Profile.hbm.xml" />
When trying to click on 'Create SessionFactory' through the Hibernate Configurations I recieve the following error:
Code:
Error while fetching children
Reason:
org.hibernate.MappingException: Resource: org/revenge/Profile.hbm.xml not found
This is the full exception error message:
Code:
org.hibernate.MappingException: Resource: org/revenge/Profile.hbm.xml not found
at org.hibernate.cfg.Configuration.addResource(Configuration.java:470)
at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1414)
at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1382)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1363)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1339)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1293)
at org.hibernate.console.ConsoleConfiguration.loadConfigurationXML(Unknown Source)
at org.hibernate.console.ConsoleConfiguration.access$0(Unknown Source)
at org.hibernate.console.ConsoleConfiguration$1.execute(Unknown Source)
at org.hibernate.console.execution.DefaultExecutionContext.execute(Unknown Source)
at org.hibernate.console.ConsoleConfiguration.buildWith(Unknown Source)
at org.hibernate.console.ConsoleConfiguration.build(Unknown Source)
at org.hibernate.eclipse.console.workbench.ConsoleConfigurationWorkbenchAdapter.getChildren(Unknown Source)
at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(Unknown Source)
at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:192)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76)
Help would be very appriciated :)
Thanks,
Trouby.