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

empty tags / revisions list when using Folders - NullPointerException - getParentProject()

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • git-parameter-plugin

      The "git tag" list is blank, even on the second on subsequent runs. We found a Null pointer exception in the jenkins.log:

      2014 10:09:40 AM hudson.ExpressionFactory2$JexlExpression evaluate
      WARNING: Caught exception evaluating: it.revisionMap in /job/SF-Dev/job/Deploy-Auction-GitTag/build. Reason: java.lang.reflect.InvocationTargetException
      java.lang.reflect.InvocationTargetException
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      ((SNIP))
          at java.lang.Thread.run(Thread.java:744)
      Caused by: java.lang.NullPointerException
          at net.uaznia.lukanus.hudson.plugins.gitparameter.GitParameterDefinition.generateContents(GitParameterDefinition.java:260)
          at net.uaznia.lukanus.hudson.plugins.gitparameter.GitParameterDefinition.getRevisionMap(GitParameterDefinition.java:386)
          ... 167 more
      

      After reviewing the code (as a non developer of course), the problem appears to be in the getParentProject() method:
      https://github.com/jenkinsci/git-parameter-plugin/blob/git-parameter-0.3.2/src/main/java/net/uaznia/lukanus/hudson/plugins/gitparameter/GitParameterDefinition.java#L184-L213

      context is set to null, then there is some sort of elaborate sequence that should set context to the project during the loop, but apparently that is not happening.

          [JENKINS-23473] empty tags / revisions list when using Folders - NullPointerException - getParentProject()

          Tommy McNeely created issue -
          Tommy McNeely made changes -
          Component/s New: cloudbees-folder [ 18137 ]
          Summary Original: empty tags / revisions list - NullPointerException - getParentProject() New: empty tags / revisions list when using Folders - NullPointerException - getParentProject()
          Jesse Glick made changes -
          Component/s Original: cloudbees-folder [ 18137 ]
          Labels New: folders
          Steven Christou made changes -
          Assignee Original: Niklaus Giger [ niklaus_giger ] New: Nicolas De Loof [ ndeloof ]
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 156102 ] New: JNJira + In-Review [ 195347 ]

            ndeloof Nicolas De Loof
            tommythekid Tommy McNeely
            Votes:
            3 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: