I am using the latest version of JBOSS IDE with Hibernate. I am working through the DEMOs trying to configure Hibernate to work with MySQL. It appears everything is working to a point. When I attempt in creating a Session Factory from the Hibernate Configuration window, I receive the below error:
org.hibernate.MappingException: Resource: com\hibernate\test\db\Catalog.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)
I have met the problem too,
make sure that the Catalog.hbm.xml file are included in the /WEB-INF/classes directory of your .ear or .war package, and be sure that the
Catalog.hbm.xml file be match to the dtd.