遭遇java.lang.NoClassDefFoundError:org/apache/tomcat/PeriodicEventListener
前天還正常的程式,今天忽然無法啟動了,MyEclipse的Console提醒我如下錯誤:
嚴重: Error deploying web application directory rttsbiz
java.lang.NoClassDefFoundError: org/apache/tomcat/PeriodicEventListener
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1817)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:872)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1325)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1083)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:981)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4042)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4348)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
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:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.lang.ClassNotFoundException: org.apache.tomcat.PeriodicEventListener
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
… 33 more
但是Console的報錯最容易讓人迷惑了,除了java.lang.NoClassDefFoundError: org/apache/tomcat/PeriodicEventListener一句感覺有實際意義外。
回想程式裡有定時任務,但前天還是正常的。網上搜尋一下,有的說少包,有的說要刪掉Webapp下的程式再重啟動Tomcat,前者不靠譜,後者試了無效。
後來想想,估計是昨天匯入一些別的包搞得。於是把前天備份解壓,再由MyEclipse匯入,結果就好了。好在有備份幫忙。
看來修改前備份的習慣一定要保持好,這在關鍵時刻可以省卻很多力氣。
本文轉自張昺華-sky部落格園部落格,原文連結:http://www.cnblogs.com/xiandedanteng/p/3330509.html,如需轉載請自行聯絡原作者
相關文章
- java.lang.NoClassDefFoundError: org/apache/ibatis/session/SqlSessionFactoryJavaErrorApacheBATSessionSQL
- Exception in thread “main“ java.lang.NoClassDefFoundError: org/apache/http/conn/socket/LayeredConnecExceptionthreadAIJavaErrorApacheHTTP
- spark讀取hive異常,java.lang.NoClassDefFoundError: org/apache/tez/dag/api/SessionNotRunningSparkHiveJavaErrorApacheAPISession
- Java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory 解決方案JavaErrorApache
- java.lang.NoClassDefFoundError: org/json/JSONObjectJavaErrorJSONObject
- 匯出Excel過程中遇到的問題java.lang.NoClassDefFoundError: org/apache/xmlbeans/XmlExceptionExcelJavaErrorApacheXMLBeanException
- 有熟悉org.apache.tomcat.util.threads.ThreadPool的朋友麼?ApacheTomcatthread
- The plugin 'org.apache.maven.plugins:maven-tomcat-plugin' does not exist or no vPluginApacheMavenTomcat
- is java.lang.NoClassDefFoundError: org/springframework/dao/support/DaoSupport錯誤原因JavaErrorSpringFramework
- 指令碼啟動tomcat專案當機問題 org.apache.coyote.AbstractProtocol pause指令碼TomcatApacheProtocol
- org.apache.shiro.authc.UsernamePasswordTokenApache
- 報錯:nested exception is java.lang.NoClassDefFoundError: org/fusesource/hawtbuf/UTF8BufferExceptionJavaError
- 使用 Apache OpenWebBeans 和 Apache Tomcat | JavalobbyApacheWebBeanTomcatJava
- Maven Web專案 java.lang.NoClassDefFoundError: org/springframework/core/NestedRuntimeException錯誤MavenWebJavaErrorSpringFrameworkException
- Apache Tomcat簡介ApacheTomcat
- apache tomcat 安裝ApacheTomcat
- apache +tomcat 橋接ApacheTomcat橋接
- tomcat報錯org.apache.catalina.core.ContainerBase.startInternal A child container failed during startTomcatApacheAI
- [tomcat]java.lang.NoClassDefFoundError: javax/el/ELResolver解決方案TomcatJavaError
- Http11: org.apache.coyote.http11HTTPApache
- org.apache.hadoop.hdfs.server.namenode.NameNode.ApacheHadoopServer
- 遭遇Tomcat遠端拒絕服務漏洞Tomcat
- linux+apache+tomcatLinuxApacheTomcat
- Apache tomcat 配置總結ApacheTomcat
- 配置Apache Server + Tomcat (轉)ApacheServerTomcat
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">報錯HTTPMavenApache
- Could not initialize class org.apache.xpath.compiler.FunctionTableApacheCompileFunction
- org.apache.kafka.common.network.SelectorApacheKafka
- Coyote for Http11: org.apache.coyote.http11HTTPApache
- org.apache.log4j日誌級別Apache
- org.apache.jasper.JasperException: java.math.BigDecimalApacheExceptionJavaDecimal
- apache和tomcat的區別ApacheTomcat
- apache+tomcat負載均衡ApacheTomcat負載
- apache+tomcat配置指南(轉)ApacheTomcat
- org.apache.jasper.JasperException: Unable to compile class for JSPApacheExceptionCompileJS
- Maven-org.apache.ibatis.binding.BindingExceptionMavenApacheBATException
- Unable to load bean: type:org.apache.struts2.views.gxp.inject.InjectedObjectContainer class:org.apacBeanApacheViewObjectAI
- Tomcat啟動錯誤一例org.apache.catalina.core.StandardContext resources Start Error starting static ResourcesTomcatApacheContextError