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

Lockable Resource Plugin throws null pointer exception

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • Jenkins LTS 2.60.1
      Lockable Resources Plugin v2.0

      The Lockable Resources Plugin throws a null pointer exception if the org.jenkins.plugins.lockableresources.LockableResourcesManager.xml file contains an entry that does not have a name field.

       

      For example,

      <org.jenkins.plugins.lockableresources.LockableResource>
      <description></description>
      <labels></labels>
      <queueItemId>0</queueItemId>
      <queuingStarted>0</queuingStarted>
      <queuedContexts/>
      </org.jenkins.plugins.lockableresources.LockableResource>
      

      The following stacktrace could be seen on the build console output - for version 1.11.2

      ava.lang.NullPointerException
      	at org.jenkins.plugins.lockableresources.LockableResourcesManager.freeResources(LockableResourcesManager.java:261)
      	at org.jenkins.plugins.lockableresources.LockableResourcesManager.unlockNames(LockableResourcesManager.java:300)
      	at org.jenkins.plugins.lockableresources.LockableResourcesManager.unlock(LockableResourcesManager.java:285)
      	at org.jenkins.plugins.lockableresources.LockableResourcesManager.unlock(LockableResourcesManager.java:273)
      	at org.jenkins.plugins.lockableresources.actions.LockableResourcesRootAction.doUnlock(LockableResourcesRootAction.java:103)
      	at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)
      	at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:343)
      	at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:184)
      	at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:117)
      	at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:129)
      	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
      Caused: javax.servlet.ServletException
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:765)
      

            fbelzunc Félix Belzunce Arcos
            jtsweet James Sweet
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: