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

NPE when checking out a shared library from CVS

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • cvs-plugin
    • None
    • Jenkins 2.303.1
      cvs-plugin 2.19
    • 2.20

      I am currently trying to work with shared librarys. In my test project I am getting a NPE when jenkins is ckecking out the library. The checkout itself works, the files are in the workspace. The NPE happens obviously during some postprocessing when jenkins wants to build a changelog for the library, indepenent if that point is checked or not in the settings. Reading the log from CVS itself seems to work according to the console output.

      Here the console and the stacktrace:

      23:30:50  Loading library MyBuild@HEAD
      23:30:50  Using locally configured password for connection to :pserver:builduser@myserver:/myproject
      23:30:50  cvs update -C -d -P -r HEAD -D 30 Sep 2021 23:30:37 +0200 MyBuild 
      23:30:50  cvs server: Updating MyBuild
      23:30:50  cvs server: Updating MyBuild/vars
      23:30:50  Using locally configured password for connection to :pserver:builduser@myserver:/myproject
      23:30:50  cvs rlog -S -d30 Sep 2021 23:13:45 +0200<30 Sep 2021 23:30:37 +0200 Libs 
      23:30:50  cvs rlog: Logging Libs
      23:30:50  cvs rlog: Logging Libs/vars
      23:30:50  ERROR: Checkout failed
      23:30:50  java.lang.NullPointerException
      23:30:50  	at java.base/java.io.FileOutputStream.<init>(Unknown Source)
      23:30:50  	at java.base/java.io.FileOutputStream.<init>(Unknown Source)
      23:30:50  	at hudson.scm.CVSChangeLogSet.toFile(CVSChangeLogSet.java:680)
      23:30:50  	at hudson.scm.AbstractCvs.postCheckout(AbstractCvs.java:828)
      23:30:50  	at hudson.scm.CVSSCM.checkout(CVSSCM.java:398)
      23:30:50  	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:129)
      23:30:50  	at org.jenkinsci.plugins.workflow.libs.SCMSourceRetriever.lambda$doRetrieve$1(SCMSourceRetriever.java:190)
      23:30:50  	at org.jenkinsci.plugins.workflow.libs.SCMSourceRetriever.retrySCMOperation(SCMSourceRetriever.java:140)
      23:30:50  	at org.jenkinsci.plugins.workflow.libs.SCMSourceRetriever.doRetrieve(SCMSourceRetriever.java:189)
      23:30:50  	at org.jenkinsci.plugins.workflow.libs.SCMRetriever.retrieve(SCMRetriever.java:92)
      23:30:50  	at org.jenkinsci.plugins.workflow.libs.LibraryAdder.retrieve(LibraryAdder.java:196)
      23:30:50  	at org.jenkinsci.plugins.workflow.libs.LibraryAdder.add(LibraryAdder.java:138)
      23:30:50  	at org.jenkinsci.plugins.workflow.libs.LibraryDecorator$1.call(LibraryDecorator.java:125)
      23:30:50  	at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1065)
      23:30:50  	at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:603)
      23:30:50  	at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:581)
      23:30:50  	at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:558)
      23:30:50  	at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:298)
      23:30:50  	at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:268)
      23:30:50  	at groovy.lang.GroovyShell.parseClass(GroovyShell.java:688)
      23:30:50  	at groovy.lang.GroovyShell.parse(GroovyShell.java:700)
      23:30:50  	at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.doParse(CpsGroovyShell.java:142)
      23:30:50  	at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.reparse(CpsGroovyShell.java:127)
      23:30:50  	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.parseScript(CpsFlowExecution.java:571)
      23:30:50  	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.start(CpsFlowExecution.java:523)
      23:30:50  	at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:337)
      23:30:50  	at hudson.model.ResourceController.execute(ResourceController.java:100)
      23:30:50  	at hudson.model.Executor.run(Executor.java:433)
      23:30:50  ERROR: Maximum checkout retry attempts reached, aborting
      23:30:50  org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
      23:30:50  WorkflowScript: Loading libraries failed
      23:30:50  
      23:30:50  1 error
      23:30:50  
      23:30:50  	at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:310)
      23:30:50  	at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1085)
      23:30:50  	at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:603)
      23:30:50  	at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:581)
      23:30:50  	at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:558)
      23:30:50  	at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:298)
      23:30:50  	at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:268)
      23:30:50  	at groovy.lang.GroovyShell.parseClass(GroovyShell.java:688)
      23:30:50  	at groovy.lang.GroovyShell.parse(GroovyShell.java:700)
      23:30:50  	at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.doParse(CpsGroovyShell.java:142)
      23:30:50  	at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.reparse(CpsGroovyShell.java:127)
      23:30:50  	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.parseScript(CpsFlowExecution.java:571)
      23:30:50  	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.start(CpsFlowExecution.java:523)
      23:30:50  	at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:337)
      23:30:50  	at hudson.model.ResourceController.execute(ResourceController.java:100)
      23:30:50  	at hudson.model.Executor.run(Executor.java:433)
      23:30:50  Finished: FAILURE
      

            chrisfetz Christoph Fetzer
            chrisfetz Christoph Fetzer
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: