java.lang.NullPointerException

GitHub | SebDyn | 4 years 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

    GitHub comment 5#10325604

    GitHub | 4 years ago | SebDyn
    java.lang.NullPointerException
  2. 0

    GitHub comment 22#270800943

    GitHub | 2 months ago | krvajalmiguelangel
    java.lang.NullPointerException
  3. 0

    I tested the new plugin system "without restart". After upgraded xUnit 1.31 => 1.32 (and some others) (Auto) trigger some build: internal NPE at the end => KO Restart Jenkins and launch another build => OK {noformat} mavenExecutionResult exceptions not empty message : Internal error: java.lang.NullPointerException cause : null Stack trace : org.apache.maven.InternalErrorException: Internal error: java.lang.NullPointerException at org.apache.maven.lifecycle.internal.BuilderCommon.handleBuildError(BuilderCommon.java:128) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:95) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:314) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:151) at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:79) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239) at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:158) at hudson.maven.Maven3Builder.call(Maven3Builder.java:112) at hudson.maven.Maven3Builder.call(Maven3Builder.java:70) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:287) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) Caused by: java.lang.NullPointerException at hudson.tasks.junit.TestResultAction.setResult(TestResultAction.java:74) at hudson.tasks.junit.TestResultAction.<init>(TestResultAction.java:67) at hudson.maven.reporters.SurefireReport.<init>(SurefireReport.java:45) at hudson.maven.reporters.SurefireArchiver$1.call(SurefireArchiver.java:148) at hudson.maven.reporters.SurefireArchiver$1.call(SurefireArchiver.java:142) at hudson.maven.MavenBuild$ProxyImpl.execute(MavenBuild.java:390) at hudson.maven.MavenBuild$ProxyImpl2.execute(MavenBuild.java:463) at sun.reflect.GeneratedMethodAccessor219.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at hudson.model.Executor$1.call(Executor.java:533) at hudson.util.InterceptingProxy$1.invoke(InterceptingProxy.java:23) at $Proxy35.execute(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:274) at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:255) at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:215) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:287) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) channel stopped {noformat}

    Jenkins JIRA | 5 years ago | Sylvain Veyrié
    org.apache.maven.InternalErrorException: Internal error: java.lang.NullPointerException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    It seems as though jenkins somehow gets in a situation where at the end of running a job, at the point of trying to publish nunit results it throws an NPE, of the form: ERROR: Publisher hudson.plugins.nunit.NUnitPublisher aborted due to exception java.lang.NullPointerException at hudson.model.Run.getRootDir(Run.java:927) at hudson.tasks.junit.TestResultAction.getDataFile(TestResultAction.java:91) at hudson.tasks.junit.TestResultAction.load(TestResultAction.java:147) at hudson.tasks.junit.TestResultAction.getResult(TestResultAction.java:97) at hudson.tasks.junit.TestResultAction.getResult(TestResultAction.java:55) at hudson.tasks.test.AbstractTestResultAction.findCorrespondingResult(AbstractTestResultAction.java:183) at hudson.tasks.test.TestResult.getPreviousResult(TestResult.java:145) at hudson.tasks.junit.SuiteResult.getPreviousResult(SuiteResult.java:296) at hudson.tasks.junit.CaseResult.getPreviousResult(CaseResult.java:375) at hudson.tasks.junit.CaseResult.freeze(CaseResult.java:486) at hudson.tasks.junit.SuiteResult.freeze(SuiteResult.java:338) at hudson.tasks.junit.TestResult.freeze(TestResult.java:564) at hudson.tasks.junit.TestResultAction.setResult(TestResultAction.java:74) at hudson.tasks.junit.TestResultAction.<init>(TestResultAction.java:67) at hudson.plugins.nunit.NUnitPublisher.recordTestResult(NUnitPublisher.java:150) at hudson.plugins.nunit.NUnitPublisher.perform(NUnitPublisher.java:109) at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:810) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:785) at hudson.model.Build$BuildExecution.post2(Build.java:183) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:732) at hudson.model.Run.execute(Run.java:1568) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:236) Once this starts happening it continues to happen for every build for that particular job. A restart does not stop this behaviour from happening. We noted a while back that deleting the build history from the filesystem for this job does allow it carry on successfully, until such time as the error appears again. Very recently a team member noted that the number of builds in the history for that job was equal to (or thereabouts [most recent #405 oldest #306) to the value stored in the configuration setting 'Max # of builds to keep' (in our case 100). This could be a co-incidence, and I've upped the setting to 200 to see if builds start working again (but this takes ~6 hours to reach the failing job), but it does look like a smoking gun :) I had hoped that it would be related to [https://issues.jenkins-ci.org/browse/JENKINS-16194] but having upgraded to the latest version we still see this issue. I'm mostly logging this in case others are seeing it ;)

    Jenkins JIRA | 4 years ago | ciaranj
    java.lang.NullPointerException
  6. 0

    In various builds I have a NPE after tests execution (But I don't yet identify what they have in commons) : {code} ... ------------------------------------------------------- T E S T S ------------------------------------------------------- Running org.exoplatform.commons.search.service.UnifiedSearchServiceTest Tests run: 1, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.051 sec - in org.exoplatform.commons.search.service.UnifiedSearchServiceTest Results : Tests run: 1, Failures: 0, Errors: 0, Skipped: 1 [JENKINS] Recording test results [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] .... [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2:47.877s [INFO] Finished at: Fri Feb 07 11:32:12 CET 2014 [INFO] Final Memory: 84M/1132M [INFO] ------------------------------------------------------------------------ Waiting for Jenkins to finish collecting data [ERROR] Internal error: java.lang.NullPointerException -> [Help 1] org.apache.maven.InternalErrorException: Internal error: java.lang.NullPointerException at org.apache.maven.lifecycle.internal.BuilderCommon.handleBuildError(BuilderCommon.java:128) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:95) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:117) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239) at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:178) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at hudson.maven.Maven3Builder.call(Maven3Builder.java:134) at hudson.maven.Maven3Builder.call(Maven3Builder.java:69) at hudson.remoting.UserRequest.perform(UserRequest.java:118) 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:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) at java.lang.Thread.run(Thread.java:662) Caused by: java.lang.NullPointerException at hudson.tasks.junit.TestResultAction.getDataFile(TestResultAction.java:91) at hudson.tasks.junit.TestResultAction.load(TestResultAction.java:147) at hudson.tasks.junit.TestResultAction.getResult(TestResultAction.java:97) at hudson.tasks.junit.TestResultAction.getResult(TestResultAction.java:55) at hudson.tasks.test.AbstractTestResultAction.findCorrespondingResult(AbstractTestResultAction.java:183) at hudson.tasks.test.TestResult.getPreviousResult(TestResult.java:143) at hudson.tasks.junit.SuiteResult.getPreviousResult(SuiteResult.java:290) at hudson.tasks.junit.CaseResult.getPreviousResult(CaseResult.java:440) at hudson.tasks.junit.CaseResult.freeze(CaseResult.java:569) at hudson.tasks.junit.SuiteResult.freeze(SuiteResult.java:332) at hudson.tasks.junit.TestResult.freeze(TestResult.java:619) at hudson.tasks.junit.TestResultAction.setResult(TestResultAction.java:74) at hudson.tasks.junit.TestResultAction.(TestResultAction.java:67) at hudson.maven.reporters.SurefireReport.(SurefireReport.java:45) at hudson.maven.reporters.SurefireArchiver$2.call(SurefireArchiver.java:166) at hudson.maven.reporters.SurefireArchiver$2.call(SurefireArchiver.java:160) at hudson.maven.MavenBuild$ProxyImpl.execute(MavenBuild.java:413) at hudson.maven.MavenBuild$ProxyImpl2.execute(MavenBuild.java:530) at sun.reflect.GeneratedMethodAccessor144.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at hudson.model.Executor$1.call(Executor.java:555) at hudson.util.InterceptingProxy$1.invoke(InterceptingProxy.java:23) at com.sun.proxy.$Proxy62.execute(Unknown Source) at sun.reflect.GeneratedMethodAccessor834.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:299) at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:280) at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:239) at hudson.remoting.UserRequest.perform(UserRequest.java:118) 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.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744) [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [JENKINS] Archiving /srv/jenkins/jobs/integration-4.0.x-ci/workspace/sources/integ-search-portlet/pom.xml to org.exoplatform.integration/integ-search-portlet/4.0.x-SNAPSHOT/integ-search-portlet-4.0.x-SNAPSHOT.pom [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/InternalErrorException {code} Few recent builds like this KO : https://ci.exoplatform.org/job/integration-weemo-addon-fb-ci/28/ https://ci.exoplatform.org/job/integration-stabilization-fb-ci/595/ https://ci.exoplatform.org/job/integration-4.0.x-translation-fb-ci/521/ https://ci.exoplatform.org/job/integration-4.0.x-ci/355/ https://ci.exoplatform.org/job/platform-stabilization-fb-ci/658/ https://ci.exoplatform.org/job/integration-stabilization-fb-ci/594/ .... I will try to downgrade the maven plugin

    Jenkins JIRA | 3 years ago | Arnaud Héritier
    org.apache.maven.InternalErrorException: Internal error: java.lang.NullPointerException

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at hudson.tasks.junit.CaseResult.getPackageName()
    2. Hudson
      TestResultAction.<init>
      1. hudson.tasks.junit.CaseResult.getPackageName(CaseResult.java:266)
      2. hudson.tasks.junit.TestResult.freeze(TestResult.java:576)
      3. hudson.tasks.junit.TestResultAction.setResult(TestResultAction.java:74)
      4. hudson.tasks.junit.TestResultAction.<init>(TestResultAction.java:67)
      4 frames
    3. org.jenkinsci.plugins
      XUnitPublisher.perform
      1. org.jenkinsci.plugins.xunit.XUnitPublisher.recordTestResult(XUnitPublisher.java:253)
      2. org.jenkinsci.plugins.xunit.XUnitPublisher.performXUnit(XUnitPublisher.java:123)
      3. org.jenkinsci.plugins.xunit.XUnitPublisher.perform(XUnitPublisher.java:93)
      3 frames
    4. Hudson
      Executor.run
      1. hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
      2. hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:717)
      3. hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:692)
      4. hudson.model.Build$BuildExecution.post2(Build.java:183)
      5. hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:639)
      6. hudson.model.Run.execute(Run.java:1527)
      7. hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      8. hudson.model.ResourceController.execute(ResourceController.java:88)
      9. hudson.model.Executor.run(Executor.java:236)
      9 frames