Issue Type: Bug Bug
Affects Versions: current
Assignee: Unassigned
Components: core, mailer, maven
Created: 05/Mar/14 11:39 PM
Description:

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:

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


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...

Environment: Microsoft Windows [Version 6.1.7601]

java version "1.7.0_40"
Java(TM) SE Runtime Environment (build 1.7.0_40-b43)
Java HotSpot(TM) 64-Bit Server VM (build 24.0-b56, mixed mode)
Project: Jenkins
Priority: Critical Critical
Reporter: spong man
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to