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

GitLab branch source scan fails with null pointer exception if credentials are not provided

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major

      A GitLab branch source project fails its initial scan with a null pointer exception. The message is:

      Checking project markewaite-jenkins-plugins/tasks-pipeline
      Proposing markewaite-jenkins-plugins/tasks-pipeline
      ERROR: Failed to create or update a subproject markewaite-jenkins-plugins/tasks-pipeline
      java.lang.NullPointerException: Cannot invoke "java.lang.Boolean.booleanValue()" because the return value of "org.gitlab4j.api.models.Project.getMergeRequestsEnabled()" is null
      	at io.jenkins.plugins.gitlabbranchsource.GitLabSCMSource.retrieve(GitLabSCMSource.java:334)
      	at jenkins.scm.api.SCMSource._retrieve(SCMSource.java:372)
      	at jenkins.scm.api.SCMSource.fetch(SCMSource.java:326)
      	at jenkins.branch.MultiBranchProjectFactory$BySCMSourceCriteria.recognizes(MultiBranchProjectFactory.java:262)
      	at jenkins.branch.OrganizationFolder$SCMSourceObserverImpl$1.recognizes(OrganizationFolder.java:1361)
      	at jenkins.branch.OrganizationFolder$SCMSourceObserverImpl$1.complete(OrganizationFolder.java:1376)
      	at jenkins.scm.api.trait.SCMNavigatorRequest.process(SCMNavigatorRequest.java:252)
      	at jenkins.scm.api.trait.SCMNavigatorRequest.process(SCMNavigatorRequest.java:202)
      	at io.jenkins.plugins.gitlabbranchsource.GitLabSCMNavigator.visitSources(GitLabSCMNavigator.java:305)
      	at jenkins.branch.OrganizationFolder.computeChildren(OrganizationFolder.java:535)
      	at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:269)
      	at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:167)
      	at jenkins.branch.OrganizationFolder$OrganizationScan.run(OrganizationFolder.java:920)
      	at hudson.model.ResourceController.execute(ResourceController.java:101)
      	at hudson.model.Executor.run(Executor.java:442)
      

      The job definition is available as job-definition.xml

        1. Credentials-are-recommended.png
          25 kB
          Mark Waite
        2. job-definition.xml
          11 kB
          Mark Waite

            Unassigned Unassigned
            markewaite Mark Waite
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: