https://linen.dev logo
#help
Title
# help
j

Jackie chen

02/04/2024, 6:02 AM
Hello All I am using Java 17 with Wiremock 3.3.1 but i am getting an error when i try to start up Wiremock server via SpringBoot. Could you suggest? java.lang.NoClassDefFoundError: jakarta/servlet/DispatcherType\n\tat com.github.tomakehurst.wiremock.jetty.JettyHttpServerFactory.buildHttpServer(JettyHttpServerFactory.java:31)\n\tat com.github.tomakehurst.wiremock.WireMockServer.<init>(WireMockServer.java:81
l

Lee Turner

02/04/2024, 4:47 PM
This is probably to do with the fact that Spring Boot 3.x.x ships with jetty 12 and wiremock ships with jetty 11. I think you can work around this if you update your dependency to the wiremock standalone version.
We have an issue open about this - https://github.com/wiremock/wiremock/issues/2513 And we are also looking into how we can support both jetty 11 and jetty 12
85 Views