我已经浏览了类似的问题,但没有提出任何问题,所以就这样吧。我安装了 Tomcat 7,然后用 maven 编译了 PetClinic 应用程序。我成功地将它部署到Tomcat。我已经取消部署并重新编译了war文件并部署了它,现在它抛出错误FAIL - 无法启动上下文路径/petclinic的应用程序。这是日志文件的前几行。请指教。谢谢。
Sep 23, 2012 2:21:10 PM org.apache.catalina.core.ApplicationContext log
INFO: Closing Spring root WebApplicationContext
Sep 23, 2012 2:21:10 PM org.apache.catalina.core.StandardContext listenerStop
SEVERE: Exception sending context destroyed event to listener instance of class org.springframework.web.context.ContextLoaderListener
java.lang.NoClassDefFoundError: org/apache/log4j/LogManager$PrivateManager
at org.apache.log4j.LogManager.getLogger(LogManager.java:34)
at org.slf4j.impl.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:73)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:209)
at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:155)
at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:131)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:272)
at org.springframework.web.context.ContextCleanupListener.<clinit>(ContextCleanupListener.java:43)
at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:80)
at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4831)
at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5478)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:160)
at org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1255)
at org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:714)
at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:219)