Hi! After Spring Boot 3.2 upgrade WireMock 3.3.1 n...
# help
j
Hi! After Spring Boot 3.2 upgrade WireMock 3.3.1 no longer works with JUnit 4.13.2:
Copy code
java.lang.IncompatibleClassChangeError: class org.eclipse.jetty.http2.server.HttpChannelOverHTTP2 has interface org.eclipse.jetty.server.HttpChannel as super class
Stacktrace in the thread.
Copy code
java.lang.IncompatibleClassChangeError: class org.eclipse.jetty.http2.server.HttpChannelOverHTTP2 has interface org.eclipse.jetty.server.HttpChannel as super class
	at java.base/java.lang.ClassLoader.defineClass1(Native Method)
	at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1012)
	at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150)
	at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:862)
	at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:760)
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:681)
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:639)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
	at org.eclipse.jetty.http2.server.AbstractHTTP2ServerConnectionFactory.<init>(AbstractHTTP2ServerConnectionFactory.java:82)
	at org.eclipse.jetty.http2.server.HTTP2ServerConnectionFactory.<init>(HTTP2ServerConnectionFactory.java:53)
	at org.eclipse.jetty.http2.server.HTTP2CServerConnectionFactory.<init>(HTTP2CServerConnectionFactory.java:53)
	at org.eclipse.jetty.http2.server.HTTP2CServerConnectionFactory.<init>(HTTP2CServerConnectionFactory.java:48)
	at com.github.tomakehurst.wiremock.jetty11.Jetty11HttpServer.createHttpConnector(Jetty11HttpServer.java:53)
	at com.github.tomakehurst.wiremock.jetty.JettyHttpServer.<init>(JettyHttpServer.java:89)
	at com.github.tomakehurst.wiremock.jetty11.Jetty11HttpServer.<init>(Jetty11HttpServer.java:44)
	at com.github.tomakehurst.wiremock.jetty.JettyHttpServerFactory.buildHttpServer(JettyHttpServerFactory.java:31)
	at com.github.tomakehurst.wiremock.WireMockServer.<init>(WireMockServer.java:81)
	at com.github.tomakehurst.wiremock.junit.WireMockRule.<init>(WireMockRule.java:36)
	at com.github.tomakehurst.wiremock.junit.WireMockRule.<init>(WireMockRule.java:32)
t
Have you tried standalone?
j
I have not.
t
Would definitely suggest that, in that case!
👌 1
👍 1
j
Ok, we'll take a look into that. Thanks!
👍 1
j
We have the same issue with spring boot 3.2 and wiremock 3.3.1
a
Is this being tracked somewhere? I experienced the same issue and would like to get notified once this is supported.
t
It is supported - just just the standalone JAR
a
Does this imply that the non-standalone will never work with it?
t
No, but there will always be times when you’ve got clashing versions of core dependencies between Spring and WireMock. Impossible to avoid when people are running a variety of Spring versions. So in those cases the standalone (shaded) JAR allows both sets of dependency versions to cohabit.
a
I see your point, I just don't want to run the standalone process and I have no rush to upgrade to Spring Boot 3.2. I am just interested to track when support will land in the non-standalone part - whenever that is.
t
You don’t have to run the standalone JAR as a process, just use it as a dependency
Nothing materially changes, other than that you have to download a bigger JAR file
a
Ah, I see, I did not know this and assumed that it always has to run separately. Then I surely give it a spin, thanks, Tom!
👍 1
j
I had to do this in order to fix this issue for me