tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jack Bounds <Jack.Bou...@googlemail.com>
Subject Running Junit Test in IntelliJ (ChatBeanTest)
Date Tue, 15 Sep 2015 13:56:10 GMT
Hi TomEE guys!

I introduced myself to TomEE (tomee-plus-1.7.2) and Eclipse (Neon Milestone
1 (4.6.0M1)). I successfully worked on couple of helpful examples from
"Examples Trunk" and got everything running just fine, including the junit
based tests.

Then I switched to IntelliJ (14.1.4) and still almost running fine, exept
the junit based tests, e.g. ChatBeanTest. Added junit-4.12.jar and
hamcrest-core-1.3.jar as external libraries to the project. Both appear in
the project's "..\artifacts\ChatBean_war_exploded\WEB-INF\lib" directory.
Additionally added small test servlets which make use of the provided
example MDBs are working fine.
I am not using Maven. All projects were made from scratch.

But running the ChatBeanTest class fails in IntelliJ and gives me:

java.lang.NoClassDefFoundError: javax/jms/Destination
	at java.lang.Class.getDeclaredMethods0(Native Method)
	at java.lang.Class.privateGetDeclaredMethods(Class.java:2693)
	at java.lang.Class.privateGetMethodRecursive(Class.java:3040)
	at java.lang.Class.getMethod0(Class.java:3010)
	at java.lang.Class.getMethod(Class.java:1776)
	at
org.junit.internal.builders.SuiteMethodBuilder.hasSuiteMethod(SuiteMethodBuilder.java:18)
	at
org.junit.internal.builders.SuiteMethodBuilder.runnerForClass(SuiteMethodBuilder.java:10)
	at
org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
	at
org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26)
	at
org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
	at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:33)
	at
com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:41)
	at
com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:212)
	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:68)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)
Caused by: java.lang.ClassNotFoundException: javax.jms.Destination
	at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

I am stuck here and have not a single clue.

Thanks for any help
Regards
Jack



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/Running-Junit-Test-in-IntelliJ-ChatBeanTest-tp4676212.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Mime
View raw message