I tried the latest snapshot on a project that works using 1.2 and have this issue:
com.bm.testsuite.EntityInitializationException: Warning the test may fail because EntityManager failed to initialize. Cause: javax.persistence.PersistenceException: Unable to build EntityManagerFactory
at com.bm.utils.injectinternal.InternalInjector.createInternalInjector(InternalInjector.java:55)
at com.bm.testsuite.BaseFixture.initInjector(BaseFixture.java:251)
at com.bm.testsuite.BaseSessionBeanFixture.<init>(BaseSessionBeanFixture.java:61)
at com.bm.testsuite.BaseSessionBeanFixture.<init>(BaseSessionBeanFixture.java:44)
at com.agfa.hap.bpe.common.BasicEjbUnitSessionTest.<init>(BasicEjbUnitSessionTest.java:49)
at com.agfa.hap.bpe.common.event.service.TestErrorGroupService.<init>(TestErrorGroupService.java:19)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at junit.framework.TestSuite.createTest(TestSuite.java:61)
at junit.framework.TestSuite.addTestMethod(TestSuite.java:283)
at junit.framework.TestSuite.<init>(TestSuite.java:146)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestLoader.getTest(JUnit3TestLoader.java:102)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestLoader.loadTests(JUnit3TestLoader.java:59)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:452)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: javax.persistence.PersistenceException: Unable to build EntityManagerFactory
at org.ejb3unit.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:677)
at org.ejb3unit.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:655)
at com.bm.utils.injectinternal.EntityManagerProvider.createEmFactory(EntityManagerProvider.java:188)
at com.bm.utils.injectinternal.EntityManagerProvider.<init>(EntityManagerProvider.java:59)
at com.bm.utils.injectinternal.EntityManagerProvider.<init>(EntityManagerProvider.java:31)
at com.bm.utils.injectinternal.InternalInjector.createInternalInjector(InternalInjector.java:53)
... 18 more
Caused by: org.ejb3unit.hibernate.HibernateException: Could not instantiate dialect class
at org.ejb3unit.hibernate.dialect.DialectFactory.buildDialect(DialectFactory.java:107)
at org.ejb3unit.hibernate.dialect.DialectFactory.buildDialect(DialectFactory.java:65)
at org.ejb3unit.hibernate.cfg.SettingsFactory.determineDialect(SettingsFactory.java:460)
at org.ejb3unit.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:155)
at org.ejb3unit.hibernate.cfg.Configuration.buildSettings(Configuration.java:2101)
at org.ejb3unit.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1325)
at org.ejb3unit.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:867)
at org.ejb3unit.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:669)
... 23 more
Caused by: java.lang.ClassCastException: org.hibernate.dialect.OracleDialect cannot be cast to org.ejb3unit.hibernate.dialect.Dialect
at org.ejb3unit.hibernate.dialect.DialectFactory.buildDialect(DialectFactory.java:101)
... 30 more
Could you send your
ejb3unit.properties
file?
I guess you set the Oracle dialect in that file.
Ok, my bad, I see you now have to use org.ejb3unit.hibernate.dialect.OracleDialect instead of org.hibernate.dialect.OracleDialect
tis issue can be closed