Closed AronBuzogany closed 8 months ago
This looks like a dependency conflict between different versions of the Servlet API and Jetty
You will need to look at your full mvn dependency:tree
output to see what versions are being referenced (both directly and indirectly). Remember that closest dependency wins in Maven if you have multiple paths to the same dependency.
Once you've figured out where the multiple sources of Servlet API and/or Jetty dependencies are coming from you'll need to adjust your dependencies and/or exclusions appropriately.
The fact this this occurred when upgrading the wiremock
dependency suggests that the major version bump changes those transitive dependencies in some way. Bear in mind that Servlet 4 -> Servlet 5 was a breaking change with the package changing from javax.servlet
to jakarta.servlet
so if you have mixed versions of this in your dependency tree you'll run into errors like these.
org.wiremock:wiremock version 3.3.1 depends on Jetty11 which uses jakarta.servlet
.
Wiremock switched from Jetty 9 (package space javax.servlet
) to Jetty 11 (jakarta.servlet
) at 3.0.0.
The changelog below represents key changes between 2.35.0 and 3.0.0. ... 💥 Breaking changes ... Upgrade from Jetty 9 to Jetty 11 (Changelog)
Apache Jena Fuseki 4.6.1 uses Jetty 10 (javax.servlet
).
Jena is switching to jakarta.servlet
with Jena 5.0.0.
Thank you for the detailed explanation! Is there a way to make the 2 dependencies work with each other in this case? I tried looking at the dependency tree as suggested, but as the dependencies go under different names I do not know how to handle this.
The way the javax.servlet
=> jakarta.servlet
happens means they can't be mixed.
Anything else is modify and recompile one or other of the systems. In a non-production setting, you can try Jena 5 development (with all the consequences of running a development snapshot).
wiremock 3.0.0 was August this year.
Can you use wiremock 2 for now?
(And before you ask :smile: Jena5 is "sometime hopefully soon" - the project is all volunteer time.)
Closing question.
Version
4.6.1
Question
When switching from:
to
in my pom.xml and rebuilding my project I get the following error:
in
org.apache.jena.fuseki.Fuseki.setVerbose
I am using:
I tried different versions of javax.servlet, but none of them resolved the issue, nor did other Jena versions.
What does this error mean? How can I solve it?