我想在Eclipse上設置一個Web應用程序。我正在使用Tomcat 6.0和jdk 1.6.0_23。 出於某種原因,我得到這個錯誤:Log4jConfigListener無法找到 - 上下文無法啓動
SEVERE: Error configuring application listener of class org.springframework.web.util.Log4jConfigListener java.lang.ClassNotFoundException: org.springframework.web.util.Log4jConfigListener at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1645) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1491) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4078) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4630) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardHost.start(StandardHost.java:785) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445) at org.apache.catalina.core.StandardService.start(StandardService.java:519) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:581) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) Jan 24, 2011 11:44:08 AM org.apache.catalina.core.StandardContext listenerStart SEVERE: Error configuring application listener of class org.springframework.web.context.ContextLoaderListener java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1645) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1491) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4078) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4630) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardHost.start(StandardHost.java:785) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445) at org.apache.catalina.core.StandardService.start(StandardService.java:519) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:581) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
我檢查是否所有的圖書館已被添加到構建路徑,一切似乎是正確的。包含log4j-1.2.15.jar和所有必需的彈簧庫。
我很困惑,尤其是因爲該項目在另一臺計算機上工作正常。任何有關這個問題的幫助將不勝感激。
Naftal
你能列出你包含的庫嗎 – 2011-01-24 09:05:47
我使用的是Hibernate,所以我有hibernate庫,如hibernate-annotations.jar,hibernate3.jar等。但根據stacktrace,似乎我錯過了springframework librabries之一。我有這些春天圖書館: - spring.jar,spring-aop.jar,spring-aspects.jar,spring-beans.jar,spring-context.jar,spring-context-support.jar,spring-core.jar,spring -jdbc.jar,spring-test.jar,spring-web.jar,spring-webmvc.jar – 1000Suns 2011-01-24 09:08:55
確定那麼沒有彈簧罐,是嗎? – 2011-01-24 09:12:54