java.lang.NoClassDefFoundError: javax/servlet/AsyncListener

Spring JIRA | Dave Syer | 4 years ago
  1. 0

    Create a new web template project from the spring-framework-issues repo, and try and launch it in Tomcat 6. Or alternatively try and create an application context in a test case: {code} new GenericXmlApplicationContext("file:./src/main/webapp/WEB-INF/spring/servlet-context.xml"); {code} Stacktrace: {noformat} java.lang.NoClassDefFoundError: javax/servlet/AsyncListener at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) at java.lang.ClassLoader.defineClass(ClassLoader.java:615) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) at java.net.URLClassLoader.defineClass(URLClassLoader.java:283) at java.net.URLClassLoader.access$000(URLClassLoader.java:58) at java.net.URLClassLoader$1.run(URLClassLoader.java:197) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2427) at java.lang.Class.getDeclaredMethods(Class.java:1791) at org.springframework.core.type.StandardAnnotationMetadata.hasAnnotatedMethods(StandardAnnotationMetadata.java:159) at org.springframework.context.annotation.ConfigurationClassUtils.isLiteConfigurationCandidate(ConfigurationClassUtils.java:104) at org.springfram ... {noformat}

    Spring JIRA | 4 years ago | Dave Syer
    java.lang.NoClassDefFoundError: javax/servlet/AsyncListener
  2. 0

    Create a new web template project from the spring-framework-issues repo, and try and launch it in Tomcat 6. Or alternatively try and create an application context in a test case: {code} new GenericXmlApplicationContext("file:./src/main/webapp/WEB-INF/spring/servlet-context.xml"); {code} Stacktrace: {noformat} java.lang.NoClassDefFoundError: javax/servlet/AsyncListener at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) at java.lang.ClassLoader.defineClass(ClassLoader.java:615) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) at java.net.URLClassLoader.defineClass(URLClassLoader.java:283) at java.net.URLClassLoader.access$000(URLClassLoader.java:58) at java.net.URLClassLoader$1.run(URLClassLoader.java:197) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2427) at java.lang.Class.getDeclaredMethods(Class.java:1791) at org.springframework.core.type.StandardAnnotationMetadata.hasAnnotatedMethods(StandardAnnotationMetadata.java:159) at org.springframework.context.annotation.ConfigurationClassUtils.isLiteConfigurationCandidate(ConfigurationClassUtils.java:104) at org.springfram ... {noformat}

    Spring JIRA | 4 years ago | Dave Syer
    java.lang.NoClassDefFoundError: javax/servlet/AsyncListener
  3. 0

    NoClassDefFoundError when running Tests or Tomcat targets

    GitHub | 3 years ago | hoserdude
    java.lang.NoClassDefFoundError: org/springframework/beans/factory/NoUniqueBeanDefinitionException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Getting java.lang.ClassNotFoundException: javax.servlet.ServletContext in JUnit

    Stack Overflow | 3 years ago | coder
    java.lang.NoClassDefFoundError: javax/servlet/ServletContext
  6. 0

    NoUniqueBeanDefinitionException while testing dao test class in spring

    Stack Overflow | 4 years ago | jimmyreddevil
    java.lang.NoClassDefFoundError: org/springframework/beans/factory/NoUniqueBeanDefinitionException

  1. Andreas Häber 3 times, last 3 weeks ago
  2. linxiaolong 6 times, last 2 months ago
  3. poroszd 2 times, last 3 months ago
  4. aldrinleal 2 times, last 4 months ago
  5. davidvanlaatum 15 times, last 6 months ago
1 more registered users
84 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.NoClassDefFoundError

    javax/servlet/AsyncListener

    at java.lang.ClassLoader.defineClass1()
  2. Java RT
    Class.getDeclaredMethods
    1. java.lang.ClassLoader.defineClass1(Native Method)
    2. java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
    3. java.lang.ClassLoader.defineClass(ClassLoader.java:615)
    4. java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
    5. java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
    6. java.net.URLClassLoader.access$000(URLClassLoader.java:58)
    7. java.net.URLClassLoader$1.run(URLClassLoader.java:197)
    8. java.security.AccessController.doPrivileged(Native Method)
    9. java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    10. java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    11. sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    12. java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    13. java.lang.Class.getDeclaredMethods0(Native Method)
    14. java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
    15. java.lang.Class.getDeclaredMethods(Class.java:1791)
    15 frames
  3. Spring Core
    StandardAnnotationMetadata.hasAnnotatedMethods
    1. org.springframework.core.type.StandardAnnotationMetadata.hasAnnotatedMethods(StandardAnnotationMetadata.java:159)
    1 frame
  4. Spring Context
    ConfigurationClassUtils.isLiteConfigurationCandidate
    1. org.springframework.context.annotation.ConfigurationClassUtils.isLiteConfigurationCandidate(ConfigurationClassUtils.java:104)
    1 frame