2

When I attempt to start Tomcat with an associated war I get the following error:

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

I believe this may have to do with the Web Deployment Assembly but I am not sure what I am doing wrong. Also, where would we expect the jar that contains IOException to be in the War or wherever it should be?

Jeff
  • 1,513
  • 4
  • 18
  • 34
  • This might not be relevant, but have you gotten it to work before? If you have, try to clean the project and restart eclipse. That sometimes happens to me... EG. remove the project from the server, and see if it starts.. – Mr.Turtle May 11 '15 at 21:59
  • this is very odd since it says `IOException` in the unnamed package, instead of `java.io.IOException` as one would expect. something is really screwed up. – ZhongYu May 11 '15 at 22:12
  • What I just did was http://stackoverflow.com/questions/9820379/what-to-do-with-annotations-after-setting-metadata-complete-true-which-resolv -- can anyone explain why this worked? Because it seems to have. – Jeff May 12 '15 at 07:43

1 Answers1

0

It might be an issue with Java version. IOException is in Java since 1.6. But thats just a tip its a weird error

breakline
  • 5,776
  • 8
  • 45
  • 84