找到了org.springframework.web.servlet.DispatcherServlet,但缺少另一个必需的类

时间:2016-10-06 03:01:37

标签: java spring maven spring-mvc servlets

EAR包部署到WAS8.5.5.7。 UI可以显示。但是,当UI尝试触发Java函数时,我会得到以下响应。

Error 404: javax.servlet.UnavailableException: SRVE0203E: Servlet [rrbapp]: org.springframework.web.servlet.DispatcherServlet was found, but is missing another required class.

SRVE0206E: This error typically implies that the servlet was originally compiled with classes which cannot be located by the server.

SRVE0187E: Check your class path to ensure that all classes required by the servlet are present.SRVE0210I: This problem can be debugged by recompiling the servlet using only the classes in the application's runtime class path

SRVE0234I: Application class path=[/opt/WebSphere85/profiles/appprofile/installedApps/wascell/abcapp.ear/cn-abc-web-app-1.0.0.war/WEB-INF/classes:
/opt/WebSphere85/profiles/appprofile/installedApps/wascell/rrbapp.ear/cn-abc-web-app-1.0.0.war/WEB-INF/lib/cn-abc-domain-1.0.0.jar:
/opt/WebSphere85/profiles/appprofile/installedApps/wascell/rrbapp.ear/cn-abc-web-app-1.0.0.war/WEB-INF/lib/cn-abc-db-object-1.0.0.jar:
/opt/WebSphere85/profiles/appprofile/installedApps/wascell/rrbapp.ear/cn-abc-web-app-1.0.0.war/WEB-INF/lib/cn-abc-web-1.0.0.jar:
/opt/WebSphere85/profiles/appprofile/installedApps/wascell/rrbapp.ear/cn-abc-web-app-1.0.0.war/WEB-INF/lib/commons-logging-1.2.jar:
....

2 个答案:

答案 0 :(得分:0)

它看起来是一个Jar依赖项错误,如果您尝试运行mvn clean install,它应该可以解决您的问题。 运行此命令并尝试重新部署

答案 1 :(得分:0)

添加" slf4j-log4j12" jar在我的包中,它可以工作没有这个错误。我认为原因是,如果没有这个jar在服务器中,日志就无法打印,所以程序在开始时停止。