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

Signature in hudson.tasks.Maven.MavenInstaller.json causes NullPointerException

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • None
    • Jenkins 1.423 and 1.414
      Ubuntu 64bit
      JDK 1.6.0_16

      We have three Jenkins instances. Two are on 1.423 and one is on 1.414. Starting sometime on September 8th 2012, our builds on Jenkins all started to fail with the following error:

      FATAL: Error while setting property=signature type class java.lang.Object
      net.sf.json.JSONException: Error while setting property=signature type class java.lang.Object
      	at net.sf.json.JSONObject.toBean(JSONObject.java:577)
      	at net.sf.json.JSONObject.toBean(JSONObject.java:383)
      	at net.sf.json.JSONObject.toBean(JSONObject.java:250)
      	at hudson.tools.DownloadFromUrlInstaller$DescriptorImpl.getInstallables(DownloadFromUrlInstaller.java:151)
      	at hudson.tools.DownloadFromUrlInstaller.getInstallable(DownloadFromUrlInstaller.java:54)
      	at hudson.tools.DownloadFromUrlInstaller.performInstallation(DownloadFromUrlInstaller.java:63)
      	at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:61)
      	at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:107)
      	at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:150)
      	at hudson.tasks.Maven$MavenInstallation.forNode(Maven.java:510)
      	at hudson.maven.MavenModuleSetBuild.getEnvironment(MavenModuleSetBuild.java:174)
      	at hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:582)
      	at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:448)
      	at hudson.model.Run.run(Run.java:1376)
      	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:478)
      	at hudson.model.ResourceController.execute(ResourceController.java:88)
      	at hudson.model.Executor.run(Executor.java:175)
      Caused by: java.lang.NullPointerException
      	at net.sf.json.JSONObject$MethodProperty.isWritable(JSONObject.java:311)
      	at net.sf.json.JSONObject.toBean(JSONObject.java:429)
      	... 16 more
      

      We were able to narrow it down to hudson.tasks.Maven.MavenInstaller.json that caused the problem by deleting that file from our server and kicking off a job run. The first run without the JSON file will run fine, but subsequent runs fails because the file gets redownloaded from http://updates.jenkins-ci.org/updates/hudson.tasks.Maven.MavenInstaller.json.

      Our current workaround for the problem is that we created an empty (valid) hudson.tasks.Maven.MavenInstaller.json file and turned off the write permission on that file so it won't get updated by Jenkins. We're not sure if there will be any problems if Jenkins tries to update that file again though.

      After doing some research, we believe the following commit caused Jenkins to start breaking:
      https://github.com/jenkinsci/jenkins/commit/62f66f899c95ccdfdc7a5d3346240988b42a9aad

      Looks like the change causes the MavenInstaller JSON file to add a new "signature" block, which our Jenkins version cannot handle.

            kohsuke Kohsuke Kawaguchi
            jlin jlin
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: