java.io.FileNotFoundException

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.

  • So the problem was that I assumed that if you don't define a location for the file then it would default to just the file in the root of the workspace - which I think is not unreasonable (in fact I didn't notice the location field). And if you do so you get the kind of unhelpful message below: I created a new job that accepts a file parameter. I ran this job and selected a file. And I get this as the job output: ... Copying file to FATAL: d:\hudsonwork\workspace\generate_wer_submission_file (Access is denied) java.io.FileNotFoundException: d:\hudsonwork\workspace\generate_wer_submission_file (Access is denied) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.<init>(Unknown Source) at java.io.FileOutputStream.<init>(Unknown Source) at hudson.FilePath$25.call(FilePath.java:1298) at hudson.FilePath$25.call(FilePath.java:1294) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:287) 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$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at hudson.remoting.Engine$1$1.run(Engine.java:60) at java.lang.Thread.run(Unknown Source) So it seems that Jenkins can't write the uploaded file to the directory. Which itself created. I checked on the slave and the directory does exist, the path is correct and (as a different part of the job) svn files were checked out there.
    via by sanga,
  • So the problem was that I assumed that if you don't define a location for the file then it would default to just the file in the root of the workspace - which I think is not unreasonable (in fact I didn't notice the location field). And if you do so you get the kind of unhelpful message below: I created a new job that accepts a file parameter. I ran this job and selected a file. And I get this as the job output: ... Copying file to FATAL: d:\hudsonwork\workspace\generate_wer_submission_file (Access is denied) java.io.FileNotFoundException: d:\hudsonwork\workspace\generate_wer_submission_file (Access is denied) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.<init>(Unknown Source) at java.io.FileOutputStream.<init>(Unknown Source) at hudson.FilePath$25.call(FilePath.java:1298) at hudson.FilePath$25.call(FilePath.java:1294) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:287) 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$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at hudson.remoting.Engine$1$1.run(Engine.java:60) at java.lang.Thread.run(Unknown Source) So it seems that Jenkins can't write the uploaded file to the directory. Which itself created. I checked on the slave and the directory does exist, the path is correct and (as a different part of the job) svn files were checked out there.
    via by sanga,
  • Using a ClearCase dynamic view, the root path itself is read-only (which contains N number of VOBs or repos, managed by the server), which prevents me from using this really valuable plugin. The error text from a job console looks like so: {noformat} 15:25:59 Running Prebuild steps 15:25:59 executing script 'ScriptBuildStepConfigProvider.1325285620945' 15:25:59 FATAL: Cannot create temporary script 'Setup ClearCase environment' 15:25:59 hudson.util.IOException2: Failed to copy C:\Users\garepa.SEL\AppData\Local\Temp\build_step_template5292341656269454572.sh to M:\garepa_ux_view2/build_step_template5292341656269454572.sh 15:25:59 at hudson.FilePath.copyTo(FilePath.java:1415) 15:25:59 at org.jenkinsci.plugins.managedscripts.ScriptBuildStep.perform(ScriptBuildStep.java:167) 15:25:59 at org.jenkinsci.plugins.preSCMbuildstep.PreSCMBuildStepsWrapper.preCheckout(PreSCMBuildStepsWrapper.java:116) 15:25:59 at hudson.model.AbstractBuild$AbstractRunner.preCheckout(AbstractBuild.java:559) 15:25:59 at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:459) 15:25:59 at hudson.model.Run.run(Run.java:1404) 15:25:59 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) 15:25:59 at hudson.model.ResourceController.execute(ResourceController.java:88) 15:25:59 at hudson.model.Executor.run(Executor.java:238) 15:25:59 Caused by: java.io.FileNotFoundException: M:\garepa_ux_view2\build_step_template5292341656269454572.sh (The media is write protected) 15:25:59 at java.io.FileOutputStream.open(Native Method) 15:25:59 at java.io.FileOutputStream.<init>(Unknown Source) 15:25:59 at java.io.FileOutputStream.<init>(Unknown Source) 15:25:59 at hudson.FilePath$25.call(FilePath.java:1323) 15:25:59 at hudson.FilePath$25.call(FilePath.java:1319) 15:25:59 at hudson.remoting.LocalChannel.call(LocalChannel.java:45) 15:25:59 at hudson.FilePath.write(FilePath.java:1319) 15:25:59 at hudson.FilePath.copyTo(FilePath.java:1408) 15:25:59 ... 8 more 15:25:59 Failed build for org.jenkinsci.plugins.managedscripts.ScriptBuildStep@1ebae65 {noformat} The copying would have succeeded if instead the destination to copy to was taken from the path in the WORKSPACE environment variable (which I'd think would be the original intent?)
    via by Garen Parham,
  • Using a ClearCase dynamic view, the root path itself is read-only (which contains N number of VOBs or repos, managed by the server), which prevents me from using this really valuable plugin. The error text from a job console looks like so: {noformat} 15:25:59 Running Prebuild steps 15:25:59 executing script 'ScriptBuildStepConfigProvider.1325285620945' 15:25:59 FATAL: Cannot create temporary script 'Setup ClearCase environment' 15:25:59 hudson.util.IOException2: Failed to copy C:\Users\garepa.SEL\AppData\Local\Temp\build_step_template5292341656269454572.sh to M:\garepa_ux_view2/build_step_template5292341656269454572.sh 15:25:59 at hudson.FilePath.copyTo(FilePath.java:1415) 15:25:59 at org.jenkinsci.plugins.managedscripts.ScriptBuildStep.perform(ScriptBuildStep.java:167) 15:25:59 at org.jenkinsci.plugins.preSCMbuildstep.PreSCMBuildStepsWrapper.preCheckout(PreSCMBuildStepsWrapper.java:116) 15:25:59 at hudson.model.AbstractBuild$AbstractRunner.preCheckout(AbstractBuild.java:559) 15:25:59 at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:459) 15:25:59 at hudson.model.Run.run(Run.java:1404) 15:25:59 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) 15:25:59 at hudson.model.ResourceController.execute(ResourceController.java:88) 15:25:59 at hudson.model.Executor.run(Executor.java:238) 15:25:59 Caused by: java.io.FileNotFoundException: M:\garepa_ux_view2\build_step_template5292341656269454572.sh (The media is write protected) 15:25:59 at java.io.FileOutputStream.open(Native Method) 15:25:59 at java.io.FileOutputStream.<init>(Unknown Source) 15:25:59 at java.io.FileOutputStream.<init>(Unknown Source) 15:25:59 at hudson.FilePath$25.call(FilePath.java:1323) 15:25:59 at hudson.FilePath$25.call(FilePath.java:1319) 15:25:59 at hudson.remoting.LocalChannel.call(LocalChannel.java:45) 15:25:59 at hudson.FilePath.write(FilePath.java:1319) 15:25:59 at hudson.FilePath.copyTo(FilePath.java:1408) 15:25:59 ... 8 more 15:25:59 Failed build for org.jenkinsci.plugins.managedscripts.ScriptBuildStep@1ebae65 {noformat} The copying would have succeeded if instead the destination to copy to was taken from the path in the WORKSPACE environment variable (which I'd think would be the original intent?)
    via by Garen Parham,
  • Saving causing time outs
    via GitHub by prodkid
    ,
  • setting up connection issues
    via by 713392,
  • Problem downloading modpack
    via GitHub by Pokefenn
    ,
    • java.io.FileNotFoundException: d:\hudsonwork\workspace\generate_wer_submission_file (Access is denied) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.<init>(Unknown Source) at java.io.FileOutputStream.<init>(Unknown Source) at hudson.FilePath$25.call(FilePath.java:1298) at hudson.FilePath$25.call(FilePath.java:1294) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:287) 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$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at hudson.remoting.Engine$1$1.run(Engine.java:60) at java.lang.Thread.run(Unknown Source)

    Users with the same issue

    renireni
    1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor2 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    150 more bugmates