This message was deleted.
# help
s
This message was deleted.
m
If I understand well now we are using jakarta instead of javax.
l
Hi. Are you using spring? If so what version of spring are you using ?
m
Hi yes, I'm using 3.1.4
after the migration my tests no longer work I was using
wiremock-jre8:2.35.2
but after I migrated spring to 3.1.4 my tests are not longer work I'm getting this issue with mi initial version 2.35.2
Copy code
java.lang.NoClassDefFoundError: javax/servlet/DispatcherType
according to this github issue, I have to use
com.github.tomakehurst:wiremock-jre8-standalone:2.35.0"
I tested with that version and others but always is getting this issue
Copy code
java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.reflection.ReflectionCache

Exception java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.vmplugin.v7.Java7 [in thread "main"]
seems adding the next library solve that issue
Copy code
org.codehaus.groovygroovy3.0.20
but after that I'm getting
Copy code
Caused by: java.lang.NoClassDefFoundError: javax/servlet/ServletOutputStream
the same issue ay the start of this thread 😞
@Tom Any solution or advice for me is welcome. thanks
l
I am driving at the moment but will try to take a look when I arrive.
t
I suggest switching to the standalone JAR in the first instance. I think you’ve probably got as javax vs. jakarta servlet clash, and using standalone will avoid this.
l
@Martin Edgar Albarracin Chinome sorry for the late reply. Been traveling for ages 😥 Tom summed it up with regard to switching to the standalone version of wiremock. This is the standalone version https://mvnrepository.com/artifact/org.wiremock/wiremock-standalone
m
Thanks all, I'm using
org.wiremock:wiremock-standalone:3.0.0
but I'm getting the same issue
Copy code
Caused by: java.lang.NoClassDefFoundError: javax/servlet/ServletOutputStream
t
Any reason you can't use 3.4.2?
m
Same issue 😞 using 3.4.2
Copy code
<dependency>
  <groupId>org.wiremock</groupId>
  <artifactId>wiremock-standalone</artifactId>
  <version>3.4.2</version>
  <scope>test</scope>
</dependency>
Caused by: java.lang.NoClassDefFoundError: javax/servlet/ServletOutputStream
t
Either this is something outside of WireMock or somehow you’re still getting the thin JAR on the classpath.
m
Hi all, thanks for your replies. yes you're right I discovered that one of my libraries was using javax instead of jakarta, after fixed this one I was able to run my project thanks a lot all.
👍 2
1129 Views