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

NullPointerException when scanning an organization

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Scanning the jenkinsci organization to pick up this branch in the puppet-jenkins repository resulted in a NullPointerException for some reason.

      Not sure what other details I can add here :-/

      Proposing puppet-jenkins
      Looking up jenkinsci/puppet-jenkins
      
        Getting remote pull requests...
      
          Checking pull request #763
          (not from a trusted source)
          Job name: PR-763
            ‘Jenkinsfile’ not found
          Does not meet criteria
      
          Checking pull request #761
          (not from a trusted source)
          Job name: PR-761
            ‘Jenkinsfile’ not found
          Does not meet criteria
      
          Checking pull request #759
          (not from a trusted source)
          Job name: PR-759
            ‘Jenkinsfile’ not found
          Does not meet criteria
      
          Checking pull request #752
          (not from a trusted source)
          Job name: PR-752
            ‘Jenkinsfile’ not found
          Does not meet criteria
      
          Checking pull request #751
          (not from a trusted source)
          Job name: PR-751
            ‘Jenkinsfile’ not found
          Does not meet criteria
      
          Checking pull request #743
          (not from a trusted source)
          Job name: PR-743
            ‘Jenkinsfile’ not found
          Does not meet criteria
      
          Checking pull request #742
          (not from a trusted source)
          Job name: PR-742
            ‘Jenkinsfile’ not found
          Does not meet criteria
      
          Checking pull request #734
          (not from a trusted source)
          Job name: PR-734
            ‘Jenkinsfile’ not found
          Does not meet criteria
      
          Checking pull request #733
          (not from a trusted source)
          Job name: PR-733
            ‘Jenkinsfile’ not found
          Does not meet criteria
      
          Checking pull request #725
          (not from a trusted source)
          Job name: PR-725
            ‘Jenkinsfile’ not found
          Does not meet criteria
      
          Checking pull request #723
          (not from a trusted source)
          Job name: PR-723
            ‘Jenkinsfile’ not found
          Does not meet criteria
      
          Checking pull request #669
          (not from a trusted source)
          Job name: PR-669
            ‘Jenkinsfile’ not found
          Does not meet criteria
      
          Checking pull request #658
          Job name: PR-658
            ‘Jenkinsfile’ not found
          Does not meet criteria
      
          Checking pull request #606
          (not from a trusted source)
          Job name: PR-606
            ‘Jenkinsfile’ not found
          Does not meet criteria
      
          Checking pull request #598
          (not from a trusted source)
          Job name: PR-598
            ‘Jenkinsfile’ not found
          Does not meet criteria
      
          Checking pull request #593
          (not from a trusted source)
          Job name: PR-593
            ‘Jenkinsfile’ not found
          Does not meet criteria
      
          Checking pull request #592
          (not from a trusted source)
          Job name: PR-592
            ‘Jenkinsfile’ not found
          Does not meet criteria
      
          Checking pull request #555
      ERROR: Failed to create or update a subproject puppet-jenkins
      java.lang.NullPointerException
      	at org.jenkinsci.plugins.github_branch_source.GitHubSCMSource.doRetrieve(GitHubSCMSource.java:623)
      	at org.jenkinsci.plugins.github_branch_source.GitHubSCMSource.retrieve(GitHubSCMSource.java:462)
      	at jenkins.scm.api.SCMSource._retrieve(SCMSource.java:300)
      	at jenkins.scm.api.SCMSource.fetch(SCMSource.java:254)
      	at jenkins.branch.MultiBranchProjectFactory$BySCMSourceCriteria.recognizes(MultiBranchProjectFactory.java:263)
      	at jenkins.branch.OrganizationFolder$SCMSourceObserverImpl$1.recognizes(OrganizationFolder.java:1274)
      	at jenkins.branch.OrganizationFolder$SCMSourceObserverImpl$1.complete(OrganizationFolder.java:1289)
      	at org.jenkinsci.plugins.github_branch_source.GitHubSCMNavigator.add(GitHubSCMNavigator.java:540)
      	at org.jenkinsci.plugins.github_branch_source.GitHubSCMNavigator.visitSources(GitHubSCMNavigator.java:362)
      	at jenkins.branch.OrganizationFolder.computeChildren(OrganizationFolder.java:401)
      	at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:266)
      	at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:162)
      	at jenkins.branch.OrganizationFolder$OrganizationScan.run(OrganizationFolder.java:852)
      	at hudson.model.ResourceController.execute(ResourceController.java:98)
      	at hudson.model.Executor.run(Executor.java:405)
      Ignoring suppress-stack-trace-plugin
      

        Attachments

          Issue Links

            Activity

            Hide
            krzys_h Krzys H. added a comment -

            I just had the exact same thing happen to me. I'm guessing the reason is that the pull request #555 in your repository is pointing to a branch or repo that has been removed (noted as "unknown repository" on GitHub page)

            I'm including my logs below, although they look quite similar. In my case this bug caused the whole project to be removed in Jenkins along with all other branches, possibly because this pull request was the first thing that was checked. The pull request in question is https://github.com/colobot/colobot/pull/978

            [Cz cze 22 22:44:00 CEST 2017] Starting organization scan...
            [Cz cze 22 22:44:00 CEST 2017] Updating actions...
            Looking up details of colobot...
            Organization URL: TerranovaTeam
            [Cz cze 22 22:44:01 CEST 2017] Consulting GitHub Organization
            22:44:01 Connecting to https://api.github.com using krzys-h/******
            22:44:02 Looking up repositories of organization colobot
            Proposing colobot
            Looking up colobot/colobot
            
              Getting remote pull requests...
            
                Checking pull request #978
            ERROR: Failed to create or update a subproject colobot
            java.lang.NullPointerException
            	at org.jenkinsci.plugins.github_branch_source.GitHubSCMSource.doRetrieve(GitHubSCMSource.java:623)
            	at org.jenkinsci.plugins.github_branch_source.GitHubSCMSource.retrieve(GitHubSCMSource.java:462)
            	at jenkins.scm.api.SCMSource._retrieve(SCMSource.java:300)
            	at jenkins.scm.api.SCMSource.fetch(SCMSource.java:254)
            	at jenkins.branch.MultiBranchProjectFactory$BySCMSourceCriteria.recognizes(MultiBranchProjectFactory.java:263)
            	at jenkins.branch.OrganizationFolder$SCMSourceObserverImpl$1.recognizes(OrganizationFolder.java:1274)
            	at jenkins.branch.OrganizationFolder$SCMSourceObserverImpl$1.complete(OrganizationFolder.java:1289)
            	at org.jenkinsci.plugins.github_branch_source.GitHubSCMNavigator.add(GitHubSCMNavigator.java:540)
            	at org.jenkinsci.plugins.github_branch_source.GitHubSCMNavigator.visitSources(GitHubSCMNavigator.java:362)
            	at jenkins.branch.OrganizationFolder.computeChildren(OrganizationFolder.java:401)
            	at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:266)
            	at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:162)
            	at jenkins.branch.OrganizationFolder$OrganizationScan.run(OrganizationFolder.java:852)
            	at hudson.model.ResourceController.execute(ResourceController.java:97)
            	at hudson.model.Executor.run(Executor.java:405)
            Proposing colobot-data
            Looking up colobot/colobot-data
            
              Getting remote pull requests...
            
              0 pull requests were processed
            
              Getting remote branches...
            
                Checking branch dev
                  ‘Jenkinsfile’ found
                Met criteria
            
              0 branches were processed (query completed)
            
            Done examining colobot/colobot-data
            
            Proposing ColobotLauncher
            Looking up colobot/ColobotLauncher
            
              Getting remote pull requests...
            
              0 pull requests were processed
            
              Getting remote branches...
            
                Checking branch master
                  ‘Jenkinsfile’ not found
                Does not meet criteria
            
              0 branches were processed
            
            Done examining colobot/ColobotLauncher
            
            Proposing colobot-music
            Looking up colobot/colobot-music
            
              Getting remote pull requests...
            
              0 pull requests were processed
            
              Getting remote branches...
            
                Checking branch master
                  ‘Jenkinsfile’ not found
                Does not meet criteria
            
                Checking branch old
                  ‘Jenkinsfile’ not found
                Does not meet criteria
            
              0 branches were processed
            
            Done examining colobot/colobot-music
            
            Proposing colobot-misc
            Looking up colobot/colobot-misc
            
              Getting remote pull requests...
            
              0 pull requests were processed
            
              Getting remote branches...
            
                Checking branch master
                  ‘Jenkinsfile’ found
                Met criteria
            
              0 branches were processed (query completed)
            
            Done examining colobot/colobot-misc
            
            Proposing colobot-lint
            Looking up colobot/colobot-lint
            
              Getting remote pull requests...
            
              0 pull requests were processed
            
              Getting remote branches...
            
                Checking branch dev
                  ‘Jenkinsfile’ not found
                Does not meet criteria
            
                Checking branch master
                  ‘Jenkinsfile’ not found
                Does not meet criteria
            
              0 branches were processed
            
            Done examining colobot/colobot-lint
            
            Proposing SatComOnline
            Looking up colobot/SatComOnline
            
              Getting remote pull requests...
            
              0 pull requests were processed
            
              Getting remote branches...
            
                Checking branch master
                  ‘Jenkinsfile’ not found
                Does not meet criteria
            
              0 branches were processed
            
            Done examining colobot/SatComOnline
            
            22:44:12 7 repositories were processed
            [Cz cze 22 22:44:12 CEST 2017] Finished organization scan. Scan took 11 sek
            Evaluating orphaned items in TerranovaTeam
            Will remove colobot as it is #1 in the list
            Finished: SUCCESS
            
            Show
            krzys_h Krzys H. added a comment - I just had the exact same thing happen to me. I'm guessing the reason is that the pull request #555 in your repository is pointing to a branch or repo that has been removed (noted as "unknown repository" on GitHub page) I'm including my logs below, although they look quite similar. In my case this bug caused the whole project to be removed in Jenkins along with all other branches, possibly because this pull request was the first thing that was checked. The pull request in question is https://github.com/colobot/colobot/pull/978 [Cz cze 22 22:44:00 CEST 2017] Starting organization scan... [Cz cze 22 22:44:00 CEST 2017] Updating actions... Looking up details of colobot... Organization URL: TerranovaTeam [Cz cze 22 22:44:01 CEST 2017] Consulting GitHub Organization 22:44:01 Connecting to https: //api.github.com using krzys-h/****** 22:44:02 Looking up repositories of organization colobot Proposing colobot Looking up colobot/colobot Getting remote pull requests... Checking pull request #978 ERROR: Failed to create or update a subproject colobot java.lang.NullPointerException at org.jenkinsci.plugins.github_branch_source.GitHubSCMSource.doRetrieve(GitHubSCMSource.java:623) at org.jenkinsci.plugins.github_branch_source.GitHubSCMSource.retrieve(GitHubSCMSource.java:462) at jenkins.scm.api.SCMSource._retrieve(SCMSource.java:300) at jenkins.scm.api.SCMSource.fetch(SCMSource.java:254) at jenkins.branch.MultiBranchProjectFactory$BySCMSourceCriteria.recognizes(MultiBranchProjectFactory.java:263) at jenkins.branch.OrganizationFolder$SCMSourceObserverImpl$1.recognizes(OrganizationFolder.java:1274) at jenkins.branch.OrganizationFolder$SCMSourceObserverImpl$1.complete(OrganizationFolder.java:1289) at org.jenkinsci.plugins.github_branch_source.GitHubSCMNavigator.add(GitHubSCMNavigator.java:540) at org.jenkinsci.plugins.github_branch_source.GitHubSCMNavigator.visitSources(GitHubSCMNavigator.java:362) at jenkins.branch.OrganizationFolder.computeChildren(OrganizationFolder.java:401) at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:266) at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:162) at jenkins.branch.OrganizationFolder$OrganizationScan.run(OrganizationFolder.java:852) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:405) Proposing colobot-data Looking up colobot/colobot-data Getting remote pull requests... 0 pull requests were processed Getting remote branches... Checking branch dev ‘Jenkinsfile’ found Met criteria 0 branches were processed (query completed) Done examining colobot/colobot-data Proposing ColobotLauncher Looking up colobot/ColobotLauncher Getting remote pull requests... 0 pull requests were processed Getting remote branches... Checking branch master ‘Jenkinsfile’ not found Does not meet criteria 0 branches were processed Done examining colobot/ColobotLauncher Proposing colobot-music Looking up colobot/colobot-music Getting remote pull requests... 0 pull requests were processed Getting remote branches... Checking branch master ‘Jenkinsfile’ not found Does not meet criteria Checking branch old ‘Jenkinsfile’ not found Does not meet criteria 0 branches were processed Done examining colobot/colobot-music Proposing colobot-misc Looking up colobot/colobot-misc Getting remote pull requests... 0 pull requests were processed Getting remote branches... Checking branch master ‘Jenkinsfile’ found Met criteria 0 branches were processed (query completed) Done examining colobot/colobot-misc Proposing colobot-lint Looking up colobot/colobot-lint Getting remote pull requests... 0 pull requests were processed Getting remote branches... Checking branch dev ‘Jenkinsfile’ not found Does not meet criteria Checking branch master ‘Jenkinsfile’ not found Does not meet criteria 0 branches were processed Done examining colobot/colobot-lint Proposing SatComOnline Looking up colobot/SatComOnline Getting remote pull requests... 0 pull requests were processed Getting remote branches... Checking branch master ‘Jenkinsfile’ not found Does not meet criteria 0 branches were processed Done examining colobot/SatComOnline 22:44:12 7 repositories were processed [Cz cze 22 22:44:12 CEST 2017] Finished organization scan. Scan took 11 sek Evaluating orphaned items in TerranovaTeam Will remove colobot as it is #1 in the list Finished: SUCCESS
            Hide
            krzys_h Krzys H. added a comment -

            I think this is a duplicate of JENKINS-41246

            Show
            krzys_h Krzys H. added a comment - I think this is a duplicate of JENKINS-41246

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              rtyler R. Tyler Croy
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: