-
Notifications
You must be signed in to change notification settings - Fork 17
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
MetFragRest JAR file fails to run #96
Comments
Hi, I can confirm on an entirely different setup:
I tried a different port, and I tried to add a dependency (https://exerror.com/org-springframework-boot-context-embedded-embeddedservletcontainerexception-unable-to-start-embedded-tomcat-servlet-container/#h-solution-2-add-the-tomcat-dependency) to no avail. I have an inkling that we need to bump some spring dependency versions to 1) make it work, and 2) to get back from ancient to supported dependency versions. Just naively updating the |
I tried that as well. I think the issue with upgrading Without any new suggestions, it may be time for me to earnestly dive deep into the rabbit hole haha. |
I take back what I said! The above Dockerfile and docker command works! It wasn't working earlier because I forgot to uncomment out some code I was reviewing. |
Hi, great progress! A quick guess is that the REST is residing somewhere at |
Hi, maybe I can help here. According to my limited spring knowledge, this code tells us the location of the endpoint: MetFragRelaunched/MetFragRest/src/main/java/de/ipbhalle/metfragrest/MetFragRestController.java Line 56 in ed61649
Hope that helps a bit. Yours, Rene |
I looked around in the created Docker container and it appears that the reason it worked was because it failed to copy the JAR file into the image (I made a manual mistake). As such, when I did successfully run the JAR file, the same old error popped up (back to square one). I will try experimenting with using a tomee base image instead of a openjdk one. Thank you for the input! I will be sure to keep it in mind when I finally clear this first hurdle of getting the JAR to run. |
Been playing around with the pom.xml file to no avail. Some clues I got from digging round seem to suggest that a tomcat dependency (tomcat-embed-core 8.5.20) is not starting because of this following error: Googling this errors suggests that we need version 3.1.0 of javax.servlet:servlet-api but we are currently using 2.3.0
To the
|
I got a temporary solution! The ChemSpider dependency in MetFragLib requires javax.servlet-api version 2.3. I cannot seem to find the ChemSpider webservices JAR anywhere (I can't even figure out where Maven pulls the current JAR file from), is there a resource that I can be directed towards to see if I can get a more updated version of the dependency? This is so that I do not have to delete the entire function instead. TL;DR is that tomcat needs javax.servlet 3.1 but ChemSpider needs javax.servlet 2.3. Temporary solution is removing ChemSpider entirely from MetFragLib. Given more spare time I will see if I can find a better solution. |
Awesome ! two comments:
|
I created a PR of the changes I made to get MetFragRest to work. I see the new issue but only had the time to remove ChemSpider from MetFragLib. If there are issues to the PR, just comment on it in the PR itself and I can see what I can do. On the other hand, now that MetFragRest runs, I was wondering if the following output is what is intended (This is using the example query in the MetFragRest README):
Are there any ideas on how to retrieve those files mentioned in the JSON (that are in a docker container) from another docker container? |
In response to my previous question, I now understand the role of HATEOAS in the application. After reading the code, I am supposed to first send the request for processing. Unfortunately, it appears that the endpoints are not working properly. For example, when I try to check the status, this is the output:
It appears that it thinks the processID is |
Hello!
I have been trying to to use the MetFragRelaunched REST tool and dockerizing it for a project that I am working on. However, I cannot seem to run the compiled JAR file to run at all.
Generally, before I dockerize anything, I like to make sure everything works locally. In the project directory, I run the following commands:
The system specs are:
Unfortunately, this creates the following output:
Being relatively new to Java, I thought that this may be because of different language versions. As such, I went ahead with trying to dockerize the REST tool with the following Dockerfile:
I am using jdk-11 as that appeared to be the version used for the MetFragWeb tool.
I would then build the docker image and run it using this command (Docker 4.5.0):
docker build . -t metfragrest:dev && docker run -p 8090:8090 -it --rm --name metfragrest-test metfragrest:dev
However, the container would fail to run with the same output as above. I am looking for guidance on how to resolve this error and maybe have someone point out whatever mistake I am making because I believe that I am overlooking something but I cannot seem to figure out what. I have tried multiple different Java versions (for both the maven and java containers), but they would also fail. Earlier versions cannot even build the jar file.
Any sort of guidance is appreciated. @sneumann @meier-rene
Many thanks,
Justin
The text was updated successfully, but these errors were encountered: