MappingException « HBM « JPA Q&A





2. org.hibernate.MappingException: Resource: *.hbm.xml    forum.hibernate.org

org.hibernate.MappingException: Resource: FileToSave.hbm.xml not found at org.hibernate.cfg.Configuration.addResource(Configuration.java:465) at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1404) at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1372) at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1353) at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1329) at org.hibernate.cfg.Configuration.configure(Configuration.java:1283) at org.hibernate.console.ConsoleConfiguration$1.execute(ConsoleConfiguration.java:133) at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:35) at org.hibernate.console.ConsoleConfiguration.buildWith(ConsoleConfiguration.java:123) at org.hibernate.console.ConsoleConfiguration.build(ConsoleConfiguration.java:107) at org.hibernate.eclipse.console.workbench.ConsoleConfigurationWorkbenchAdapter.getChildren(ConsoleConfigurationWorkbenchAdapter.java:19) at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:68) at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:192) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76) ------- I am using Hibernate Configuration of Eclipse plugin and this is the error I received. This is my hibernate file:

3. org.hibernate.MappingException: Resource: .hbm.xml not found    forum.hibernate.org

No, sorry that was some test code, there should be no .\ in the front. Basically when I use my created .jar file in a test application and I include the Hibernate.cfg.xml in the source folder of the test app then the test app can find my classes in the jar file and hibernate can find its Hibernate.cfg.xml but Hibernate can ...