Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-19251

After upgrade from 1.519 to 1.526 -> NumberFormatException occurs during maven 3 build

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • maven-plugin

      Builds of type Maven2/3 Build.

      Started by timer
      [EnvInject] - Loading node environment variables.
      Building remotely on KO.LINUX.05 in workspace XXXx
      
      Cleaning up /var/lib/jenkins/workspace/fb_g3his.tea.wma-root_deploy/.
      
      Updating XXXXXX/wma.3.1.x-fb/wma-root at revision '2013-08-18T22:00:13.715 +0200'
      At revision 134474
      
      no change for http://XXXXXX/wma.3.1.x-fb/wma-root since the previous build
      
      Parsing POMs
      
      Downloaded artifacts..... 
      
      [wma-root_deploy] $ /var/lib/jenkins/tools/jdk/jdk1.6.0_45/bin/java -Xmx580M -cp /var/lib/jenkins/maven3-agent.jar:/var/lib/jenkins/tools/maven/apache-maven-3.0.4/boot/plexus-classworlds-2.4.jar org.jvnet.hudson.maven3.agent.Maven3Main /var/lib/jenkins/tools/maven/apache-maven-3.0.4 /var/lib/jenkins/slave.jar /var/lib/jenkins/maven3-interceptor.jar /var/lib/jenkins/maven3-interceptor-commons.jar 48798
      Exception in thread "main" java.lang.NumberFormatException: For input string: "/var/lib/jenkins/maven3-interceptor-commons.jar"
      	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
      	at java.lang.Integer.parseInt(Integer.java:449)
      	at java.lang.Integer.parseInt(Integer.java:499)
      	at org.jvnet.hudson.maven3.agent.Maven3Main.main(Maven3Main.java:65)
      
      ERROR: Failed to launch Maven. Exit code = 1
      An attempt to send an e-mail to empty list of recipients, ignored.
      Notifying upstream projects of job completion
      Finished: FAILURE
      
      

      Other info:

      • What is funny that upgrade was done on Friday -> builds were working throught weekend without any biggers problems, on Monday this bug appears.
      • it affects about 50% of builds of most projects - undeterministic ...
        When builds passed corresponding maven line has the different numbers or arguments - without "/var/lib/jenkins/maven3-interceptor-commons.jar"
      [wma-root_deploy] $ /var/lib/jenkins/tools/jdk/jdk1.6.0_45/bin/java -Xmx580M -cp /var/lib/jenkins/maven3-agent.jar:/var/lib/jenkins/tools/maven/apache-maven-3.0.4/boot/plexus-classworlds-2.4.jar org.jvnet.hudson.maven3.agent.Maven3Main /var/lib/jenkins/tools/maven/apache-maven-3.0.4 /var/lib/jenkins/slave.jar /var/lib/jenkins/maven3-interceptor.jar 46450
      
      • when I rollback to 1.519 its gone
      • after week once again upgraded but to 1.527 and the same bug shown
      • rollback to 1.519 helped..

      I can deliver more info just need to know what...

          [JENKINS-19251] After upgrade from 1.519 to 1.526 -> NumberFormatException occurs during maven 3 build

          Piotr Kania added a comment -

          I have found workaround - https://groups.google.com/forum/#!msg/jenkinsci-users/WZMl_zLBH5Y/YphIW_Eu9uYJ
          Just disconnected slave node from Jenkins master, removed all maven*.jar files and slave.jar in jenkins home directory on slave machine. Then connected slave node.
          The root cause of the problem is too many arguments passed to instance of org.jvnet.hudson.maven3.agent.Maven3Main. It expects a number as fourth argument:

          public static void main(String[] args) throws Exception {
          		main(new File(args[0]), new File(args[1]),new File(args[2]),
          				Integer.parseInt(args[3]));		
          }
          

          It seems the command line to execute on slave is constructed incorrectly.

          Piotr Kania added a comment - I have found workaround - https://groups.google.com/forum/#!msg/jenkinsci-users/WZMl_zLBH5Y/YphIW_Eu9uYJ Just disconnected slave node from Jenkins master, removed all maven*.jar files and slave.jar in jenkins home directory on slave machine. Then connected slave node. The root cause of the problem is too many arguments passed to instance of org.jvnet.hudson.maven3.agent.Maven3Main. It expects a number as fourth argument: public static void main( String [] args) throws Exception { main( new File(args[0]), new File(args[1]), new File(args[2]), Integer .parseInt(args[3])); } It seems the command line to execute on slave is constructed incorrectly.

          Jesse Glick added a comment -

          I presume this is a regression from JENKINS-16261 though I am not yet sure how to reproduce or what the real issue is.

          Jesse Glick added a comment - I presume this is a regression from JENKINS-16261 though I am not yet sure how to reproduce or what the real issue is.

          Jesse Glick added a comment -

          Correction, JENKINS-16261 was in 1.530, whereas this was reported in 1.526, so related to the Maven 3.1.0 support.

          Jesse Glick added a comment - Correction, JENKINS-16261 was in 1.530, whereas this was reported in 1.526, so related to the Maven 3.1.0 support.

          Olivier Lamy added a comment - - edited

          Does it mean jars are NOT correctly copied to slaves on startup?

          Olivier Lamy added a comment - - edited Does it mean jars are NOT correctly copied to slaves on startup?

          Jesse Glick added a comment -

          That is what I have not figured out. It appears that the problem is that an old version of maven3-agent.jar is being run with the new list of arguments, but the question is why the JAR was not refreshed. I immediately suspected my own JENKINS-16261 but then realized that the bug was originally reported several releases before that change.

          Even if the root cause cannot be determined, if we assume the proximate cause is correct—that an old maven3-agent.jar is being used—a simple fix would be to change the name of the JAR.

          Jesse Glick added a comment - That is what I have not figured out. It appears that the problem is that an old version of maven3-agent.jar is being run with the new list of arguments, but the question is why the JAR was not refreshed. I immediately suspected my own JENKINS-16261 but then realized that the bug was originally reported several releases before that change. Even if the root cause cannot be determined, if we assume the proximate cause is correct—that an old maven3-agent.jar is being used—a simple fix would be to change the name of the JAR.

          We run into the same problem. After deleting the maven3-*.jar's and restarting the node all runs fine.

          Conny Kreyßel added a comment - We run into the same problem. After deleting the maven3-*.jar's and restarting the node all runs fine.

          Code changed in jenkins
          User: Jesse Glick
          Path:
          changelog.html
          maven-plugin/src/main/java/hudson/maven/AbstractMavenProcessFactory.java
          maven-plugin/src/main/java/hudson/maven/MavenProcessFactory.java
          http://jenkins-ci.org/commit/jenkins/6b6a69ec0d63986d82616794d5a7fcf93df14b0e
          Log:
          [FIXED JENKINS-19251] Use hashes rather than modification time to determine if Maven agent JARs are up to date.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: changelog.html maven-plugin/src/main/java/hudson/maven/AbstractMavenProcessFactory.java maven-plugin/src/main/java/hudson/maven/MavenProcessFactory.java http://jenkins-ci.org/commit/jenkins/6b6a69ec0d63986d82616794d5a7fcf93df14b0e Log: [FIXED JENKINS-19251] Use hashes rather than modification time to determine if Maven agent JARs are up to date.

          dogfood added a comment -

          Integrated in jenkins_main_trunk #2907
          [FIXED JENKINS-19251] Use hashes rather than modification time to determine if Maven agent JARs are up to date. (Revision 6b6a69ec0d63986d82616794d5a7fcf93df14b0e)

          Result = SUCCESS
          Jesse Glick : 6b6a69ec0d63986d82616794d5a7fcf93df14b0e
          Files :

          • changelog.html
          • maven-plugin/src/main/java/hudson/maven/MavenProcessFactory.java
          • maven-plugin/src/main/java/hudson/maven/AbstractMavenProcessFactory.java

          dogfood added a comment - Integrated in jenkins_main_trunk #2907 [FIXED JENKINS-19251] Use hashes rather than modification time to determine if Maven agent JARs are up to date. (Revision 6b6a69ec0d63986d82616794d5a7fcf93df14b0e) Result = SUCCESS Jesse Glick : 6b6a69ec0d63986d82616794d5a7fcf93df14b0e Files : changelog.html maven-plugin/src/main/java/hudson/maven/MavenProcessFactory.java maven-plugin/src/main/java/hudson/maven/AbstractMavenProcessFactory.java

          Code changed in jenkins
          User: Jesse Glick
          Path:
          src/main/java/hudson/maven/AbstractMavenProcessFactory.java
          src/main/java/hudson/maven/MavenProcessFactory.java
          http://jenkins-ci.org/commit/maven-plugin/92e23770a12e0815e81d72aa63ead9c04c1a8cc2
          Log:
          [FIXED JENKINS-19251] Use hashes rather than modification time to determine if Maven agent JARs are up to date.

          Originally-Committed-As: 6b6a69ec0d63986d82616794d5a7fcf93df14b0e

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/hudson/maven/AbstractMavenProcessFactory.java src/main/java/hudson/maven/MavenProcessFactory.java http://jenkins-ci.org/commit/maven-plugin/92e23770a12e0815e81d72aa63ead9c04c1a8cc2 Log: [FIXED JENKINS-19251] Use hashes rather than modification time to determine if Maven agent JARs are up to date. Originally-Committed-As: 6b6a69ec0d63986d82616794d5a7fcf93df14b0e

          Code changed in jenkins
          User: Jesse Glick
          Path:
          maven-plugin/src/main/java/hudson/maven/AbstractMavenProcessFactory.java
          maven-plugin/src/main/java/hudson/maven/MavenProcessFactory.java
          http://jenkins-ci.org/commit/jenkins/022a98b8d3b6bcb8b0ff150ec194ee103de6fef6
          Log:
          [FIXED JENKINS-19251] Use hashes rather than modification time to determine if Maven agent JARs are up to date.

          (cherry picked from commit 6b6a69ec0d63986d82616794d5a7fcf93df14b0e)

          Conflicts:
          changelog.html

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: maven-plugin/src/main/java/hudson/maven/AbstractMavenProcessFactory.java maven-plugin/src/main/java/hudson/maven/MavenProcessFactory.java http://jenkins-ci.org/commit/jenkins/022a98b8d3b6bcb8b0ff150ec194ee103de6fef6 Log: [FIXED JENKINS-19251] Use hashes rather than modification time to determine if Maven agent JARs are up to date. (cherry picked from commit 6b6a69ec0d63986d82616794d5a7fcf93df14b0e) Conflicts: changelog.html

            jglick Jesse Glick
            marecki Marek Marzec
            Votes:
            4 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved: