-
Bug
-
Resolution: Incomplete
-
Minor
-
None
I am using jenkins dependency for test purpose. When I run it with 'mvn integration-test' I faced with the next exception. As I understand this happens on jenkins shutdown step.
<dependency> <groupId>org.jenkins-ci.main</groupId> <artifactId>jenkins-test-harness</artifactId> <version>1.644</version> <scope>test</scope> <exclusions> <exclusion> <groupId>org.slf4j</groupId> <artifactId>slf4j-jdk14</artifactId> </exclusion> <exclusion> <groupId>org.slf4j</groupId> <artifactId>log4j-over-slf4j</artifactId> </exclusion> </exclusions> </dependency>
Exception in thread "Thread-9" Exception in thread "Thread-2" java.lang.BootstrapMethodError: java.lang.NoClassDefFoundError: org/eclipse/jetty/http/pathmap/MappedResource at org.eclipse.jetty.websocket.server.NativeWebSocketConfiguration.doStop(NativeWebSocketConfiguration.java:63) at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:89) at org.eclipse.jetty.util.component.ContainerLifeCycle.stop(ContainerLifeCycle.java:142) at org.eclipse.jetty.util.component.ContainerLifeCycle.doStop(ContainerLifeCycle.java:160) at org.eclipse.jetty.websocket.jsr356.ClientContainer.doStop(ClientContainer.java:205) at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:89) at org.eclipse.jetty.util.thread.ShutdownThread.run(ShutdownThread.java:138) Caused by: java.lang.NoClassDefFoundError: org/eclipse/jetty/http/pathmap/MappedResource2017-07-21T12:50:30.791+0300 [initandlisten] connection accepted from 127.0.0.1:53774 #11 (1 connection now open) [mongod output] ... 7 more Caused by: java.lang.ClassNotFoundException: org.eclipse.jetty.http.pathmap.MappedResource at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50) at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239) ... 7 more
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <artifactId>***</artifactId> <groupId>***</groupId> <version>0.1-SNAPSHOT</version> </parent> <artifactId>***</artifactId> <properties> <spring.boot.version>1.4.3.RELEASE</spring.boot.version> </properties> <dependencies> <!-- some custom dependencies as this is multi-module peoject --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <version>${spring.boot.version}</version> <scope>test</scope> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> <version>${spring.boot.version}</version> <scope>test</scope> <exclusions> <exclusion> <artifactId>log4j-over-slf4j</artifactId> <groupId>org.slf4j</groupId> </exclusion> <exclusion> <artifactId>logback-classic</artifactId> <groupId>ch.qos.logback</groupId> </exclusion> <exclusion> <artifactId>logback-core</artifactId> <groupId>ch.qos.logback</groupId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-test</artifactId> <version>${spring.boot.version}</version> <scope>test</scope> <exclusions> <exclusion> <artifactId>jackson-databind</artifactId> <groupId>com.fasterxml.jackson.core</groupId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.jenkins-ci.main</groupId> <artifactId>jenkins-test-harness</artifactId> <version>1.644</version> <scope>test</scope> <exclusions> <exclusion> <groupId>org.slf4j</groupId> <artifactId>slf4j-jdk14</artifactId> </exclusion> <exclusion> <groupId>org.slf4j</groupId> <artifactId>log4j-over-slf4j</artifactId> </exclusion> </exclusions> </dependency> <!-- This dependency was added in attempt to fix the problem --> <dependency> <groupId>org.eclipse.jetty</groupId> <artifactId>jetty-http</artifactId> <version>9.4.6.v20170531</version> </dependency> </dependencies> <repositories> <repository> <id>JenkinsReleases</id> <url>http://repo.jenkins-ci.org/releases/</url> </repository> </repositories> <build> <pluginManagement> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.1</version> <configuration> <source>${java.version}</source> <target>${java.version}</target> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <configuration> <excludes> <exclude>**/SomeTests.java</exclude> </excludes> <includes> <include>**/*SomeTests.java</include> </includes> </configuration> <executions> <execution> <id>integration-test</id> <goals> <goal>test</goal> </goals> <phase>integration-test</phase> <configuration> <excludes> <exclude>none</exclude> </excludes> <includes> <include>**/SomeTestUsingEmbeddedJenkins.java</include> </includes> </configuration> </execution> </executions> </plugin> </plugins> </pluginManagement> </build> </project>