java.lang.NullPointerException

Google Groups | saii...@gmail.com (JIRA) | 7 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Running this in my pipeline {code:java} step([$class: 'JacocoPublisher', execPattern:'build/jacoco/jacoco.exec', classPattern: 'build/classes/main', sourcePattern: 'src/main/java', exclusionPattern: '**/*Test.class']) {code} I end up getting the following NPE : {code:none} [JaCoCo plugin] Collecting JaCoCo coverage data... [JaCoCo plugin] build/jacoco/jacoco.exec;build/classes/main;src/main/java; locations are configured [JaCoCo plugin] Number of found exec files for pattern build/jacoco/jacoco.exec: 1 [JaCoCo plugin] Saving matched execfiles: /var/lib/jenkins/jobs/BITBUCKET_TEAM_PROJECT/jobs/GIT_PROJECT/branches/v0.0.3/workspace/build/jacoco/jacoco.exec [JaCoCo plugin] Saving matched class directories for class-pattern: build/classes/main: /var/lib/jenkins/jobs/BITBUCKET_TEAM_PROJECT/jobs/GIT_PROJECT/branches/v0.0.3/workspace/build/classes/main [JaCoCo plugin] Saving matched source directories for source-pattern: src/main/java: /var/lib/jenkins/jobs/BITBUCKET_TEAM_PROJECT/jobs/GIT_PROJECT/branches/v0.0.3/workspace/src/main/java [JaCoCo plugin] Loading inclusions files.. [JaCoCo plugin] inclusions: [] [JaCoCo plugin] exclusions: [**/*Test.class] [JaCoCo plugin] Thresholds: JacocoHealthReportThresholds [minClass=0, maxClass=0, minMethod=0, maxMethod=0, minLine=0, maxLine=0, minBranch=0, maxBranch=0, minInstruction=0, maxInstruction=0, minComplexity=0, maxComplexity=0] [JaCoCo plugin] Publishing the results.. [Pipeline] } [Pipeline] // node [Pipeline] End of Pipeline [Bitbucket] Notifying commit build result [Bitbucket] Build result notified java.lang.NullPointerException at hudson.plugins.jacoco.JacocoBuildAction.getJacocoReport(JacocoBuildAction.java:204) at hudson.plugins.jacoco.JacocoBuildAction.getResult(JacocoBuildAction.java:219) at hudson.plugins.jacoco.JacocoPublisher.perform(JacocoPublisher.java:490) at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:68) at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:59) at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:52) at hudson.security.ACL.impersonate(ACL.java:221) at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:49) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Finished: FAILURE {code}

    Jenkins JIRA | 7 months ago | Simon GUEROUT
    java.lang.NullPointerException
  2. 0

    GitHub comment 66#217737571

    GitHub | 10 months ago | centic9
    java.lang.NullPointerException
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    Installed Jenkins 1.527 and Jacoco plugin 1.0.12. When running build (on remote slave) with "Record JaCoCo coverage report" enabled, the build failed with the following exception on the master: hudson.util.IOException2: remote file operation failed: /home/XXX/.jenkins/slave/workspace/mybuild at hudson.remoting.Channel@20cccf9c:remoteserver1 at hudson.FilePath.act(FilePath.java:905) at hudson.FilePath.act(FilePath.java:882) at hudson.plugins.jacoco.JacocoPublisher.resolveDirPaths(JacocoPublisher.java:253) at hudson.plugins.jacoco.JacocoPublisher.perform(JacocoPublisher.java:337) at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:776) at hudson.model.Build$BuildExecution.post2(Build.java:183) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:726) at hudson.model.Run.execute(Run.java:1622) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:247) Caused by: java.io.InvalidClassException: hudson.plugins.jacoco.JacocoPublisher$1; local class incompatible: stream classdesc serialVersionUID = 1552178457453558870, local class serialVersionUID = 4749374988279249112 at java.io.InvalidClassException.<init>(InvalidClassException.java:62) at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:601) at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1600) at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1513) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1749) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1346) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1964) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1888) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1770) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1346) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:365) at hudson.remoting.UserRequest.deserialize(UserRequest.java:182) at hudson.remoting.UserRequest.perform(UserRequest.java:98) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:326) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:314) at java.util.concurrent.FutureTask.run(FutureTask.java:149) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:897) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:919) at java.lang.Thread.run(Thread.java:736) Aug 19, 2013 1:26:41 AM hudson.model.AbstractBuild$AbstractBuildExecution performAllBuildSteps WARNING: Publisher hudson.plugins.jacoco.JacocoPublisher aborted due to exception java.lang.NullPointerException at hudson.plugins.jacoco.JacocoPublisher.perform(JacocoPublisher.java:339) at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:776) at hudson.model.Build$BuildExecution.post2(Build.java:183) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:726) at hudson.model.Run.execute(Run.java:1622) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:247) Any help will be greatly appreciated! Our entire CI ecosystem is halted now since due to the above errors all build are failing. Thanks in advance, Mike

    Jenkins JIRA | 4 years ago | Mike Liu
    java.lang.NullPointerException
  5. 0

    Installed Jenkins 1.527 and Jacoco plugin 1.0.12. When running build (on remote slave) with "Record JaCoCo coverage report" enabled, the build failed with the following exception on the master: hudson.util.IOException2: remote file operation failed: /home/XXX/.jenkins/slave/workspace/mybuild at hudson.remoting.Channel@20cccf9c:remoteserver1 at hudson.FilePath.act(FilePath.java:905) at hudson.FilePath.act(FilePath.java:882) at hudson.plugins.jacoco.JacocoPublisher.resolveDirPaths(JacocoPublisher.java:253) at hudson.plugins.jacoco.JacocoPublisher.perform(JacocoPublisher.java:337) at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:776) at hudson.model.Build$BuildExecution.post2(Build.java:183) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:726) at hudson.model.Run.execute(Run.java:1622) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:247) Caused by: java.io.InvalidClassException: hudson.plugins.jacoco.JacocoPublisher$1; local class incompatible: stream classdesc serialVersionUID = 1552178457453558870, local class serialVersionUID = 4749374988279249112 at java.io.InvalidClassException.<init>(InvalidClassException.java:62) at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:601) at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1600) at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1513) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1749) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1346) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1964) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1888) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1770) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1346) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:365) at hudson.remoting.UserRequest.deserialize(UserRequest.java:182) at hudson.remoting.UserRequest.perform(UserRequest.java:98) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:326) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:314) at java.util.concurrent.FutureTask.run(FutureTask.java:149) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:897) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:919) at java.lang.Thread.run(Thread.java:736) Aug 19, 2013 1:26:41 AM hudson.model.AbstractBuild$AbstractBuildExecution performAllBuildSteps WARNING: Publisher hudson.plugins.jacoco.JacocoPublisher aborted due to exception java.lang.NullPointerException at hudson.plugins.jacoco.JacocoPublisher.perform(JacocoPublisher.java:339) at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:776) at hudson.model.Build$BuildExecution.post2(Build.java:183) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:726) at hudson.model.Run.execute(Run.java:1622) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:247) Any help will be greatly appreciated! Our entire CI ecosystem is halted now since due to the above errors all build are failing. Thanks in advance, Mike

    Jenkins JIRA | 4 years ago | Mike Liu
    java.lang.NullPointerException

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at hudson.plugins.jacoco.JacocoBuildAction.getJacocoReport()
    2. hudson.plugins.jacoco
      JacocoPublisher.perform
      1. hudson.plugins.jacoco.JacocoBuildAction.getJacocoReport(JacocoBuildAction.java:204)
      2. hudson.plugins.jacoco.JacocoBuildAction.getResult(JacocoBuildAction.java:219)
      3. hudson.plugins.jacoco.JacocoPublisher.perform(JacocoPublisher.java:490)
      3 frames
    3. org.jenkinsci.plugins
      AbstractSynchronousNonBlockingStepExecution$1$1.call
      1. org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:68)
      2. org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:59)
      3. org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:52)
      3 frames
    4. Hudson
      ACL.impersonate
      1. hudson.security.ACL.impersonate(ACL.java:221)
      1 frame
    5. org.jenkinsci.plugins
      AbstractSynchronousNonBlockingStepExecution$1.run
      1. org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:49)
      1 frame
    6. Java RT
      Thread.run
      1. java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      2. java.util.concurrent.FutureTask.run(FutureTask.java:266)
      3. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      4. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      5. java.lang.Thread.run(Thread.java:745)
      5 frames