java.lang.NoClassDefFoundError: hudson/Main (wrong name: Main)

Jenkins JIRA | ajuffinger | 7 years ago
  1. 0

    Whenever we need to restart tomcat hudson comes with a series of class not found exceptions when starting a maven job. Either hudson.EnvVars or hudson.Main - the classes are definetly in the classpach (checked WEB-INF/lib/hudson-core). After a number of restarts of tomcat (3-10) it sometimes works again. FATAL: Could not initialize class hudson.EnvVars java.lang.NoClassDefFoundError: Could not initialize class hudson.EnvVars at hudson.model.Computer.getEnvironment(Computer.java:736) at hudson.model.Run.getEnvironment(Run.java:1648) at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:663) at hudson.maven.MavenModuleSetBuild.getEnvironment(MavenModuleSetBuild.java:128) at hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:384) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:416) at hudson.model.Run.run(Run.java:1243) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:304) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:122) OR FATAL: hudson/Main (wrong name: Main) java.lang.NoClassDefFoundError: hudson/Main (wrong name: Main) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632) at java.lang.ClassLoader.defineClass(ClassLoader.java:616) 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:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1302) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233) at hudson.EnvVars.initMaster(EnvVars.java:223) at hudson.EnvVars.<clinit>(EnvVars.java:218) at hudson.model.Computer.getEnvironment(Computer.java:736) at hudson.model.Run.getEnvironment(Run.java:1648) at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:663) at hudson.maven.MavenModuleSetBuild.getEnvironment(MavenModuleSetBuild.java:128) at hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:384) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:416) at hudson.model.Run.run(Run.java:1243) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:304) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:122)

    Jenkins JIRA | 7 years ago | ajuffinger
    java.lang.NoClassDefFoundError: hudson/Main (wrong name: Main)
  2. 0

    Whenever we need to restart tomcat hudson comes with a series of class not found exceptions when starting a maven job. Either hudson.EnvVars or hudson.Main - the classes are definetly in the classpach (checked WEB-INF/lib/hudson-core). After a number of restarts of tomcat (3-10) it sometimes works again. FATAL: Could not initialize class hudson.EnvVars java.lang.NoClassDefFoundError: Could not initialize class hudson.EnvVars at hudson.model.Computer.getEnvironment(Computer.java:736) at hudson.model.Run.getEnvironment(Run.java:1648) at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:663) at hudson.maven.MavenModuleSetBuild.getEnvironment(MavenModuleSetBuild.java:128) at hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:384) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:416) at hudson.model.Run.run(Run.java:1243) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:304) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:122) OR FATAL: hudson/Main (wrong name: Main) java.lang.NoClassDefFoundError: hudson/Main (wrong name: Main) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632) at java.lang.ClassLoader.defineClass(ClassLoader.java:616) 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:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1302) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233) at hudson.EnvVars.initMaster(EnvVars.java:223) at hudson.EnvVars.<clinit>(EnvVars.java:218) at hudson.model.Computer.getEnvironment(Computer.java:736) at hudson.model.Run.getEnvironment(Run.java:1648) at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:663) at hudson.maven.MavenModuleSetBuild.getEnvironment(MavenModuleSetBuild.java:128) at hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:384) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:416) at hudson.model.Run.run(Run.java:1243) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:304) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:122)

    Jenkins JIRA | 7 years ago | ajuffinger
    java.lang.NoClassDefFoundError: hudson/Main (wrong name: Main)
  3. 0

    Deployment issues with Spring app in Tomcat 6.0

    Stack Overflow | 5 years ago | Alan Gairey
    java.lang.NoClassDefFoundError: org/springframework/context/MessageSourceAware
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Swagger with Jersey2.6

    GitHub | 2 years ago | vishakMetric
    java.lang.NoClassDefFoundError: com/wordnik/swagger/jaxrs/listing/ApiDeclarationProvider
  6. 0

    integrate gerrit with github

    Google Groups | 3 years ago | Ameya Varade
    java.lang.NoClassDefFoundError: com/google/inject/Provider

  1. kjhdofjosvs 3 times, last 3 weeks ago
  2. Luka 24 times, last 2 months ago
  3. andyglick 2 times, last 3 months ago
  4. tfr 8 times, last 4 months ago
  5. pnaranja 1 times, last 5 months ago
5 more registered users
90 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

    hudson/Main (wrong name: Main)

    at java.lang.ClassLoader.defineClass1()
  2. Java RT
    ClassLoader.loadClass
    1. java.lang.ClassLoader.defineClass1(Native Method)
    2. java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
    3. java.lang.ClassLoader.defineClass(ClassLoader.java:616)
    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:307)
    11. sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    12. java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    12 frames
  3. Glassfish Core
    WebappClassLoader.loadClass
    1. org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1302)
    2. org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
    2 frames
  4. Hudson
    AbstractBuild.getEnvironment
    1. hudson.EnvVars.initMaster(EnvVars.java:223)
    2. hudson.EnvVars.<clinit>(EnvVars.java:218)
    3. hudson.model.Computer.getEnvironment(Computer.java:736)
    4. hudson.model.Run.getEnvironment(Run.java:1648)
    5. hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:663)
    5 frames
  5. Hudson Maven Embedder
    MavenModuleSetBuild$RunnerImpl.doRun
    1. hudson.maven.MavenModuleSetBuild.getEnvironment(MavenModuleSetBuild.java:128)
    2. hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:384)
    2 frames
  6. Hudson
    Run.run
    1. hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:416)
    2. hudson.model.Run.run(Run.java:1243)
    2 frames
  7. Hudson Maven Embedder
    MavenModuleSetBuild.run
    1. hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:304)
    1 frame
  8. Hudson
    Executor.run
    1. hudson.model.ResourceController.execute(ResourceController.java:88)
    2. hudson.model.Executor.run(Executor.java:122)
    2 frames