Tomcat failing to deploy .war

前端 未结 2 1368
南旧
南旧 2020-12-16 11:45

I\'m trying to follow this tutorial on creating a simple REST web service, however I get to deploying it on tomcat and it throws an exception:

FAIL - Applica         


        
相关标签:
2条回答
  • 2020-12-16 12:15

    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)
    
    0 讨论(0)
  • 2020-12-16 12:29

    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.

    0 讨论(0)
提交回复
热议问题