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

Ivy-Projects ends up with a NPE on build after update Jenkins and Ivy-Plugin

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • ivy-plugin
    • None
    • Ubuntu LTS 12.04

      After upgrade to:

      Jenkins 1.523
      Ivy-Plugin 1.23.1

      All Ivy-Projects will not build anymore and ends up with a NPE. Checkout from SVN is fine so far:

      Building in workspace /var/lib/jenkins/jobs/graphicsUtility/workspace
      Cleaning local Directory .
      Checking out svn+ssh://ziv@uz-labor/var/svn/java-libs/graphicsUtility/trunk at revision '2013-07-19T15:06:03.638 +0200'
      [...]
      U .
      At revision 752
      no change for svn+ssh://ziv@uz-labor/var/svn/java-libs/graphicsUtility/trunk since the previous build
      ERROR: Processing failed due to a bug in the code. Please report this to users@hudson.dev.java.net
      java.lang.NullPointerException
      at hudson.FilePath.isAbsolute(FilePath.java:239)
      at hudson.FilePath.resolvePathIfRelative(FilePath.java:224)
      at hudson.FilePath.<init>(FilePath.java:220)
      at hudson.FilePath.child(FilePath.java:1133)
      at hudson.ivy.IvyModuleSetBuild$RunnerImpl.doRun(IvyModuleSetBuild.java:372)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:586)
      at hudson.model.Run.execute(Run.java:1593)
      at hudson.model.Run.run(Run.java:1539)
      at hudson.ivy.IvyModuleSetBuild.run(IvyModuleSetBuild.java:281)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:247)
      project=hudson.ivy.IvyModuleSet@17feafba[graphicsUtility]
      project.getModules()=[hudson.ivy.IvyModule@72a32604[graphicsUtility/de.unicomp:graphicsUtility]]
      FATAL: null
      java.lang.NullPointerException
      at hudson.FilePath.isAbsolute(FilePath.java:239)
      at hudson.FilePath.resolvePathIfRelative(FilePath.java:224)
      at hudson.FilePath.<init>(FilePath.java:220)
      at hudson.FilePath.child(FilePath.java:1133)
      at hudson.ivy.IvyModuleSetBuild$RunnerImpl.doRun(IvyModuleSetBuild.java:372)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:586)
      at hudson.model.Run.execute(Run.java:1593)
      at hudson.model.Run.run(Run.java:1539)
      at hudson.ivy.IvyModuleSetBuild.run(IvyModuleSetBuild.java:281)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:247)

          [JENKINS-18848] Ivy-Projects ends up with a NPE on build after update Jenkins and Ivy-Plugin

          What have you configured "ivy settings file" as?

          Johno Crawford added a comment - What have you configured "ivy settings file" as?

          This looks like it might be related to your remote ivy settings file changes, would you have a minute to investigate?

          Johno Crawford added a comment - This looks like it might be related to your remote ivy settings file changes, would you have a minute to investigate?

          Hi, Johno

          thank you for investigating this issue. My remote settings.xml (referenced in build.xml via: <ivy:settings url="http://jenkins/ivy/settings.xml" />) is accessible and quite simple:

          <ivysettings>
                  <settings defaultResolver="default" />
                  <resolvers>
                      <ibiblio name="public-rep" m2compatible="true" />
              	    <ivyrep name="unicomp-ivy-rep" ivyroot="http://jenkins/ivy/repository/"/>
              	    <url name="unicomp-ivy-rep" checkmodified="true" changingPattern=".*" latest="latest-time">  
              	        <ivy 	  pattern="http://jenkins/ivy/repository/[organisation]/[module]/[revision]/ivys/[artifact].[ext]" />  
              	        <artifact pattern="http://jenkins/ivy/repository/[organisation]/[module]/[revision]/jars/[artifact].[ext]" />  
              	    </url> 
              	    
              	    <filesystem name="local">
              		<ivy 	  pattern="${ivy.default.ivy.user.dir}/local/[organisation]/[module]/[revision]/ivys/[artifact].[ext]" />
              	        <artifact pattern="${ivy.default.ivy.user.dir}/local/[organisation]/[module]/[revision]/jars/[artifact].[ext]" />
              	    </filesystem>
              	    
              	    <chain name="default">
              	        <resolver ref="public-rep"/>
                  
          		<resolver ref="unicomp-ivy-rep"/>
          	    </chain>
              	                                                                                              
                  </resolvers>
          </ivysettings>
          

          I've tested the build process from command-line @ /var/lib/jenkins/jobs/<project-name>/workspace# and everything is fine there. Only jenkins can not build!?

          regards

          Ronald

          Ronald Müller added a comment - Hi, Johno thank you for investigating this issue. My remote settings.xml (referenced in build.xml via: <ivy:settings url="http://jenkins/ivy/settings.xml" />) is accessible and quite simple: <ivysettings> <settings defaultResolver= "default" /> <resolvers> <ibiblio name= "public-rep" m2compatible= "true" /> <ivyrep name= "unicomp-ivy-rep" ivyroot= "http://jenkins/ivy/repository/" /> <url name= "unicomp-ivy-rep" checkmodified= "true" changingPattern= ".*" latest= "latest-time" > <ivy pattern= "http://jenkins/ivy/repository/[organisation]/[module]/[revision]/ivys/[artifact].[ext]" /> <artifact pattern= "http://jenkins/ivy/repository/[organisation]/[module]/[revision]/jars/[artifact].[ext]" /> </url> <filesystem name= "local" > <ivy pattern= "${ivy.default.ivy.user.dir}/local/[organisation]/[module]/[revision]/ivys/[artifact].[ext]" /> <artifact pattern= "${ivy.default.ivy.user.dir}/local/[organisation]/[module]/[revision]/jars/[artifact].[ext]" /> </filesystem> <chain name= "default" > <resolver ref= "public-rep" /> <resolver ref= "unicomp-ivy-rep" /> </chain> </resolvers> </ivysettings> I've tested the build process from command-line @ /var/lib/jenkins/jobs/<project-name>/workspace# and everything is fine there. Only jenkins can not build!? regards Ronald

          Jerome Martin added a comment -

          @Johno Crawford
          > What have you configured "ivy settings file" as?

          I have the same error, I do not configure anything on this field and do not why I must (additionally with a local file).

          My ivy settings are sets by a property and are located on a shared dir.
          With this update, I have 150 projects where the build failed.

          Should be possible to let this field optionally.

          Jerome Martin added a comment - @Johno Crawford > What have you configured "ivy settings file" as? I have the same error, I do not configure anything on this field and do not why I must (additionally with a local file). My ivy settings are sets by a property and are located on a shared dir. With this update, I have 150 projects where the build failed. Should be possible to let this field optionally.

          @Jerome would you please confirm if it works if you specify a dummy file (which exists)? I can investigate this issue after work today.

          Johno Crawford added a comment - @Jerome would you please confirm if it works if you specify a dummy file (which exists)? I can investigate this issue after work today.

          Jerome Martin added a comment -

          I have configure the "ivy settings file" with

          • an absolute file /tmp/empty.txt (existing or not): it works but I have a message on Jenkins : Ivy settings file must be a relative path.
          • a local, non existing file empty.txt: it works but I have the message : No such file: 'empty.txt'

          Jerome Martin added a comment - I have configure the "ivy settings file" with an absolute file /tmp/empty.txt (existing or not): it works but I have a message on Jenkins : Ivy settings file must be a relative path. a local, non existing file empty.txt: it works but I have the message : No such file: 'empty.txt'

          Hi,

          i can confirm, that projects will be build, if you put "something" to "Ivy settings" text-field in the project-configuration-panel. As already stated here: there will be a form-validation error "Ivy settings file must be a relative path." or something else, but the project builds successfully afterwards. So this could be a workaround for very urgent projects.

          In my scenario this text-field is always left blank, as the ivy-settings-file is configured in ant-buildscript itself via <ivy:settings url="http://jenkins/ivy/settings.xml" />

          So IMHO it is definitly a bug.

          Ronald Müller added a comment - Hi, i can confirm, that projects will be build, if you put "something" to "Ivy settings" text-field in the project-configuration-panel. As already stated here: there will be a form-validation error "Ivy settings file must be a relative path." or something else, but the project builds successfully afterwards. So this could be a workaround for very urgent projects. In my scenario this text-field is always left blank, as the ivy-settings-file is configured in ant-buildscript itself via <ivy:settings url="http://jenkins/ivy/settings.xml" /> So IMHO it is definitly a bug.

          Johno Crawford added a comment - - edited

          @Jerome @Ronald please try 1.23.2 and let me know if the above mentioned issues are now resolved.

          Johno Crawford added a comment - - edited @Jerome @Ronald please try 1.23.2 and let me know if the above mentioned issues are now resolved.

          Jerome Martin added a comment -

          This version works as expected for me.
          Thx

          Jerome Martin added a comment - This version works as expected for me. Thx

          Great work. This version seems to fix this issue. Johno +1

          Ronald Müller added a comment - Great work. This version seems to fix this issue. Johno +1

            ndeloof Nicolas De Loof
            ronald_mueller Ronald Müller
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: