java.lang.NullPointerException

Jenkins JIRA | Florian Rosenauer | 4 years ago
  1. 0

    prerequisite: at least one running maven job 1. open Manage Jenkins - Configure System 2. click add maven 3. click delete installer 4. move the (empty) maven to the top of the list of maven installations 5. click save 6. run the maven job expected: maven job runs as before result: ERROR: Processing failed due to a bug in the code. Please report this to jenkinsci-users@googlegroups.com java.lang.NullPointerException at hudson.maven.MavenModuleSet.getMaven(MavenModuleSet.java:982) at hudson.maven.MavenModuleSetBuild.getEnvironment(MavenModuleSetBuild.java:160) at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:568) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:499) at hudson.model.Run.execute(Run.java:1484) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:477) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:236) project=hudson.maven.MavenModuleSet@16c8cb41 [... some list of modules here ... ] FATAL: null java.lang.NullPointerException at hudson.maven.MavenModuleSet.getMaven(MavenModuleSet.java:982) at hudson.maven.MavenModuleSetBuild.getEnvironment(MavenModuleSetBuild.java:160) at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:568) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:499) at hudson.model.Run.execute(Run.java:1484) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:477) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:236) my hudson.tasks.Maven.xml looks like this: <?xml version='1.0' encoding='UTF-8'?> <hudson.tasks.Maven_-DescriptorImpl> <helpRedirect/> <installations> <hudson.tasks.Maven_-MavenInstallation> <properties> <hudson.tools.InstallSourceProperty> <installers/> </hudson.tools.InstallSourceProperty> </properties> </hudson.tasks.Maven_-MavenInstallation> <hudson.tasks.Maven_-MavenInstallation> <name>/cvsroot/maven/maven-bin/maven-2.0.11 (depreciated - for Java 1.4 only)</name> <home>/var/hudson/tools/maven-bin/maven-2.0.11</home> <properties/> </hudson.tasks.Maven_-MavenInstallation> <hudson.tasks.Maven_-MavenInstallation> <name>/cvsroot/maven/maven-bin/maven-2.2.1 (Java 1.5+ required)</name> <home>/var/hudson/tools/maven-bin/maven-2.2.1</home> <properties/> </hudson.tasks.Maven_-MavenInstallation> <hudson.tasks.Maven_-MavenInstallation> <name>/cvsroot/maven/maven-bin/maven-3.0.x</name> <home>/var/hudson/tools/maven-bin/maven-3.0.x</home> <properties/> </hudson.tasks.Maven_-MavenInstallation> </installations> </hudson.tasks.Maven_-DescriptorImpl> the fix is simple: just delete the empty maven configuration

    Jenkins JIRA | 4 years ago | Florian Rosenauer
    java.lang.NullPointerException
  2. 0

    prerequisite: at least one running maven job 1. open Manage Jenkins - Configure System 2. click add maven 3. click delete installer 4. move the (empty) maven to the top of the list of maven installations 5. click save 6. run the maven job expected: maven job runs as before result: ERROR: Processing failed due to a bug in the code. Please report this to jenkinsci-users@googlegroups.com java.lang.NullPointerException at hudson.maven.MavenModuleSet.getMaven(MavenModuleSet.java:982) at hudson.maven.MavenModuleSetBuild.getEnvironment(MavenModuleSetBuild.java:160) at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:568) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:499) at hudson.model.Run.execute(Run.java:1484) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:477) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:236) project=hudson.maven.MavenModuleSet@16c8cb41 [... some list of modules here ... ] FATAL: null java.lang.NullPointerException at hudson.maven.MavenModuleSet.getMaven(MavenModuleSet.java:982) at hudson.maven.MavenModuleSetBuild.getEnvironment(MavenModuleSetBuild.java:160) at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:568) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:499) at hudson.model.Run.execute(Run.java:1484) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:477) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:236) my hudson.tasks.Maven.xml looks like this: <?xml version='1.0' encoding='UTF-8'?> <hudson.tasks.Maven_-DescriptorImpl> <helpRedirect/> <installations> <hudson.tasks.Maven_-MavenInstallation> <properties> <hudson.tools.InstallSourceProperty> <installers/> </hudson.tools.InstallSourceProperty> </properties> </hudson.tasks.Maven_-MavenInstallation> <hudson.tasks.Maven_-MavenInstallation> <name>/cvsroot/maven/maven-bin/maven-2.0.11 (depreciated - for Java 1.4 only)</name> <home>/var/hudson/tools/maven-bin/maven-2.0.11</home> <properties/> </hudson.tasks.Maven_-MavenInstallation> <hudson.tasks.Maven_-MavenInstallation> <name>/cvsroot/maven/maven-bin/maven-2.2.1 (Java 1.5+ required)</name> <home>/var/hudson/tools/maven-bin/maven-2.2.1</home> <properties/> </hudson.tasks.Maven_-MavenInstallation> <hudson.tasks.Maven_-MavenInstallation> <name>/cvsroot/maven/maven-bin/maven-3.0.x</name> <home>/var/hudson/tools/maven-bin/maven-3.0.x</home> <properties/> </hudson.tasks.Maven_-MavenInstallation> </installations> </hudson.tasks.Maven_-DescriptorImpl> the fix is simple: just delete the empty maven configuration

    Jenkins JIRA | 4 years ago | Florian Rosenauer
    java.lang.NullPointerException
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    GitHub comment 7197#167542941

    GitHub | 11 months ago | jerrinot
    java.lang.NullPointerException
  5. 0

    {code} [INFO] Installing /home/appusr/.jenkins/jobs/_BUILD_ARTIFACT/workspace/icm.demo.core.app/target/icm.demo.core.app-0.7-SNAPSHOT/lib/res.jar to /home/appusr/.m2/repository/com/telvent/oip/icm.demo.core.app/0.7-SNAPSHOT/icm.demo.core.app-0.7-SNAPSHOT.jar Notifying upstream projects of job completion Join notifier requires a CauseAction [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 34.069s [INFO] Finished at: Mon Jul 21 16:51:28 CEST 2014 [INFO] Final Memory: 44M/64M [INFO] ------------------------------------------------------------------------ ERROR: Processing failed due to a bug in the code. Please report this to jenkinsci-users@googlegroups.com [ERROR] Internal error: java.lang.NullPointerException -> [Help 1] org.apache.maven.InternalErrorException: Internal error: java.lang.NullPointerException at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:168) 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:328) 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.maven.Maven3Builder$MavenExecutionListener.sessionEnded(Maven3Builder.java:467) at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:64) at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:42) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:170) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) ... 23 more [ERROR] java.lang.NullPointerException at hudson.maven.AbstractMavenBuilder.end(AbstractMavenBuilder.java:100) at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:849) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:535) at hudson.model.Run.execute(Run.java:1732) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:529) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:234) project=hudson.maven.MavenModuleSet@9f85ec8[_BUILD_ARTIFACT] [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. project.getModules()=[hudson.maven.MavenModule@a063a3d[_BUILD_ARTIFACT/com.telvent.oip:icm.demo.core.app][_BUILD_ARTIFACT/com.telvent.oip:icm.demo.core.app][relativePath:], hudson.maven.MavenModule@a063a50[_BUILD_ARTIFACT/com.telvent.oip:icm.demo.database][_BUILD_ARTIFACT/com.telvent.oip:icm.demo.database][relativePath:], hudson.maven.MavenModule@a0638d4[_BUILD_ARTIFACT/com.telvent.oip:icm.demo.flexconsole][_BUILD_ARTIFACT/com.telvent.oip:icm.demo.flexconsole][relativePath:], hudson.maven.MavenModule@a19e59e[_BUILD_ARTIFACT/com.telvent.oip:icm.demo.flexconsole.webapp][_BUILD_ARTIFACT/com.telvent.oip:icm.demo.flexconsole.webapp][relativePath:]] project.getRootModule()=hudson.maven.MavenModule@a063a50[_BUILD_ARTIFACT/com.telvent.oip:icm.demo.database][_BUILD_ARTIFACT/com.telvent.oip:icm.demo.database][relativePath:] [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 FATAL: null java.lang.NullPointerException at hudson.maven.AbstractMavenBuilder.end(AbstractMavenBuilder.java:100) at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:849) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:535) at hudson.model.Run.execute(Run.java:1732) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:529) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:234) {code} I have a parametrized multi-configuration project (_BUILD_CORE_N_DB_ARTIFACTS) that triggers with every axis configuration the execution a simple maven proyect (_BUILD_ARTIFACT, that basically downloads an artifact from SCM repository (Subversion) and invokes "maven install" with some options. Everything is parameterized for _BUILD_ARTIFACT (even SVN URL). Once _BUILD_ARTIFACT finishes, _BUILD_CORE_N_DB_ARTIFACTS job grabs the resulting archived file using copy artifact plugin with the build number indicated in TRIGGERED_BUILD_NUMBER__BUILD_ARTIFACT environment variable. _BUILD_CORE_N_DB_ARTIFACTS performs a touchstone build first and then three artifacts are generated in parallel. One of these three artifacts (an EAR, a WAR and a ZIP with DB scripts) fails with NPE indicated above. It is not always the same artifact. I have tested this on latest (1.573) and previous (1.572) Jenkins versions with same results.

    Jenkins JIRA | 2 years ago | Fernando Miguelez
    java.lang.NullPointerException

    1 unregistered visitors
    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.maven.MavenModuleSet.getMaven()
    2. Hudson Maven Embedder
      MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun
      1. hudson.maven.MavenModuleSet.getMaven(MavenModuleSet.java:982)
      2. hudson.maven.MavenModuleSetBuild.getEnvironment(MavenModuleSetBuild.java:160)
      3. hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:568)
      3 frames
    3. Hudson
      Run.execute
      1. hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:499)
      2. hudson.model.Run.execute(Run.java:1484)
      2 frames
    4. Hudson Maven Embedder
      MavenModuleSetBuild.run
      1. hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:477)
      1 frame
    5. Hudson
      Executor.run
      1. hudson.model.ResourceController.execute(ResourceController.java:88)
      2. hudson.model.Executor.run(Executor.java:236)
      2 frames