Tomcat failing to deploy .war

女生的网名这么多〃 提交于 2019-11-29 03:15:35

As the above comment shows, the problem turned out to be that the application web.xml referenced a java class in a servlet definition. The problem was corrected by making sure the application actually contained that class. The missing jar file was located and put in the WEB-INF/lib directory.

I ran into a similar problem with getting ncwms to run on Apache Tomcat/8.5.38 apparently I needed to now add some extra java libraries that were removed in latest java version.

(see details here: How to resolve java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException in Java 9 )

The change was in this file: /opt/tomcat/bin/catalina.sh

JAVA_OPTS="$JAVA_OPTS $JSSE_OPTS --add-modules java.xml.bind"

But even this wasn't enough for ncwms. It ran into problems importing datasets later, so I reverted to a different version of java:

java -version
openjdk version "1.8.0_191"
OpenJDK Runtime Environment (build 1.8.0_191-8u191-b12-2ubuntu0.18.04.1-b12)
OpenJDK 64-Bit Server VM (build 25.191-b12, mixed mode)
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!