[hibernate-issues] [Hibernate-JIRA] Created: (HHH-2677) Not loading the ORM.xml file

Adi (JIRA) noreply at atlassian.com
Tue Jun 19 17:46:52 EDT 2007


Not loading the ORM.xml file
----------------------------

                 Key: HHH-2677
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2677
             Project: Hibernate3
          Issue Type: Bug
          Components: core
    Affects Versions: 3.2.0.ga
         Environment: Windows XP,MySQL5.0,Hibernate3.2.0
            Reporter: Adi
            Priority: Minor
         Attachments: persistence.zip

IF the name of the orm.xml is anything different, then Hibernate is not loading the orm file.

Following is the error I am getting:
java.lang.ExceptionInInitializerError
	at com.iChieve.domain.entity.ProductCategoryUnitTest.testSave(ProductCategoryUnitTest.java:16)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at junit.framework.TestCase.runTest(TestCase.java:154)
	at junit.framework.TestCase.runBare(TestCase.java:127)
	at junit.framework.TestResult$1.protect(TestResult.java:106)
	at junit.framework.TestResult.runProtected(TestResult.java:124)
	at junit.framework.TestResult.run(TestResult.java:109)
	at junit.framework.TestCase.run(TestCase.java:118)
	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: javax.persistence.PersistenceException: [PersistenceUnit: simpleJPA-PersistenceUnit] Unable to find XML mapping file in classpath: /META-INF/myorm.xml
	at org.hibernate.ejb.Ejb3Configuration.addClassesToSessionFactory(Ejb3Configuration.java:914)
	at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:772)
	at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:183)
	at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:240)
	at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:120)
	at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:51)
	at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:33)
	at com.iChieve.dao.EntityManagerHelper.<clinit>(EntityManagerHelper.java:20)
	... 17 more


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list