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

SVN fail to revert working dir : NullPointerException

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • subversion-plugin
    • Jenkins Subversion Plug-in : 1.45
      Jenkins node running : Unix slave, version 2.21

      We have this error when we build using the revert + update SVN strategy.

      Building remotely on MobileXcodeNode in workspace /Users/dev/jenkins/workspace/project
      Reverting /Users/dev/jenkins/workspace/project/source to depth infinity with ignoreExternals: false
      FATAL: null
      java.lang.NullPointerException
      	at hudson.scm.subversion.UpdateUpdater$TaskImpl.perform(UpdateUpdater.java:176)
      	at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:153)
      	at hudson.scm.SubversionSCM$CheckOutTask.perform(SubversionSCM.java:903)
      	at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:884)
      	at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:867)
      	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2348)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:118)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      	at hudson.remoting.Request$2.run(Request.java:326)
      	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      	at java.lang.Thread.run(Thread.java:680)
      

      When I try to do the revert manually on the node I can see this error not correctly handled by Jenkins :

      MobileXcodeNode:source dev$ svn revert . -R
      Failed to revert 'Titanium_app/Resources' -- try updating instead.
      

      Thanks

          [JENKINS-16865] SVN fail to revert working dir : NullPointerException

          David Pärsson added a comment - - edited

          Are you trying to revert builds built on a slave? If so, this is currently not supported. Reverting is only supported on the master at the moment. Pull requests are welcome. This is not related to the svn-revert-plugin, as kutzi states.

          David Pärsson added a comment - - edited Are you trying to revert builds built on a slave? If so, this is currently not supported. Reverting is only supported on the master at the moment. Pull requests are welcome. This is not related to the svn-revert-plugin, as kutzi states.

          kutzi added a comment -

          assigning to right component subversion

          kutzi added a comment - assigning to right component subversion

          Yes, my mistake, I looked for a component starting by svn* ... not sub*
          Thanks

          Emmanuel Boudrant added a comment - Yes, my mistake, I looked for a component starting by svn* ... not sub* Thanks

          kutzi added a comment -

          Do you have a SCM (subversion) trigger defined for the job in question?

          kutzi added a comment - Do you have a SCM (subversion) trigger defined for the job in question?

          Chris Z added a comment -

          Which SVN version you have set in Jenkins ? 1.6 or 1.7 ?

          Chris Z added a comment - Which SVN version you have set in Jenkins ? 1.6 or 1.7 ?

          Marcel Juenemann added a comment - - edited

          I had the same error multiple times now, except not during revert, but during update:

          Updating https://... at revision 2465
          FATAL: null
          java.lang.NullPointerException
          	at hudson.scm.subversion.UpdateUpdater$TaskImpl.perform(UpdateUpdater.java:176)
                  ...
          

          I'm using the check-out strategy "Use 'svn update' as much as possible" and SVN version is set to 1.6. I have a SCM trigger configured, but that shouldn't matter, since it's usually triggered by an upstream project. Any idea what could cause this?

          Marcel Juenemann added a comment - - edited I had the same error multiple times now, except not during revert, but during update: Updating https: //... at revision 2465 FATAL: null java.lang.NullPointerException at hudson.scm.subversion.UpdateUpdater$TaskImpl.perform(UpdateUpdater.java:176) ... I'm using the check-out strategy "Use 'svn update' as much as possible" and SVN version is set to 1.6. I have a SCM trigger configured, but that shouldn't matter, since it's usually triggered by an upstream project. Any idea what could cause this?

          Mukul Sharma added a comment -

          We have SVN version 1.6.18 on the node in question. We don't have an SVN trigger, simply an svn update (by doing revert first) at the start of the build. Not sure if that counts.

          Mukul Sharma added a comment - We have SVN version 1.6.18 on the node in question. We don't have an SVN trigger, simply an svn update (by doing revert first) at the start of the build. Not sure if that counts.

          Chris Z added a comment -

          All points to the src/main/java/hudson/scm/subversion/UpdateUpdater.java:

          175             } catch (final SVNException e) {
          176                SVNException cause = e;
          

          and exception is caused probably starting the 151 line:

          151 preUpdate(location, local);
          152 SVNDepth svnDepth = getSvnDepth(location.getDepthOption());
          

          It seems that SVNException cause = e; is causing null pointer exception which is odd.

          Chris Z added a comment - All points to the src/main/java/hudson/scm/subversion/UpdateUpdater.java: 175 } catch ( final SVNException e) { 176 SVNException cause = e; and exception is caused probably starting the 151 line: 151 preUpdate(location, local); 152 SVNDepth svnDepth = getSvnDepth(location.getDepthOption()); It seems that SVNException cause = e; is causing null pointer exception which is odd.

            kutzi kutzi
            eboudrant Emmanuel Boudrant
            Votes:
            6 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated: