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

Resolve Servlet Dependency Clash in Docker Containers #132

Open
janothan opened this issue Oct 6, 2021 · 0 comments
Open

Resolve Servlet Dependency Clash in Docker Containers #132

janothan opened this issue Oct 6, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@janothan
Copy link
Member

janothan commented Oct 6, 2021

Describe the bug

Error message:

java.lang.NoSuchMethodError:  javax.servlet.ServletContext.createServlet(Ljava/lang/Class;)Ljavax/servlet/Servlet

The existence of two servlet-api dependencies in the docker container may lead to a problem on some machines.

[INFO] +- com.github.dwslab.melt:receiver-http:jar:master-SNAPSHOT:compile
[INFO] |  +- org.eclipse.jetty:jetty-servlet:jar:9.4.34.v20201102:compile
[INFO] |  |  \- org.eclipse.jetty:jetty-security:jar:9.4.34.v20201102:compile
[INFO] |  |     \- org.eclipse.jetty:jetty-server:jar:9.4.34.v20201102:compile
[INFO] |  |        \- javax.servlet:javax.servlet-api:jar:3.1.0:compile
[INFO] |  \- org.eclipse.jetty:jetty-servlets:jar:9.4.34.v20201102:compile
[INFO] \- com.github.dwslab.melt:matching-eval:jar:master-SNAPSHOT:test
[INFO]    \- com.github.dwslab.melt:matching-jena-matchers:jar:master-SNAPSHOT:test
[INFO]       \- org.gradoop.famer:famer-clustering:jar:0.1.0-SNAPSHOT:test
[INFO]          \- org.gradoop:gradoop-flink:jar:0.6.0:test
[INFO]             \- org.apache.flink:flink-shaded-hadoop-2:jar:2.6.5-9.0:test
[INFO]                \- javax.servlet:servlet-api:jar:2.5:test

To Reproduce
There is no known way to reproduce this error since affected containers work on some machines (and do not work on others). For now we could not identify the reason.

Expected behavior
No exception.

Interim Solution
https://dwslab.github.io/melt/faq#evaluation-of-a-docker-based-matcher-javalangnosuchmethoderror-javaxservletservletcontextcreateservlet

@janothan janothan added the bug Something isn't working label Oct 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant