java.nio.file.InvalidPathException

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.

  • When we try to build another job using a properties file to set the parameters, the directory "C:\Program Files (x86)\Jenkins\jobs\jobName\builds\buildNum\archive\" is added to the front of the specified properties file. This same code was working with Jenkins 1.627, it stopped working after we upgraded to 1.636. Is this potentially related to https://issues.jenkins-ci.org/browse/JENKINS-23084 ? or JENKINS-31434 Injecting Environment Variables {code:java} PROPSFULLFILENAME=${WORKSPACE}\triggeredjobvars.properties {code} Execute Windows Batch Command {code:java} @echo. @echo Creating jobvars.properties file %propsFullFileName%... {code} Console output of the windows batch command {code:java} Creating jobvars.properties file C:\Jenkins\workspace\Audit - All Templates - All Acceptance\triggeredjobvars.properties... {code} After some variables are set in the file, a new job is triggered with the parameters set in the properties file that was created. This is the resulting output: {code:java} ERROR: Build step failed with exception java.nio.file.InvalidPathException: Illegal char <:> at index 95: C:\Program Files (x86)\Jenkins\jobs\Audit - All Templates - All Acceptance\builds\471\archive\C:\Jenkins\workspace\Audit - All Templates - All Acceptance\triggeredjobvars.properties at sun.nio.fs.WindowsPathParser.normalize(Unknown Source) at sun.nio.fs.WindowsPathParser.parse(Unknown Source) at sun.nio.fs.WindowsPathParser.parse(Unknown Source) at sun.nio.fs.WindowsPath.parse(Unknown Source) at sun.nio.fs.WindowsFileSystem.getPath(Unknown Source) at java.io.File.toPath(Unknown Source) at jenkins.util.VirtualFile$FileVF.isIllegalSymlink(VirtualFile.java:301) at jenkins.util.VirtualFile$FileVF.isFile(VirtualFile.java:241) at hudson.plugins.parameterizedtrigger.FileBuildParameters.extractAllValues(FileBuildParameters.java:120) at hudson.plugins.parameterizedtrigger.FileBuildParameters.getAction(FileBuildParameters.java:108) at hudson.plugins.parameterizedtrigger.BuildTriggerConfig.getBaseActions(BuildTriggerConfig.java:292) at hudson.plugins.parameterizedtrigger.BuildTriggerConfig.perform3(BuildTriggerConfig.java:378) at hudson.plugins.parameterizedtrigger.BlockableBuildTriggerConfig.perform3(BlockableBuildTriggerConfig.java:66) at hudson.plugins.parameterizedtrigger.TriggerBuilder.perform(TriggerBuilder.java:88) at org.jenkinsci.plugins.conditionalbuildstep.BuilderChain.perform(BuilderChain.java:71) at org.jenkins_ci.plugins.run_condition.BuildStepRunner$2.run(BuildStepRunner.java:110) at org.jenkins_ci.plugins.run_condition.BuildStepRunner$Fail.conditionalRun(BuildStepRunner.java:154) at org.jenkins_ci.plugins.run_condition.BuildStepRunner.perform(BuildStepRunner.java:105) at org.jenkinsci.plugins.conditionalbuildstep.ConditionalBuilder.perform(ConditionalBuilder.java:133) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:785) at hudson.model.Build$BuildExecution.build(Build.java:205) at hudson.model.Build$BuildExecution.doRun(Build.java:162) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:537) at hudson.model.Run.execute(Run.java:1741) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410) {code} "C:\Program Files (x86)\Jenkins\jobs\Audit - All Templates - All Acceptance\builds\471\archive\" is coming seemingly out of nowhere
    via by Cam Spencer,
  • When we try to build another job using a properties file to set the parameters, the directory "C:\Program Files (x86)\Jenkins\jobs\jobName\builds\buildNum\archive\" is added to the front of the specified properties file. This same code was working with Jenkins 1.627, it stopped working after we upgraded to 1.636. Is this potentially related to https://issues.jenkins-ci.org/browse/JENKINS-23084 ? or JENKINS-31434 Injecting Environment Variables {code:java} PROPSFULLFILENAME=${WORKSPACE}\triggeredjobvars.properties {code} Execute Windows Batch Command {code:java} @echo. @echo Creating jobvars.properties file %propsFullFileName%... {code} Console output of the windows batch command {code:java} Creating jobvars.properties file C:\Jenkins\workspace\Audit - All Templates - All Acceptance\triggeredjobvars.properties... {code} After some variables are set in the file, a new job is triggered with the parameters set in the properties file that was created. This is the resulting output: {code:java} ERROR: Build step failed with exception java.nio.file.InvalidPathException: Illegal char <:> at index 95: C:\Program Files (x86)\Jenkins\jobs\Audit - All Templates - All Acceptance\builds\471\archive\C:\Jenkins\workspace\Audit - All Templates - All Acceptance\triggeredjobvars.properties at sun.nio.fs.WindowsPathParser.normalize(Unknown Source) at sun.nio.fs.WindowsPathParser.parse(Unknown Source) at sun.nio.fs.WindowsPathParser.parse(Unknown Source) at sun.nio.fs.WindowsPath.parse(Unknown Source) at sun.nio.fs.WindowsFileSystem.getPath(Unknown Source) at java.io.File.toPath(Unknown Source) at jenkins.util.VirtualFile$FileVF.isIllegalSymlink(VirtualFile.java:301) at jenkins.util.VirtualFile$FileVF.isFile(VirtualFile.java:241) at hudson.plugins.parameterizedtrigger.FileBuildParameters.extractAllValues(FileBuildParameters.java:120) at hudson.plugins.parameterizedtrigger.FileBuildParameters.getAction(FileBuildParameters.java:108) at hudson.plugins.parameterizedtrigger.BuildTriggerConfig.getBaseActions(BuildTriggerConfig.java:292) at hudson.plugins.parameterizedtrigger.BuildTriggerConfig.perform3(BuildTriggerConfig.java:378) at hudson.plugins.parameterizedtrigger.BlockableBuildTriggerConfig.perform3(BlockableBuildTriggerConfig.java:66) at hudson.plugins.parameterizedtrigger.TriggerBuilder.perform(TriggerBuilder.java:88) at org.jenkinsci.plugins.conditionalbuildstep.BuilderChain.perform(BuilderChain.java:71) at org.jenkins_ci.plugins.run_condition.BuildStepRunner$2.run(BuildStepRunner.java:110) at org.jenkins_ci.plugins.run_condition.BuildStepRunner$Fail.conditionalRun(BuildStepRunner.java:154) at org.jenkins_ci.plugins.run_condition.BuildStepRunner.perform(BuildStepRunner.java:105) at org.jenkinsci.plugins.conditionalbuildstep.ConditionalBuilder.perform(ConditionalBuilder.java:133) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:785) at hudson.model.Build$BuildExecution.build(Build.java:205) at hudson.model.Build$BuildExecution.doRun(Build.java:162) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:537) at hudson.model.Run.execute(Run.java:1741) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410) {code} "C:\Program Files (x86)\Jenkins\jobs\Audit - All Templates - All Acceptance\builds\471\archive\" is coming seemingly out of nowhere
    via by Cam Spencer,
  • java.nio.file.InvalidPathException
    via Stack Overflow by isxana
    ,
  • User list for the Hudson continuous build server.
    via by Unknown author,
    • java.nio.file.InvalidPathException: Illegal char <:> at index 95: C:\Program Files (x86)\Jenkins\jobs\Audit - All Templates - All Acceptance\builds\471\archive\C:\Jenkins\workspace\Audit - All Templates - All Acceptance\triggeredjobvars.properties at sun.nio.fs.WindowsPathParser.normalize(Unknown Source) at sun.nio.fs.WindowsPathParser.parse(Unknown Source) at sun.nio.fs.WindowsPathParser.parse(Unknown Source) at sun.nio.fs.WindowsPath.parse(Unknown Source) at sun.nio.fs.WindowsFileSystem.getPath(Unknown Source) at java.io.File.toPath(Unknown Source) at jenkins.util.VirtualFile$FileVF.isIllegalSymlink(VirtualFile.java:301) at jenkins.util.VirtualFile$FileVF.isFile(VirtualFile.java:241) at hudson.plugins.parameterizedtrigger.FileBuildParameters.extractAllValues(FileBuildParameters.java:120) at hudson.plugins.parameterizedtrigger.FileBuildParameters.getAction(FileBuildParameters.java:108) at hudson.plugins.parameterizedtrigger.BuildTriggerConfig.getBaseActions(BuildTriggerConfig.java:292) at hudson.plugins.parameterizedtrigger.BuildTriggerConfig.perform3(BuildTriggerConfig.java:378) at hudson.plugins.parameterizedtrigger.BlockableBuildTriggerConfig.perform3(BlockableBuildTriggerConfig.java:66) at hudson.plugins.parameterizedtrigger.TriggerBuilder.perform(TriggerBuilder.java:88) at org.jenkinsci.plugins.conditionalbuildstep.BuilderChain.perform(BuilderChain.java:71) at org.jenkins_ci.plugins.run_condition.BuildStepRunner$2.run(BuildStepRunner.java:110) at org.jenkins_ci.plugins.run_condition.BuildStepRunner$Fail.conditionalRun(BuildStepRunner.java:154) at org.jenkins_ci.plugins.run_condition.BuildStepRunner.perform(BuildStepRunner.java:105) at org.jenkinsci.plugins.conditionalbuildstep.ConditionalBuilder.perform(ConditionalBuilder.java:133) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:785) at hudson.model.Build$BuildExecution.build(Build.java:205) at hudson.model.Build$BuildExecution.doRun(Build.java:162) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:537) at hudson.model.Run.execute(Run.java:1741) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410)

    Users with the same issue

    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    bpbhat77
    10 times, last one,
    Adarro
    1 times, last one,
    Unknown visitor2 times, last one,
    9 more bugmates