Jason Anderson
08/29/2023, 5:59 PM'com.github.tomakehurst:wiremock-standalone:2.27.2'
and 'de.mkammerer.wiremock-junit5:wiremock-junit5:1.1.0'
as dependencies.
I just updated my app to Spring boot 3.0.10 from 2.7.14 which drops support for javax and moves to jakarta and for my main application that was easy-enough to update. However, many tests still fail with:
LoggerFactory is not a Logback LoggerContext but Logback is on the classpath. Either remove Logback or the competing implementation (class org.slf4j.helpers.NOPLoggerFactory loaded from file:/Users/ME/.gradle/caches/modules-2/files-2.1/com.github.tomakehurst/wiremock-standalone/2.27.2/327647a19b2319af2526b9c33a5733a2241723e0/wiremock-standalone-2.27.2.jar). If you are using WebLogic you will need to add 'org.slf4j' to prefer-application-packages in WEB-INF/weblogic.xml: org.slf4j.helpers.NOPLoggerFactory
I've tried switching from 2.27.2 to various later beta versions (like 3.0.0-beta-10) which give different errors such as : java.lang.NoClassDefFoundError: Could not initialize class com.github.tomakehurst.wiremock.jetty9.JettyHttpServerFactory
Any help would be appreciated. I'm still pretty new to the Java world so I apologize if some of this is straight forward.Oleg Nenashev
08/29/2023, 6:59 PMCould not initialize class com.github.tomakehurst.wiremock.jetty9.JettyHttpServerFactory
definitely comes from WireMock 2.x and not 3.xJason Anderson
08/29/2023, 7:07 PMOleg Nenashev
08/29/2023, 7:13 PMJason Anderson
08/30/2023, 9:05 PMOleg Nenashev
08/31/2023, 4:14 AMJason Anderson
08/31/2023, 2:11 PMcom.github.tomakehurst:wiremock-standalone:2.27.2
⢠de.mkammerer.wiremock-junit5:wiremock-junit5:1.1.0
with com.maciejwalkowiak.spring:wiremock-spring-boot:1.0.1
.
I did have to make some changes in test code such as:
⢠@EnableWireMock
paired with @ConfigureWireMock
⢠Replacing @RegisterExtension
with @InjetWireMock
But that was about it.Oleg Nenashev
08/31/2023, 3:23 PM