java.lang.NoClassDefFoundError: javax/servlet/ServletException

SpringSource Issue Tracker | Tomasz Zarna | 4 years ago
  1. 0

    Steps: 1. New > Spring Template Project 2. Template: Spring MVC Project 3. Right click on the project, Maven > Update Project => {code} java.lang.NoClassDefFoundError: javax/servlet/ServletException at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$100(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Unknown Source) at java.lang.Class.getDeclaredMethods(Unknown Source) at org.springframework.core.type.StandardAnnotationMetadata.hasAnnotatedMethods(StandardAnnotationMetadata.java:159) at org.springframework.context.annotation.ConfigurationClassUtils.isLiteConfigurationCandidate(ConfigurationClassUtils.java:106) at org.springframework.context.annotation.ConfigurationClassUtils.checkConfigurationClassCandidate(ConfigurationClassUtils.java:87) at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:233) at org.springframework.ide.eclipse.metadata.process.JdtConfigurationClassPostProcessor.postProcess(JdtConfigurationClassPostProcessor.java:71) at org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig$4.run(BeansConfig.java:748) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig.executePostProcessor(BeansConfig.java:741) at org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig.postProcess(BeansConfig.java:625) at org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig.access$8(BeansConfig.java:584) at org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig$3.call(BeansConfig.java:450) at org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig$3.call(BeansConfig.java:1) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.ClassNotFoundException: javax.servlet.ServletException at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 34 more {code} First noticed in 3.2.0.M1, but reproduced in 3.1.0.RELEASE too.

    SpringSource Issue Tracker | 4 years ago | Tomasz Zarna
    java.lang.NoClassDefFoundError: javax/servlet/ServletException
  2. 0

    Steps: 1. New > Spring Template Project 2. Template: Spring MVC Project 3. Right click on the project, Maven > Update Project => {code} java.lang.NoClassDefFoundError: javax/servlet/ServletException at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$100(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Unknown Source) at java.lang.Class.getDeclaredMethods(Unknown Source) at org.springframework.core.type.StandardAnnotationMetadata.hasAnnotatedMethods(StandardAnnotationMetadata.java:159) at org.springframework.context.annotation.ConfigurationClassUtils.isLiteConfigurationCandidate(ConfigurationClassUtils.java:106) at org.springframework.context.annotation.ConfigurationClassUtils.checkConfigurationClassCandidate(ConfigurationClassUtils.java:87) at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:233) at org.springframework.ide.eclipse.metadata.process.JdtConfigurationClassPostProcessor.postProcess(JdtConfigurationClassPostProcessor.java:71) at org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig$4.run(BeansConfig.java:748) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig.executePostProcessor(BeansConfig.java:741) at org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig.postProcess(BeansConfig.java:625) at org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig.access$8(BeansConfig.java:584) at org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig$3.call(BeansConfig.java:450) at org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig$3.call(BeansConfig.java:1) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.ClassNotFoundException: javax.servlet.ServletException at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 34 more {code} First noticed in 3.2.0.M1, but reproduced in 3.1.0.RELEASE too.

    SpringSource Issue Tracker | 4 years ago | Tomasz Zarna
    java.lang.NoClassDefFoundError: javax/servlet/ServletException
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    krams::: Spring MVC 3.1, jqGrid, and Spring Data JPA Integration Guide (Part 1)

    blogspot.com | 2 months ago
    java.lang.NoClassDefFoundError: org/springframework/beans/factory/NoUniqueBeanDefinitionException
  5. 0

    ApplicationContext is always null

    Stack Overflow | 4 years ago | jonney
    java.lang.NoClassDefFoundError: javax/servlet/ServletException

  1. Andreas Häber 3 times, last 2 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.ClassNotFoundException

    javax.servlet.ServletException

    at java.net.URLClassLoader$1.run()
  2. Java RT
    Class.getDeclaredMethods
    1. java.net.URLClassLoader$1.run(Unknown Source)
    2. java.net.URLClassLoader$1.run(Unknown Source)
    3. java.security.AccessController.doPrivileged(Native Method)
    4. java.net.URLClassLoader.findClass(Unknown Source)
    5. java.lang.ClassLoader.loadClass(Unknown Source)
    6. java.lang.ClassLoader.loadClass(Unknown Source)
    7. java.lang.ClassLoader.defineClass1(Native Method)
    8. java.lang.ClassLoader.defineClass(Unknown Source)
    9. java.security.SecureClassLoader.defineClass(Unknown Source)
    10. java.net.URLClassLoader.defineClass(Unknown Source)
    11. java.net.URLClassLoader.access$100(Unknown Source)
    12. java.net.URLClassLoader$1.run(Unknown Source)
    13. java.net.URLClassLoader$1.run(Unknown Source)
    14. java.security.AccessController.doPrivileged(Native Method)
    15. java.net.URLClassLoader.findClass(Unknown Source)
    16. java.lang.ClassLoader.loadClass(Unknown Source)
    17. java.lang.ClassLoader.loadClass(Unknown Source)
    18. java.lang.Class.getDeclaredMethods0(Native Method)
    19. java.lang.Class.privateGetDeclaredMethods(Unknown Source)
    20. java.lang.Class.getDeclaredMethods(Unknown Source)
    20 frames
  3. Spring Core
    StandardAnnotationMetadata.hasAnnotatedMethods
    1. org.springframework.core.type.StandardAnnotationMetadata.hasAnnotatedMethods(StandardAnnotationMetadata.java:159)
    1 frame
  4. Spring Context
    ConfigurationClassPostProcessor.processConfigBeanDefinitions
    1. org.springframework.context.annotation.ConfigurationClassUtils.isLiteConfigurationCandidate(ConfigurationClassUtils.java:106)
    2. org.springframework.context.annotation.ConfigurationClassUtils.checkConfigurationClassCandidate(ConfigurationClassUtils.java:87)
    3. org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:233)
    3 frames
  5. org.springframework.ide
    BeansConfig$4.run
    1. org.springframework.ide.eclipse.metadata.process.JdtConfigurationClassPostProcessor.postProcess(JdtConfigurationClassPostProcessor.java:71)
    2. org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig$4.run(BeansConfig.java:748)
    2 frames
  6. Eclipse Core
    SafeRunner.run
    1. org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    1 frame
  7. org.springframework.ide
    BeansConfig$3.call
    1. org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig.executePostProcessor(BeansConfig.java:741)
    2. org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig.postProcess(BeansConfig.java:625)
    3. org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig.access$8(BeansConfig.java:584)
    4. org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig$3.call(BeansConfig.java:450)
    5. org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig$3.call(BeansConfig.java:1)
    5 frames
  8. Java RT
    Thread.run
    1. java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    2. java.util.concurrent.FutureTask.run(Unknown Source)
    3. java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    4. java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    5. java.util.concurrent.FutureTask.run(Unknown Source)
    6. java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    7. java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    8. java.lang.Thread.run(Unknown Source)
    8 frames