Hello Team, <@U03N1E342B0> My project is in a migr...
# help
p
Hello Team, @Tom My project is in a migration phase from spring-boot 2 to 3.2. We are using wiremock and webhook extension extensively in our project. The wiremock version we use is 2.27.2 and webhook extension version is 1.0.0. I don't want to go with the wiremock 3.0 migration now. What I could find from your github issues is that we can use wiremock-standalone fat jar for a workaround. So, I've replaced the wiremock dependency with wiremock-standalone version 2.7.2 But here I am getting compatibility issues with webhook extension. And if I check the release of webhook extension, after 1.0.0 it is 2.30.0 But I want to stick with the wiremock version 2.7.2. When I tried to start application with wiremock-standalone 2.7.2 and webhook extension 1.0.0, I am getting the following error. Can you please suggest a workaround for solving this ?
Copy code
Description:

An attempt was made to call a method that does not exist. The attempt was made from the following location:

    org.wiremock.webhooks.Webhooks.<init>(Webhooks.java:46)

The following method did not exist:

    'org.apache.http.impl.client.CloseableHttpClient com.github.tomakehurst.wiremock.http.HttpClientFactory.createClient()'

The calling method's class, org.wiremock.webhooks.Webhooks, was loaded from the following location:

    jar:file:/C:/Users/e5665964/.m2/repository/org/wiremock/wiremock-webhooks-extension/1.0.0/wiremock-webhooks-extension-1.0.0.jar!/org/wiremock/webhooks/Webhooks.class

The called method's class, com.github.tomakehurst.wiremock.http.HttpClientFactory, is available from the following locations:

    jar:file:/C:/Users/e5665964/.m2/repository/com/github/tomakehurst/wiremock-standalone/2.27.2/wiremock-standalone-2.27.2.jar!/com/github/tomakehurst/wiremock/http/HttpClientFactory.class
    jar:file:/C:/Users/e5665964/.m2/repository/com/github/tomakehurst/wiremock/2.21.0/wiremock-2.21.0.jar!/com/github/tomakehurst/wiremock/http/HttpClientFactory.class

The called method's class hierarchy was loaded from the following locations:

    com.github.tomakehurst.wiremock.http.HttpClientFactory: file:/C:/Users/e5665964/.m2/repository/com/github/tomakehurst/wiremock-standalone/2.27.2/wiremock-standalone-2.27.2.jar


Action:

Correct the classpath of your application so that it contains compatible versions of the classes org.wiremock.webhooks.Webhooks and com.github.tomakehurst.wiremock.http.HttpClientFactory
t
What do you anticipate the difficulty of upgrading to 3.0 being? Are you still on Java 8?
p
We are on Java 17. 3.0 upgradation can be taken as a future plan, because this project was developed by somebody else, and it uses so many custom template processors and so. Looks like it may take more efforts for that. So as of now we are thinking to make it work with any workarounds if available.
t
I suggest bumping to the 3.4.2 JAR and seeing what happens. There’s a good chance it’ll just work.
p
With the latest version of webhook-extension? We tried this combo, but as I said, it takes us to a list of errors.
t
It has the webhook extension built in
No need to add it separately
p
Using 3.0.0-beta-1 of wiremock standalone and 2.30.0 webhook extension is now helping me to start the application. Hope it will not give any runtime issues. And as you suggested, let me try with the latest wiremock,, maybe, I can use this chat thread to ask any queries regarding the upgrade ?
t
That’s what it’s here for 🙂
❤️ 1
Note - the group and artifact ID changed when we came out of beta, so the group is now
org.wiremock
and the artifact ID
wiremock-standalone
👍 1