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.

  • Exception: {noformat} executing script 'Post-SCM-git-submodule-update-and-clean' [Job] $ "C:\Program Files (x86)\Git\bin\bash.exe" -e C:\Users\HANDSE~1\AppData\Local\Temp\build_step_template2413741568138346591.sh FATAL: Caught exception while loading script 'Post-SCM-git-submodule-update-and-clean' java.lang.IllegalArgumentException: Executable name has embedded quote, split the arguments at java.lang.ProcessImpl.isQuoted(Unknown Source) at java.lang.ProcessImpl.getExecutablePath(Unknown Source) at java.lang.ProcessImpl.<init>(Unknown Source) at java.lang.ProcessImpl.start(Unknown Source) at java.lang.ProcessBuilder.start(Unknown Source) at hudson.Proc$LocalProc.<init>(Proc.java:244) at hudson.Proc$LocalProc.<init>(Proc.java:216) at hudson.Launcher$LocalLauncher.launch(Launcher.java:763) at hudson.Launcher$ProcStarter.start(Launcher.java:353) at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:988) at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:955) 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(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 hudson.remoting.Engine$1$1.run(Engine.java:58) at java.lang.Thread.run(Unknown Source) Build step 'Execute managed script' marked build as failure {noformat} Contents of the managed script: {noformat} #!"C:\Program Files (x86)\Git\bin\bash.exe" -e git fetch origin git submodule update --recursive --init git clean -ffdx git submodule foreach --recursive 'git clean -ffdx; git reset --hard' {noformat} Java 7u21 has changed the way quotes are handled by Runtime.exec() on Windows: http://www.oracle.com/technetwork/java/javase/7u21-relnotes-1932873.html#jruntime Downgrading the slaves to Java 7u17 fixed the problem. I suppose I could have used {{PROGRA~2}} instead of the quotes, but that's pretty ugly. I've placed this issue in the managed-scripts component because I haven't experienced the same issue with regular "Execute Shell" build steps.
    via by Michael Vincent,
  • Exception: {noformat} executing script 'Post-SCM-git-submodule-update-and-clean' [Job] $ "C:\Program Files (x86)\Git\bin\bash.exe" -e C:\Users\HANDSE~1\AppData\Local\Temp\build_step_template2413741568138346591.sh FATAL: Caught exception while loading script 'Post-SCM-git-submodule-update-and-clean' java.lang.IllegalArgumentException: Executable name has embedded quote, split the arguments at java.lang.ProcessImpl.isQuoted(Unknown Source) at java.lang.ProcessImpl.getExecutablePath(Unknown Source) at java.lang.ProcessImpl.<init>(Unknown Source) at java.lang.ProcessImpl.start(Unknown Source) at java.lang.ProcessBuilder.start(Unknown Source) at hudson.Proc$LocalProc.<init>(Proc.java:244) at hudson.Proc$LocalProc.<init>(Proc.java:216) at hudson.Launcher$LocalLauncher.launch(Launcher.java:763) at hudson.Launcher$ProcStarter.start(Launcher.java:353) at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:988) at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:955) 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(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 hudson.remoting.Engine$1$1.run(Engine.java:58) at java.lang.Thread.run(Unknown Source) Build step 'Execute managed script' marked build as failure {noformat} Contents of the managed script: {noformat} #!"C:\Program Files (x86)\Git\bin\bash.exe" -e git fetch origin git submodule update --recursive --init git clean -ffdx git submodule foreach --recursive 'git clean -ffdx; git reset --hard' {noformat} Java 7u21 has changed the way quotes are handled by Runtime.exec() on Windows: http://www.oracle.com/technetwork/java/javase/7u21-relnotes-1932873.html#jruntime Downgrading the slaves to Java 7u17 fixed the problem. I suppose I could have used {{PROGRA~2}} instead of the quotes, but that's pretty ugly. I've placed this issue in the managed-scripts component because I haven't experienced the same issue with regular "Execute Shell" build steps.
    via by Michael Vincent,
  • PRQA Plugin - Jenkins - Jenkins Wiki
    via by Unknown author,
  • Java 1.7_21 imcompatible
    via GitHub by taccode
    ,
  • Java syntax escapting symbols?
    via Stack Overflow by Ben Beri
    ,
  • Reproduction 1. I created a sample freestyle job (it doesn't do anything and makes no sense, event the pom is not there) and added "Invoke top-level Maven targets" step. 2. I selected "This build is parametrized" and added many types of parameters (both default and coming from other plugins): - text parameter - boolean value - build selector for copy artifact - password parameter - string parameter 3. When the project is run, all parameters are added as "-Dkey=value" to Maven invocation: {quote} [workspace] $ C:\Software\apache-maven-3.1.1\bin\mvn.bat -f pom.xml "-Dtext=abcd efgh" '-Dcopyartifactselector=<StatusBuildSelector plugin="copyartifact@1.28"> <stable>true</stable></StatusBuildSelector>' "-Dstring=string asdasd" -Dbool=true ******** clean FATAL: command execution failed java.io.IOException: Cannot run program "C:\Software\apache-maven-3.1.1\bin\mvn.bat" (in directory "G:\JenkinsData\JenkinsHome\jobs\test-one\workspace"): Argument has embedded quote, use the explicit CMD.EXE call. at java.lang.ProcessBuilder.start(Unknown Source) at hudson.Proc$LocalProc.<init>(Proc.java:244) at hudson.Proc$LocalProc.<init>(Proc.java:216) at hudson.Launcher$LocalLauncher.launch(Launcher.java:773) at hudson.Launcher$ProcStarter.start(Launcher.java:353) at hudson.Launcher$ProcStarter.join(Launcher.java:360) at hudson.tasks.Maven.perform(Maven.java:329) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:781) at hudson.model.Build$BuildExecution.build(Build.java:199) at hudson.model.Build$BuildExecution.doRun(Build.java:160) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:562) at hudson.model.Run.execute(Run.java:1665) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:246) Caused by: java.lang.IllegalArgumentException: Argument has embedded quote, use the explicit CMD.EXE call. at java.lang.ProcessImpl.isQuoted(Unknown Source) at java.lang.ProcessImpl.needsEscaping(Unknown Source) at java.lang.ProcessImpl.createCommandLine(Unknown Source) at java.lang.ProcessImpl.<init>(Unknown Source) at java.lang.ProcessImpl.start(Unknown Source) ... 16 more {quote} Why are parameters implicitly included in the call? Is there a way to disable this behaviour? I would expect the step to require explicit parameters provisioning through Properties field in the config.
    via by Tomasz Ptak,
    • java.lang.IllegalArgumentException: Executable name has embedded quote, split the arguments at java.lang.ProcessImpl.isQuoted(Unknown Source) at java.lang.ProcessImpl.getExecutablePath(Unknown Source) at java.lang.ProcessImpl.<init>(Unknown Source) at java.lang.ProcessImpl.start(Unknown Source) at java.lang.ProcessBuilder.start(Unknown Source) at hudson.Proc$LocalProc.<init>(Proc.java:244) at hudson.Proc$LocalProc.<init>(Proc.java:216) at hudson.Launcher$LocalLauncher.launch(Launcher.java:763) at hudson.Launcher$ProcStarter.start(Launcher.java:353) at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:988) at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:955) 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(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 hudson.remoting.Engine$1$1.run(Engine.java:58) at java.lang.Thread.run(Unknown Source)
    No Bugmate found.