[英]Fail to start application after deploy to tomcat
我有一个 linux vps,我已经安装了 tomcat 9,一切正常。 但是在我将 Java Spring MVC war 文件部署到 tomcat (我们称之为 example.war)之后,当我按下“开始” FAIL - Application at context path [/example] could not be started
时,它显示了一条消息:使用了 tomcat 管理器)。 我的 Java Spring 项目曾经由 tomcat 7 插件部署在我的家用电脑上。
java.lang.ClassNotFoundException: org.springframework.web.filter.CharacterEncodingFilter
基本上意味着您的应用程序的类路径中没有 class 可用。 此 class 是 jar spring-web-<YOUR_VERSION_OF_SPRING>.jar
的一部分
所以首先打开你的 WAR 文件并检查它是否在 WEB-INF/lib 文件夹中。 If it isn't the changes are that it was deployed into the lib folder of tomcat 7 (that works) and in tomcat 9 both on your linux machine and development PC there is no jar like this.
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.