eurostat / searoute

Compute shortest maritime routes between ports

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to run in tomcat : java.util.MissingResourceException

patsch opened this issue · comments

I followed all the instruction to build Searoutes with maven - and mvn clean install as well as the mvn clean package ran through successfully and produced the searoute-war.war file. I used Maven 3.6.3 and JDK 9.0.4, then deployed to Tomcat 10.0.2

All went well, and I get the API description ("Maritime route estimation..") up at

http://localhost:8080/searoute-war

But when I try to test the API with

http://localhost:8080/searoute-war/seaws?opos=5.3,43.3&dpos=121.8,31.2

I get this error:

HTTP Status 500 – Internal Server Error

Type Exception Report

Message Error instantiating servlet class [eu.europa.ec.eurostat.searoute.SeaRouteWS]

Root Cause

java.util.MissingResourceException: Can't find bundle for base name javax.servlet.LocalStrings, locale en
	java.base/java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:2045)
	java.base/java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1679)
	java.base/java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1583)
	java.base/java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1546)
	java.base/java.util.ResourceBundle.getBundle(ResourceBundle.java:838)
	javax.servlet.GenericServlet.<clinit>(GenericServlet.java:95)

Any suggestions what would cause this? I found a hint somewhere that said to include this in the pom.xml file:

<dependency>
  <groupId>javax.servlet</groupId>
  <artifactId>javax.servlet-api</artifactId>
  <version>3.1.0</version>
</dependency>

But that didn't seem to make any difference after I re-built the war file.

Looks like with the latest servlet API going from Oracle to Eclipse the servlet API has moved on from javax.servlet to jakarta.servlet...which is I presume where the problem is coming from...