jenkins.util.MarkFindingOutputStream class is missing : Maven build not working in slave mode

Bug #1045795 reported by Yoann Dubreuil
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
jenkins (Ubuntu)
Fix Released
High
James Page

Bug Description

Maven build doesn't work in slave mode : the Maven build plugin requires the class jenkins.util.MarkFindingOutputStream to work but this class is not in the jenkins WAR built by Ubuntu. This class is present in the official build of Jenkins LTS 1.466.1

When i try to build a Maven project in a slave, i see this stacktrace :

Modules changed, recalculating dependency graph
FATAL: jenkins/util/MarkFindingOutputStream
java.lang.NoClassDefFoundError: jenkins/util/MarkFindingOutputStream
 at java.lang.ClassLoader.defineClass1(Native Method)
 at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
 at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
 at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
 at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
 at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
 at hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:655)
 at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:480)
 at hudson.model.Run.run(Run.java:1438)
 at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:477)
 at hudson.model.ResourceController.execute(ResourceController.java:88)
 at hudson.model.Executor.run(Executor.java:239)
Caused by: java.lang.ClassNotFoundException: jenkins.util.MarkFindingOutputStream
 at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
 ... 16 more

I dont understand why the MarkFindingOutputStream class in not present because the source file is in the source package in this folder : core/src/main/groovy/jenkins/util/MarkFindingOutputStream.java. The other source file present in this folder is ServerTcpPort and is correctly compiled and included in the WAR file of Jenkins.

Anyway, theses two files are in the wrong folder (groovy sources). Upstream fixed this : https://github.com/jenkinsci/jenkins/commit/2338b6682146e912c9a4d3769eff4864e487c427.

I think that the best thing to do is to move theses files in the right source folder.

Hope this helps,

Yoann.

Related branches

Revision history for this message
James Page (james-page) wrote :

Thanks for the bug report Yoann

I'd noticed this issue and had picked up on the ServerTcpPort.java file but had missed the other one.

Changed in jenkins (Ubuntu):
status: New → Triaged
importance: Undecided → High
assignee: nobody → James Page (james-page)
status: Triaged → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package jenkins - 1.466.1+dfsg-0ubuntu2

---------------
jenkins (1.466.1+dfsg-0ubuntu2) quantal; urgency=low

  * Fix maven based builds in slave mode (LP: #1045795):
    - d/rules: Copy all java files incorrectly located in groovy src
      folder to the correct location to fixup problem with missing
      class MarkFindingOutputStream.
 -- James Page <email address hidden> Wed, 05 Sep 2012 09:41:33 +0100

Changed in jenkins (Ubuntu):
status: In Progress → Fix Released
security vulnerability: no → yes
James Page (james-page)
security vulnerability: yes → no
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.