Jiri Danek created ARTEMIS-1394:
-----------------------------------
Summary: Executing
org.apache.activemq.artemis.tests.timing.jms.bridge.impl.JMSBridgeImplTest
fails with java.lang.NoClassDefFoundError:
Lorg/apache/activemq/artemis/utils/ThreadLeakCheckRule
Key: ARTEMIS-1394
URL: https://issues.apache.org/jira/browse/ARTEMIS-1394
Project: ActiveMQ Artemis
Issue Type: Bug
Components: Broker
Affects Versions: 2.4.0
Environment: commit 53a9c9b47b8c64ff2c0f2c6be40a1cf5984e5e8b (HEAD ->
master, upstream/master)
Merge: 49ef04b6f d2dcf1bba
Author: Clebert Suconic <[email protected]>
Date: Wed Sep 6 10:30:13 2017 -0400
This closes #1513
Reporter: Jiri Danek
Priority: Minor
When attempting to run JMSBridgeImplTest, I get the following exception
{noformat}
java.lang.NoClassDefFoundError:
Lorg/apache/activemq/artemis/utils/ThreadLeakCheckRule;
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Class.java:2583)
at java.lang.Class.getDeclaredFields(Class.java:1916)
at org.junit.runners.model.TestClass.<init>(TestClass.java:49)
at org.junit.runners.ParentRunner.<init>(ParentRunner.java:75)
at
org.junit.runners.BlockJUnit4ClassRunner.<init>(BlockJUnit4ClassRunner.java:57)
at
org.junit.internal.builders.JUnit4Builder.runnerForClass(JUnit4Builder.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:26)
at
com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:49)
at
com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
at
com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
at
com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
Caused by: java.lang.ClassNotFoundException:
org.apache.activemq.artemis.utils.ThreadLeakCheckRule
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 15 more
Process finished with exit code 255
{noformat}
As a fix, I had to add
{code}
diff --git a/tests/timing-tests/pom.xml b/tests/timing-tests/pom.xml
index 7a7139af9..47b4a7751 100644
--- a/tests/timing-tests/pom.xml
+++ b/tests/timing-tests/pom.xml
@@ -65,6 +65,13 @@
<version>${project.version}</version>
</dependency>
<dependency>
+ <groupId>org.apache.activemq</groupId>
+ <artifactId>artemis-commons</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ <type>test-jar</type>
+ </dependency>
+ <dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-j2ee-connector_1.5_spec</artifactId>
</dependency>
{code}
I checked that this is enough to run all timing-tests in the project, and they
all either pass for me, or are skipped (AIOJournalImplTest).
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)