java.lang.NoClassDefFoundError: hudson/maven/MavenBuild

Jenkins JIRA | spong man | 3 years ago
  1. 0

    I had the 'mailer' plugin installed, but the maven plugin (a dependancy of the mailer plugin) was disabled. after a successful build the following exception was occurring: {code} SEVERE: Executor threw an exception java.lang.NoClassDefFoundError: hudson/maven/MavenBuild at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Unknown Source) at java.lang.Class.getDeclaredMethod(Unknown Source) at com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.getMethod(SerializationMethodInvoker.java:162) at com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.getMethod(SerializationMethodInvoker.java:167) at com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.getMethod(SerializationMethodInvoker.java:149) at com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.callWriteReplace(SerializationMethodInvoker.java:86) at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:99) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:88) at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeItem(AbstractCollectionConverter.java:64) at com.thoughtworks.xstream.converters.collections.CollectionConverter.marshal(CollectionConverter.java:55) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84) at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:223) at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:210) at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:182) at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:135) at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:167) at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:108) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43) at com.thoughtworks.xstream.core.TreeMarshaller.start(TreeMarshaller.java:82) at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.marshal(AbstractTreeMarshallingStrategy.java:37) at com.thoughtworks.xstream.XStream.marshal(XStream.java:898) at com.thoughtworks.xstream.XStream.marshal(XStream.java:887) at com.thoughtworks.xstream.XStream.toXML(XStream.java:860) at hudson.XmlFile.write(XmlFile.java:178) at hudson.model.Run.save(Run.java:1845) at hudson.model.Run.execute(Run.java:1732) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:231) Caused by: java.lang.ClassNotFoundException: hudson.maven.MavenBuild at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1365) at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1315) at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1068) at java.lang.ClassLoader.loadClass(Unknown Source) ... 37 more {code} this exception was causing the {{build.xml}} file to NOT be created. which caused the build to be removed from the build history after configuration was reloaded. there's at least two bugs here: 1) the mailer plugin should not cause exceptions if one of its dependencies is not enabled. either the dependency should be forced-enabled, or the mailer plugin should be disabled. 2) jenkins should *NEVER* fail to write a {{build.xml}} into the build directory. regardless of what plugins throw exceptions. a {{build.xml}} should *ALWAYS* be created. failure to create this file results in builds getting lost from the history, and at least 30 unsolved bug reports...

    Jenkins JIRA | 3 years ago | spong man
    java.lang.NoClassDefFoundError: hudson/maven/MavenBuild
  2. 0

    I had the 'mailer' plugin installed, but the maven plugin (a dependancy of the mailer plugin) was disabled. after a successful build the following exception was occurring: {code} SEVERE: Executor threw an exception java.lang.NoClassDefFoundError: hudson/maven/MavenBuild at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Unknown Source) at java.lang.Class.getDeclaredMethod(Unknown Source) at com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.getMethod(SerializationMethodInvoker.java:162) at com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.getMethod(SerializationMethodInvoker.java:167) at com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.getMethod(SerializationMethodInvoker.java:149) at com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.callWriteReplace(SerializationMethodInvoker.java:86) at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:99) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:88) at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeItem(AbstractCollectionConverter.java:64) at com.thoughtworks.xstream.converters.collections.CollectionConverter.marshal(CollectionConverter.java:55) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84) at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:223) at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:210) at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:182) at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:135) at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:167) at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:108) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43) at com.thoughtworks.xstream.core.TreeMarshaller.start(TreeMarshaller.java:82) at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.marshal(AbstractTreeMarshallingStrategy.java:37) at com.thoughtworks.xstream.XStream.marshal(XStream.java:898) at com.thoughtworks.xstream.XStream.marshal(XStream.java:887) at com.thoughtworks.xstream.XStream.toXML(XStream.java:860) at hudson.XmlFile.write(XmlFile.java:178) at hudson.model.Run.save(Run.java:1845) at hudson.model.Run.execute(Run.java:1732) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:231) Caused by: java.lang.ClassNotFoundException: hudson.maven.MavenBuild at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1365) at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1315) at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1068) at java.lang.ClassLoader.loadClass(Unknown Source) ... 37 more {code} this exception was causing the {{build.xml}} file to NOT be created. which caused the build to be removed from the build history after configuration was reloaded. there's at least two bugs here: 1) the mailer plugin should not cause exceptions if one of its dependencies is not enabled. either the dependency should be forced-enabled, or the mailer plugin should be disabled. 2) jenkins should *NEVER* fail to write a {{build.xml}} into the build directory. regardless of what plugins throw exceptions. a {{build.xml}} should *ALWAYS* be created. failure to create this file results in builds getting lost from the history, and at least 30 unsolved bug reports...

    Jenkins JIRA | 3 years ago | spong man
    java.lang.NoClassDefFoundError: hudson/maven/MavenBuild
  3. 0

    Marked all plugins for download and install after restart, then upgraded Jenkins to the latest version. All pages now show this exception. The Maven plugin wasn't even enabled beforehand. org.jvnet.hudson.reactor.ReactorException: java.lang.NoClassDefFoundError: hudson/maven/MavenBuild at org.jvnet.hudson.reactor.Reactor.execute(Reactor.java:246) at jenkins.InitReactorRunner.run(InitReactorRunner.java:43) at jenkins.model.Jenkins.executeReactor(Jenkins.java:915) at jenkins.model.Jenkins.<init>(Jenkins.java:811) at hudson.model.Hudson.<init>(Hudson.java:81) at hudson.model.Hudson.<init>(Hudson.java:77) at hudson.WebAppMain$3.run(WebAppMain.java:221) Caused by: java.lang.NoClassDefFoundError: hudson/maven/MavenBuild at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2475) at java.lang.Class.getDeclaredMethods(Class.java:1818) at org.jvnet.hudson.annotation_indexer.Index$2$1.fetch(Index.java:101) at org.jvnet.hudson.annotation_indexer.Index$2$1.hasNext(Index.java:71) at org.jvnet.hudson.annotation_indexer.FilterIterator.fetch(FilterIterator.java:23) at org.jvnet.hudson.annotation_indexer.FilterIterator.hasNext(FilterIterator.java:42) at hudson.init.TaskMethodFinder.discoverTasks(TaskMethodFinder.java:55) at hudson.init.InitializerFinder.discoverTasks(InitializerFinder.java:33) at hudson.PluginManager$2$1$3.run(PluginManager.java:388) at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:146) at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:259) at jenkins.model.Jenkins$7.runTask(Jenkins.java:904) at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:187) at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:94) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) at java.lang.Thread.run(Thread.java:680) Caused by: java.lang.ClassNotFoundException: hudson.maven.MavenBuild at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1365) at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1315) at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1068) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) ... 18 more

    Jenkins JIRA | 3 years ago | James Howe
    org.jvnet.hudson.reactor.ReactorException: java.lang.NoClassDefFoundError: hudson/maven/MavenBuild
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    It works fine with Jenkins 1.529, but after auto update to 1.530, it failed to load. Sep 25, 2013 9:57:05 AM jenkins.InitReactorRunner$1 onTaskFailed SEVERE: Failed Loading plugin disk-usage hudson.util.IOException2: Unable to load hudson.plugins.disk_usage.DiskUsagePlugin from disk-usage at hudson.ClassicPluginStrategy.load(ClassicPluginStrategy.java:352) at hudson.PluginManager$2$1$1.run(PluginManager.java:355) at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:146) at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:259) at jenkins.model.Jenkins$7.runTask(Jenkins.java:899) at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:187) at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:94) 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.NoClassDefFoundError: hudson/maven/MavenBuild at hudson.plugins.disk_usage.DiskUsagePlugin.<init>(DiskUsagePlugin.java:29) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at java.lang.Class.newInstance0(Unknown Source) at java.lang.Class.newInstance(Unknown Source) at hudson.ClassicPluginStrategy.load(ClassicPluginStrategy.java:346) ... 9 more Caused by: java.lang.ClassNotFoundException: hudson.maven.MavenBuild at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1365) at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1315) at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1068) at java.lang.ClassLoader.loadClass(Unknown Source) ... 17 more

    Jenkins JIRA | 3 years ago | Jaroc Xie
    hudson.util.IOException2: Unable to load hudson.plugins.disk_usage.DiskUsagePlugin from disk-usage
  6. 0

    [JENKINS-22051] build.xml not created after successful build - Jenkins JIRA

    jenkins-ci.org | 8 months ago
    java.lang.NoClassDefFoundError: hudson/maven/MavenBuild at java.lang. .getDeclaredMethods0(Native Method) at java.lang. .privateGetDeclaredMethods(Unknown Source) at java.lang. .getDeclaredMethod(Unknown Source)

    4 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

      hudson.maven.MavenBuild

      at org.apache.tools.ant.AntClassLoader.findClassInComponents()
    2. Ant
      AntClassLoader.loadClass
      1. org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1365)
      2. org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1315)
      3. org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1068)
      3 frames
    3. Java RT
      Class.getDeclaredMethod
      1. java.lang.ClassLoader.loadClass(Unknown Source)
      2. java.lang.Class.getDeclaredMethods0(Native Method)
      3. java.lang.Class.privateGetDeclaredMethods(Unknown Source)
      4. java.lang.Class.getDeclaredMethod(Unknown Source)
      4 frames
    4. XStream Core
      SerializationMethodInvoker.callWriteReplace
      1. com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.getMethod(SerializationMethodInvoker.java:162)
      2. com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.getMethod(SerializationMethodInvoker.java:167)
      3. com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.getMethod(SerializationMethodInvoker.java:149)
      4. com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.callWriteReplace(SerializationMethodInvoker.java:86)
      4 frames
    5. Hudson
      RobustReflectionConverter.marshal
      1. hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:99)
      1 frame
    6. XStream Core
      AbstractReferenceMarshaller$1.convertAnother
      1. com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
      2. com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
      3. com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43)
      4. com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:88)
      5. com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeItem(AbstractCollectionConverter.java:64)
      6. com.thoughtworks.xstream.converters.collections.CollectionConverter.marshal(CollectionConverter.java:55)
      7. com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
      8. com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
      9. com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)
      9 frames
    7. Hudson
      RobustReflectionConverter$2.visit
      1. hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:223)
      2. hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:210)
      3. hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:182)
      3 frames
    8. XStream Core
      PureJavaReflectionProvider.visitSerializableFields
      1. com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:135)
      1 frame
    9. Hudson
      RobustReflectionConverter.marshal
      1. hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:167)
      2. hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:108)
      2 frames
    10. XStream Core
      XStream.toXML
      1. com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
      2. com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
      3. com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43)
      4. com.thoughtworks.xstream.core.TreeMarshaller.start(TreeMarshaller.java:82)
      5. com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.marshal(AbstractTreeMarshallingStrategy.java:37)
      6. com.thoughtworks.xstream.XStream.marshal(XStream.java:898)
      7. com.thoughtworks.xstream.XStream.marshal(XStream.java:887)
      8. com.thoughtworks.xstream.XStream.toXML(XStream.java:860)
      8 frames
    11. Hudson
      Executor.run
      1. hudson.XmlFile.write(XmlFile.java:178)
      2. hudson.model.Run.save(Run.java:1845)
      3. hudson.model.Run.execute(Run.java:1732)
      4. hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      5. hudson.model.ResourceController.execute(ResourceController.java:88)
      6. hudson.model.Executor.run(Executor.java:231)
      6 frames