Comments (3)
I tried adding the SLF4J dependency directly:
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.36</version>
</dependency>
And now get another NoClassDefFoundError
exception:
java.lang.NoClassDefFoundError: org/eclipse/jetty/util/thread/ThreadPool
at com.github.tomakehurst.wiremock.core.WireMockConfiguration.<init>(WireMockConfiguration.java:107)
at com.github.tomakehurst.wiremock.core.WireMockConfiguration.wireMockConfig(WireMockConfiguration.java:161)
at com.github.tomakehurst.wiremock.core.WireMockConfiguration.options(WireMockConfiguration.java:165)
at com.github.tomakehurst.wiremock.junit5.WireMockExtension.resolveOptions(WireMockExtension.java:192)
at com.github.tomakehurst.wiremock.junit5.WireMockExtension.startServerIfRequired(WireMockExtension.java:164)
at com.github.tomakehurst.wiremock.junit5.WireMockExtension.beforeAll(WireMockExtension.java:231)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
Suppressed: java.lang.NullPointerException: Cannot invoke "com.github.tomakehurst.wiremock.WireMockServer.isRunning()" because "this.wireMockServer" is null
at com.github.tomakehurst.wiremock.junit5.WireMockExtension.stopServerIfRunning(WireMockExtension.java:219)
at com.github.tomakehurst.wiremock.junit5.WireMockExtension.afterAll(WireMockExtension.java:257)
... 1 more
Caused by: java.lang.ClassNotFoundException: org.eclipse.jetty.util.thread.ThreadPool
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
... 7 more
from wiremock.
I suspect that, for me, WireMock isn't pulling in its dependencies.
This can be shown using mvn dependency:tree
to diff
3.4.2
and 3.5.1
:
--- io.blt:gregbot:jar:1.0-SNAPSHOT
+++ io.blt:gregbot:jar:1.0-SNAPSHOT
@@ -26,54 +26,4 @@
| +- net.bytebuddy:byte-buddy-agent:jar:1.14.12:test
| \- org.objenesis:objenesis:jar:3.3:test
+- org.mockito:mockito-junit-jupiter:jar:5.11.0:test
-\- org.wiremock:wiremock:jar:3.4.2:test
- +- org.eclipse.jetty:jetty-server:jar:11.0.20:test
- | +- org.eclipse.jetty:jetty-http:jar:11.0.20:test
- | +- org.eclipse.jetty:jetty-io:jar:11.0.20:test
- | \- org.eclipse.jetty.toolchain:jetty-jakarta-servlet-api:jar:5.0.2:test
- +- org.eclipse.jetty:jetty-servlet:jar:11.0.20:test
- | \- org.eclipse.jetty:jetty-security:jar:11.0.20:test
- +- org.eclipse.jetty:jetty-servlets:jar:11.0.20:test
- | \- org.eclipse.jetty:jetty-util:jar:11.0.20:test
- +- org.eclipse.jetty:jetty-webapp:jar:11.0.20:test
- | \- org.eclipse.jetty:jetty-xml:jar:11.0.20:test
- +- org.eclipse.jetty:jetty-proxy:jar:11.0.20:test
- | \- org.eclipse.jetty:jetty-client:jar:11.0.20:test
- +- org.eclipse.jetty.http2:http2-server:jar:11.0.20:test
- | \- org.eclipse.jetty.http2:http2-common:jar:11.0.20:test
- | \- org.eclipse.jetty.http2:http2-hpack:jar:11.0.20:test
- +- org.eclipse.jetty:jetty-alpn-server:jar:11.0.20:test
- +- org.eclipse.jetty:jetty-alpn-java-server:jar:11.0.20:test
- +- org.eclipse.jetty:jetty-alpn-java-client:jar:11.0.20:test
- +- org.eclipse.jetty:jetty-alpn-client:jar:11.0.20:test
- +- com.google.guava:guava:jar:33.0.0-jre:test
- | +- com.google.guava:failureaccess:jar:1.0.2:test
- | +- com.google.guava:listenablefuture:jar:9999.0-empty-to-avoid-conflict-with-guava:test
- | +- org.checkerframework:checker-qual:jar:3.41.0:test
- | +- com.google.errorprone:error_prone_annotations:jar:2.23.0:test
- | \- com.google.j2objc:j2objc-annotations:jar:2.8:test
- +- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.16.1:test
- +- org.apache.httpcomponents.client5:httpclient5:jar:5.3.1:test
- | \- org.apache.httpcomponents.core5:httpcore5-h2:jar:5.2.4:test
- +- org.xmlunit:xmlunit-core:jar:2.9.1:test
- | \- jakarta.xml.bind:jakarta.xml.bind-api:jar:2.3.3:test
- | \- jakarta.activation:jakarta.activation-api:jar:1.2.2:test
- +- org.xmlunit:xmlunit-legacy:jar:2.9.1:test
- +- org.xmlunit:xmlunit-placeholders:jar:2.9.1:test
- +- net.javacrumbs.json-unit:json-unit-core:jar:2.38.0:test
- | \- org.hamcrest:hamcrest-core:jar:2.2:test
- | \- org.hamcrest:hamcrest:jar:2.2:test
- +- com.jayway.jsonpath:json-path:jar:2.9.0:test
- | \- net.minidev:json-smart:jar:2.5.0:test
- | \- net.minidev:accessors-smart:jar:2.5.0:test
- +- org.ow2.asm:asm:jar:9.6:test
- +- net.sf.jopt-simple:jopt-simple:jar:5.0.4:test
- +- com.github.jknack:handlebars:jar:4.3.1:test
- +- com.github.jknack:handlebars-helpers:jar:4.3.1:test
- +- commons-fileupload:commons-fileupload:jar:1.5:test
- +- commons-io:commons-io:jar:2.15.1:test
- +- com.networknt:json-schema-validator:jar:1.3.3:test
- | +- com.ethlo.time:itu:jar:1.8.0:test
- | \- com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:jar:2.15.3:test
- | \- org.yaml:snakeyaml:jar:2.1:test
- \- org.slf4j:slf4j-api:jar:1.7.36:test
\ No newline at end of file
+\- org.wiremock:wiremock:jar:3.5.1:test
\ No newline at end of file
from wiremock.
Fixed in 3.5.2
from wiremock.
Related Issues (20)
- WireMock.stubFor(..) should have appropriate error description instead of unclear JsonException on 404 error code from non-WireMock server
- Relative date matching uses the system timezone
- Broken link in /Documentation / Using WireMock with Spring Boot HOT 1
- Fix matcher distance short-circuit biases HOT 1
- Allow scenario state to be scoped to arbitrary request attributes
- Version 3.5.3 of org.wiremock:wiremock-standalone references removed wiremock.org.apache.commons.io.IOUtils HOT 8
- Proxy - changing User-Agent with additionalProxyRequestHeaders stopped working after 3.2.0 HOT 1
- Include conditions in proxying functionality HOT 5
- xPath helper doesn't return result when XPath expression returns a single string item
- wiremock-jetty12: NullPointerException within WireMockHandlerDispatchingServlet (similar to #1224) HOT 1
- Failing while building wiremock-jre8-standalone version 2.31.0 using ./gradlew build (wiremock-jre8-standalone:2.31.0)
- Running tests in parallel with Wiremock 3.0.0 triggers random timing/concurrency issues HOT 2
- @RegisterExtension + WireMockExtension: Timing & state issues when using "static" HOT 4
- EqualsToJson has bad performance for big json with common keys occuring often HOT 4
- Handlebars helper - join
- Init / shutdown hooks for extensions
- Update org.xmlutil:xmlunit-core to Version 2.10.0 HOT 2
- Introduce a GUI for open source
- NPE on WireMockServer.getServeEvents when using a StubRequestFilter HOT 1
- Adding more jettyAcceptors seems to do nothing besides cause thread contention. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wiremock.