java.lang.IllegalArgumentException: Executable name has embedded quote, split the arguments

Jenkins JIRA | Michael Vincent | 3 years ago
  1. 0

    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.

    Jenkins JIRA | 3 years ago | Michael Vincent
    java.lang.IllegalArgumentException: Executable name has embedded quote, split the arguments
  2. 0

    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.

    Jenkins JIRA | 3 years ago | Michael Vincent
    java.lang.IllegalArgumentException: Executable name has embedded quote, split the arguments
  3. 0

    PRQA Plugin - Jenkins - Jenkins Wiki

    jenkins-ci.org | 7 months ago
    java.lang.IllegalArgumentException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Java syntax escapting symbols?

    Stack Overflow | 3 years ago | Ben Beri
    java.lang.IllegalArgumentException: Executable name has embedded quote, split the arguments
  6. 0

    Runtime.exec not working after the latest Java Update?

    Stack Overflow | 4 years ago | Matei Trandafir
    java.lang.IllegalArgumentException: Executable name has embedded quote, split the arguments

    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.IllegalArgumentException

      Executable name has embedded quote, split the arguments

      at java.lang.ProcessImpl.isQuoted()
    2. Java RT
      ProcessBuilder.start
      1. java.lang.ProcessImpl.isQuoted(Unknown Source)
      2. java.lang.ProcessImpl.getExecutablePath(Unknown Source)
      3. java.lang.ProcessImpl.<init>(Unknown Source)
      4. java.lang.ProcessImpl.start(Unknown Source)
      5. java.lang.ProcessBuilder.start(Unknown Source)
      5 frames
    3. Hudson
      Launcher$RemoteLaunchCallable.call
      1. hudson.Proc$LocalProc.<init>(Proc.java:244)
      2. hudson.Proc$LocalProc.<init>(Proc.java:216)
      3. hudson.Launcher$LocalLauncher.launch(Launcher.java:763)
      4. hudson.Launcher$ProcStarter.start(Launcher.java:353)
      5. hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:988)
      6. hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:955)
      6 frames
    4. Hudson :: Remoting Layer
      InterceptingExecutorService$1.call
      1. hudson.remoting.UserRequest.perform(UserRequest.java:118)
      2. hudson.remoting.UserRequest.perform(UserRequest.java:48)
      3. hudson.remoting.Request$2.run(Request.java:326)
      4. hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      4 frames
    5. Java RT
      ThreadPoolExecutor$Worker.run
      1. java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
      2. java.util.concurrent.FutureTask.run(Unknown Source)
      3. java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      4. java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      4 frames
    6. Hudson :: Remoting Layer
      Engine$1$1.run
      1. hudson.remoting.Engine$1$1.run(Engine.java:58)
      1 frame
    7. Java RT
      Thread.run
      1. java.lang.Thread.run(Unknown Source)
      1 frame