-
15. Re: DAO tests with Arquillian, class not found exception org.hibernate.ejb.HibernatePersistance
welocity Apr 20, 2013 12:04 PM (in response to bmajsak)Thanks for your reply.
I changed persistance extentions version to 1.0.0Alpha6 but i could'nt find Arquillian Core. After i deploye and test, i get the following error about jndi context:
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running com.procc.dao.AlertTest
avr. 20, 2013 4:39:56 PM com.procc.dao.AlertTest <init>
SEVERE: null
javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:307)
at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:344)
at javax.naming.InitialContext.lookup(InitialContext.java:411)
at javax.naming.InitialContext.doLookup(InitialContext.java:284)
at com.procc.dao.AlertTest.<init>(AlertTest.java:35)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at org.junit.runners.BlockJUnit4ClassRunner.createTest(BlockJUnit4ClassRunner.java:187)
at org.junit.runners.BlockJUnit4ClassRunner$1.runReflectiveCall(BlockJUnit4ClassRunner.java:236)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.BlockJUnit4ClassRunner.methodBlock(BlockJUnit4ClassRunner.java:233)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)
at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:236)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:134)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:113)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:103)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:74)
-
pom.xml 10.3 KB
-
-
16. Re: DAO tests with Arquillian, class not found exception org.hibernate.ejb.HibernatePersistance
bmajsak Apr 20, 2013 11:49 AM (in response to welocity)Arquillian core is just arquillian which you import through BOM. just change the version and please let me know of the result.
-
17. Re: DAO tests with Arquillian, class not found exception org.hibernate.ejb.HibernatePersistance
bmajsak Apr 22, 2013 7:47 AM (in response to bmajsak)Moved from Arquillian Development to Arquillian, as it's the place for such threads.
-
18. Re: DAO tests with Arquillian, class not found exception org.hibernate.ejb.HibernatePersistance
welocity Apr 22, 2013 8:10 AM (in response to bmajsak)I just deleted the project to start it over again.
Thanks for help.
-
19. Re: DAO tests with Arquillian, class not found exception org.hibernate.ejb.HibernatePersistance
bmajsak Apr 22, 2013 8:15 AM (in response to welocity)I would strongly recommend to start using JBoss Forge. It will make it way easier for you to set it up correctly.