java.lang.IllegalArgumentException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • My job stopped to poll changes from SVN some time ago - it all runs properly when started manually or by timer, but it won't poll when a change occurs in repository. I have tried tweaking with Maven installations, cloning the job etc. Other jobs using Git do not have this problem. SVN polling shows: ERROR: Failed to record SCM polling for hudson.maven.MavenModuleSet@eafaabe[scmTest] java.lang.IllegalArgumentException: Null value not allowed as an environment variable: M2_HOME at hudson.EnvVars.put(EnvVars.java:172) at hudson.tasks.Maven$MavenInstallation.buildEnvVars(Maven.java:492) at hudson.maven.MavenModuleSetBuild.getEnvironment(MavenModuleSetBuild.java:173) at hudson.scm.SubversionSCM.compareRemoteRevisionWith(SubversionSCM.java:1230) at hudson.scm.SCM._compareRemoteRevisionWith(SCM.java:356) at hudson.scm.SCM.poll(SCM.java:373) at hudson.model.AbstractProject._poll(AbstractProject.java:1523) at hudson.model.AbstractProject.poll(AbstractProject.java:1448) at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:439) at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:468) at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:118) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) 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:722) When I get into job configuration in Maven build section I get "ERROR" below Root POM line. I am attaching the exact ERROR message as a separate file.
    via by Pawel Gronkiewicz,
  • My job stopped to poll changes from SVN some time ago - it all runs properly when started manually or by timer, but it won't poll when a change occurs in repository. I have tried tweaking with Maven installations, cloning the job etc. Other jobs using Git do not have this problem. SVN polling shows: ERROR: Failed to record SCM polling for hudson.maven.MavenModuleSet@eafaabe[scmTest] java.lang.IllegalArgumentException: Null value not allowed as an environment variable: M2_HOME at hudson.EnvVars.put(EnvVars.java:172) at hudson.tasks.Maven$MavenInstallation.buildEnvVars(Maven.java:492) at hudson.maven.MavenModuleSetBuild.getEnvironment(MavenModuleSetBuild.java:173) at hudson.scm.SubversionSCM.compareRemoteRevisionWith(SubversionSCM.java:1230) at hudson.scm.SCM._compareRemoteRevisionWith(SCM.java:356) at hudson.scm.SCM.poll(SCM.java:373) at hudson.model.AbstractProject._poll(AbstractProject.java:1523) at hudson.model.AbstractProject.poll(AbstractProject.java:1448) at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:439) at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:468) at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:118) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) 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:722) When I get into job configuration in Maven build section I get "ERROR" below Root POM line. I am attaching the exact ERROR message as a separate file.
    via by Pawel Gronkiewicz,
  • Hi Team, Recently, We have been upgraded the Jenkins from 1.466 to 1.509.2 version. Also we have been updated all the available plugins including Maven plugin. All the Maven jobs after upgradation of Jenkins gets failed with the below error log(full log) Started by timer [EnvInject] - Loading node environment variables. Building remotely on <slavename> in workspace /home/hudson/slave3/workspace/event-driven-app FATAL: Null value not allowed as an environment variable: M2_HOME java.lang.IllegalArgumentException: Null value not allowed as an environment variable: M2_HOME at hudson.EnvVars.put(EnvVars.java:172) at hudson.tasks.Maven$MavenInstallation.buildEnvVars(Maven.java:474) at hudson.maven.MavenModuleSetBuild.getEnvironment(MavenModuleSetBuild.java:172) at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:783) at hudson.model.AbstractProject.checkout(AbstractProject.java:1367) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:674) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:579) at hudson.model.Run.execute(Run.java:1575) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:477) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:237) But after changing the version of Maven to any of the other version by saving it and resaved the correct maven version(2.2.1) configuration in the job the error is getting resolved and build gets succeeded. Kindly advise on the error/fix for the same
    via by Sankara Subramanian Hariharakumar,
  • Hi Team, Recently, We have been upgraded the Jenkins from 1.466 to 1.509.2 version. Also we have been updated all the available plugins including Maven plugin. All the Maven jobs after upgradation of Jenkins gets failed with the below error log(full log) Started by timer [EnvInject] - Loading node environment variables. Building remotely on <slavename> in workspace /home/hudson/slave3/workspace/event-driven-app FATAL: Null value not allowed as an environment variable: M2_HOME java.lang.IllegalArgumentException: Null value not allowed as an environment variable: M2_HOME at hudson.EnvVars.put(EnvVars.java:172) at hudson.tasks.Maven$MavenInstallation.buildEnvVars(Maven.java:474) at hudson.maven.MavenModuleSetBuild.getEnvironment(MavenModuleSetBuild.java:172) at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:783) at hudson.model.AbstractProject.checkout(AbstractProject.java:1367) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:674) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:579) at hudson.model.Run.execute(Run.java:1575) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:477) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:237) But after changing the version of Maven to any of the other version by saving it and resaved the correct maven version(2.2.1) configuration in the job the error is getting resolved and build gets succeeded. Kindly advise on the error/fix for the same
    via by Sankara Subramanian Hariharakumar,
  • Jenkins complains of null M2_HOME
    via Stack Overflow by bmargulies
    ,
    • java.lang.IllegalArgumentException: Null value not allowed as an environment variable: M2_HOME at hudson.EnvVars.put(EnvVars.java:172) at hudson.tasks.Maven$MavenInstallation.buildEnvVars(Maven.java:489) at hudson.maven.MavenModuleSetBuild.getEnvironment(MavenModuleSetBuild.java:172) at hudson.scm.SubversionSCM.compareRemoteRevisionWith(SubversionSCM.java:1230) at hudson.scm.SCM._compareRemoteRevisionWith(SCM.java:356) at hudson.scm.SCM.poll(SCM.java:373) at hudson.model.AbstractProject._poll(AbstractProject.java:1521) at hudson.model.AbstractProject.poll(AbstractProject.java:1446) at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:439) at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:468) at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:118) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)

    Users with the same issue

    Unknown visitor1 times, last one,