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

Wiremock standalone 3: NoSuchMethodError #2621

Open
samuelstein opened this issue Mar 1, 2024 · 5 comments
Open

Wiremock standalone 3: NoSuchMethodError #2621

samuelstein opened this issue Mar 1, 2024 · 5 comments
Assignees
Labels

Comments

@samuelstein
Copy link

samuelstein commented Mar 1, 2024

Proposal

After switching maven artifact group from com.github.tomakehurst to org.wiremock the following exception occurred:

java.lang.NoSuchMethodError: 'void wiremock.org.eclipse.jetty.server.AbstractConnectionFactory.<init>(java.lang.String[])'

Reproduction steps

I'm using Spring Boot 3.2.2, JUnit 5 (4.2.21) and wiremock standalone 3.4.2.

References

The wiremock server is instanciated in a test class with the following annotation:
@SpringBootTest
@WireMockTest(httpPort = 80)

@samuelstein samuelstein added the bug label Mar 1, 2024
@vdonets-dev
Copy link

Have the same trouble, is it even compatible?

@leeturner
Copy link
Contributor

Hi, I am struggling to reproduce this using Spring Boot 3.2.2 and wiremock standalone 3.4.2. Do you have an example project that demonstrates this or more details of the tests you are running to help me diagnose the issue?

@leeturner leeturner self-assigned this May 10, 2024
@leeturner
Copy link
Contributor

Hi, we are planning on releasing 3.6.0 this week if possible. If you could come back with any additional information we might be able to look into this before the next release.

@samuelstein
Copy link
Author

With Spring boot 3.2.5, Java 21 and wiremock-standalone in version 3.5.4 the problem still exists in my project

@leeturner
Copy link
Contributor

Hi @samuelstein Many thanks for the update. I have updated my test project to the versions in your last comment and I still can't reproduce this issue. Would it be possible to post some code or an example project that demonstraites the issue so we can see what is happening for you?

Also, on a releated note, we now have a jetty 12 version of WireMock that should work with Spring Boot 3.x.x. I am not sure if you have tried this at all? The reason people were using WireMock Standalone with SB 3.x.x was because they updated to jetty 12 in the 3.x.x release of SB and WireMock was originally on jetty 11.

https://mvnrepository.com/artifact/org.wiremock/wiremock-jetty12/3.5.4

Example project here - https://github.com/wiremock/wiremock-examples/tree/main/spring-boot/spring-boot-3/wiremock-jetty-12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants