Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Spring Boot to 3.2.1 #29

Merged
merged 1 commit into from
Jan 18, 2024
Merged

Upgrade Spring Boot to 3.2.1 #29

merged 1 commit into from
Jan 18, 2024

Conversation

3750
Copy link
Collaborator

@3750 3750 commented Jan 17, 2024

Updating dependencies of Spring Boot 3.2.1 caused some tests failing:

Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [pl.allegro.tech.hermes.mock.HermesMock]: Factory method 'getHermesMock' threw exception with message: class org.eclipse.jetty.http2.server.HttpChannelOverHTTP2 has interface org.eclipse.jetty.server.HttpChannel as super class
	at app//org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:177)
	at app//org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:651)
	... 35 more
Caused by: 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.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:80)
	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:75)
	at com.github.tomakehurst.wiremock.WireMockServer.<init>(WireMockServer.java:117)
	at pl.allegro.tech.hermes.mock.HermesMock.<init>(HermesMock.java:32)
	at pl.allegro.tech.hermes.mock.HermesMock$Builder.build(HermesMock.java:119)
	at pl.allegro.tech.workshops.testsparallelexecution.email.messagebroker.HermesMockConfig.getHermesMock(HermesMockConfig.groovy:12)
	at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:258)
	at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:331)
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:140)
	... 36 more

As described in wiremock/wiremock#2395:

As a workaround, we can replace the wiremock package by the standalone one ( org.wiremock:wiremock-standalone )

Unfortunately this was not enough in our case, because hermes-mock still had dependency to non-standalone wiremock.

This was changed in the recent release
https://github.com/allegro/hermes/releases/tag/hermes-2.5.5 (support for Spring Boot 3.2.1, wiremock replaced with the standalone version).

@3750 3750 enabled auto-merge January 17, 2024 15:16
@3750 3750 merged commit be2e2ab into main Jan 18, 2024
2 checks passed
@3750 3750 deleted the spring-boot-3.2.1 branch January 18, 2024 06:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants