由于classnotfoundexception,Tomcat无法启动:ioexception

时间:2015-05-11 21:55:36

标签: java eclipse tomcat

当我尝试使用相关战争启动Tomcat时,我收到以下错误:

Caused by: java.lang.NoClassDefFoundError: IOException
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Class.java:2688)
    at java.lang.Class.getDeclaredMethods(Class.java:1962)
    at org.apache.catalina.util.Introspection.getDeclaredMethods(Introspection.java:127)
    at org.apache.catalina.startup.WebAnnotationSet.loadMethodsAnnotation(WebAnnotationSet.java:287)
    at org.apache.catalina.startup.WebAnnotationSet.loadApplicationFilterAnnotations(WebAnnotationSet.java:110)
    at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:64)
    at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:415)
    at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:892)
    at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:386)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
    at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5380)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    ... 6 more
Caused by: java.lang.ClassNotFoundException: IOException
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1720)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)
    ... 20 more

我认为这可能与Web部署程序集有关,但我不确定我做错了什么。另外,我们期望包含IOException的jar在战争中或者应该在哪里?

1 个答案:

答案 0 :(得分:0)

Java版本可能存在问题。从1.6开始,IOException就在Java中。但这仅仅是一个奇怪的错误