-
Notifications
You must be signed in to change notification settings - Fork 165
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
ClassNotFoundException in rdf4j-server using Docker image #4742
Comments
I have noticed this same problem affects RDF4J Server when deployed directly in Tomcat 9. The server starts, but its rendered pages do not work. |
Possibly related to/caused by fixes for #4446 , which marked the javax.servlet jstl dependency as "provided". |
I just tested, and I can add that this affects the War files of all
I don't think this is a docker related issue, as I also confirmed that In summary, the latest working |
Could be relevant:
I assume that the docker images don't add the jstl jar file. @adamretter It should be possible to add the jstl jar file yourself to your own tomcat. Have you tried that? |
Adding the jstl jar file seems to have resolved the issue: #4814 @erikgb Could you give us some insight int0 why the jstl dependency in the pom.xml file is marked as provided? I know that tomcat with jakarta 10 should provide a tag lib implementation, but under a different uri. Since we are using the old sun uri then I'm not sure what we achieve by having the maven dependency marked as provided. I've only ever touched dedicated application servers while I was a student, and ever since then I've just used the integrated approach of spring-boot. Would the solution to the jstl issue be to have the maven dependency marked as compile? Or is it better to add the jstl jar file directly to the WEB-INF/lib directory as I've done in the PR above? |
@hmottestad Thanks for the ping. The idea here is that all Java/Jakarta EE dependencies should be provided by the Java/Jakarta EE runtime. That's why I think it's correct to set the dependencies to scope=provided. That will avoid potential duplicate classes in the runtime classpath that could cause issues. But there might be some exceptions to this, especially in the "not commonly used" Java/Jakarta EE artifacts like JSTL. Anyway, I think it's correct to declare the dependencies as provided and add missing jar's to the application server runtime - if required to. Hope this clarifies my stand a bit. |
Thanks for the quick reply. I'll add the jar file then, like in the PR. |
I haven't tried that, and likely won't just yet as I switched down to using version |
I've added the jstl jar to my own Tomcat image in order to test the solution by inserting the following line to my Dockerfile:
I can confirm that this solves the issue (using version |
Current Behavior
Requests to /rdf4j-server result in an internal server error (500) when using the Docker image eclipse/rdf4j-workbench. The root cause is "java.lang.ClassNotFoundException: javax.servlet.jsp.jstl.core.Config". Below is the server log:
localhost.2023-08-09.log
Expected Behavior
Requests to /rdf4j-server do not result in an error.
Steps To Reproduce
docker pull eclipse/rdf4j-workbench:4.3.5
docker run -d -p 8080:8080 -e JAVA_OPTS="-Xms1g -Xmx4g" -v data:/var/rdf4j -v logs:/usr/local/tomcat/logs eclipse/rdf4j-workbench:4.3.5
curl -L http://localhost:8080/rdf4j-server
Version
4.3.5
Are you interested in contributing a solution yourself?
None
Anything else?
No response
The text was updated successfully, but these errors were encountered: