2 hwt52wy hwt52wy 于 2016.09.09 12:41 提问

tomcat启动时报错,希望能帮帮我谢谢

九月 09, 2016 12:34:23 下午 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
信息: Loaded APR based Apache Tomcat Native library 1.2.7 using APR version 1.5.2.
九月 09, 2016 12:34:23 下午 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
信息: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
九月 09, 2016 12:34:24 下午 org.apache.catalina.core.AprLifecycleListener initializeSSL
信息: OpenSSL successfully initialized (OpenSSL 1.0.2h 3 May 2016)
九月 09, 2016 12:34:24 下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["http-apr-8080"]
九月 09, 2016 12:34:24 下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["ajp-apr-8009"]
九月 09, 2016 12:34:24 下午 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 1698 ms
九月 09, 2016 12:34:24 下午 org.apache.catalina.core.StandardService startInternal
信息: Starting service Catalina
九月 09, 2016 12:34:24 下午 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat/8.0.36
九月 09, 2016 12:34:25 下午 org.apache.catalina.util.SessionIdGeneratorBase createSecureRandom
信息: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [111] milliseconds.
九月 09, 2016 12:34:25 下午 org.apache.jasper.servlet.TldScanner scanJars
信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
九月 09, 2016 12:34:25 下午 org.apache.catalina.core.StandardContext listenerStart
严重: Error configuring application listener of class org.springframework.web.context.ContextLoaderListener
java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1332)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1166)
at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:518)
at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:499)
at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:118)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4764)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5303)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1407)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1397)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)

九月 09, 2016 12:34:25 下午 org.apache.catalina.core.StandardContext listenerStart
严重: Error configuring application listener of class ict.monitor.collection.service.ServiceStartServletListener
java.lang.NoClassDefFoundError: org/apache/logging/log4j/LogManager
at ict.monitor.collection.DefaultCollection.(DefaultCollection.java:16)
at ict.monitor.collection.service.ServiceStartServletListener.(ServiceStartServletListener.java:14)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at java.lang.Class.newInstance(Class.java:379)
at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:119)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4764)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5303)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1407)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1397)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: org.apache.logging.log4j.LogManager
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1332)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1166)
... 17 more

九月 09, 2016 12:34:25 下午 org.apache.catalina.core.StandardContext listenerStart
严重: Skipped installing application listeners due to previous error(s)
九月 09, 2016 12:34:25 下午 org.apache.catalina.core.StandardContext startInternal
严重: One or more listeners failed to start. Full details will be found in the appropriate container log file
九月 09, 2016 12:34:25 下午 org.apache.catalina.core.StandardContext startInternal
严重: Context [/stewardweb] startup failed due to previous errors
九月 09, 2016 12:34:25 下午 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
警告: The web application [stewardweb] appears to have started a thread named [Timer-0] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
java.lang.Object.wait(Native Method)
java.lang.Object.wait(Object.java:503)
java.util.TimerThread.mainLoop(Timer.java:526)
java.util.TimerThread.run(Timer.java:505)
九月 09, 2016 12:34:25 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-apr-8080"]
九月 09, 2016 12:34:25 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["ajp-apr-8009"]
九月 09, 2016 12:34:25 下午 org.apache.catalina.startup.Catalina start
信息: Server startup in 1127 ms

这是我从别人那引入的工程,导入后出现上面错误,用的是eclipse,自动导入了好多jar包,请问我这个是什么错误,我自己导入了一个log4j-1.2.17.jar

7个回答

zihan11201120
zihan11201120   2016.09.09 12:48

java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
提示很明显了,目测是你的包没有导入完全.

meizhijie01
meizhijie01 应该是缺少包
大约一年之前 回复
hwt52wy
hwt52wy 怎么查看缺少哪些包?eclipse下不是自动导入jar包吗?谢谢
大约一年之前 回复
new_culture
new_culture   2016.09.09 12:58

应该是缺少包,导致找不到类。
http://www.cnblogs.com/xwdreamer/archive/2012/02/20/2359595.html

sinat_22659313
sinat_22659313   2016.09.09 13:44
cnsd_liuliu
cnsd_liuliu   2016.09.09 13:55

web.xml里面没有添加spring监听

图片说明

IT_LOSER
IT_LOSER   2016.09.09 14:02

缺少要导入的jar包,你在原项目下lib把jar包导进去

sfsunbo
sfsunbo   2016.09.09 14:32

缺少jar包的,报错找不到类,和监听器配置错误,你还是把原来人家的所有jar包全部拷过来!

O_Victorain
O_Victorain   2016.09.09 14:31

我想到两种方式:
第一种,进入eclipse的workspace,把相应JAR包copy到应用的lib文件夹下,在eclipse中刷新,并将jar包右键-->build pathh-->add to build path
第二种,打开tomcat安装目录,进入webapps文件夹,找到你要启动的项目,将jar报拷贝到\examples\WEB-INF\lib文件夹下。重启tomcat。
两种方式殊途同归,希望有所帮助。

Csdn user default icon
上传中...
上传图片
插入图片