java.io.FileNotFoundException: /temp/dev/pipeline/common.json (No such file or directory)

Jenkins JIRA | Anudeep Lalam | 4 months ago
  1. 0

    Hi, While using Java File method, Jenkins is searching for the existence of file in master even though we run under slave node and throwing file not found exception. Below is our code {code} import groovy.json.* def commonJsonFile def commonJsonText node('NETSEC_PUNE_SUSE11_X86_1') { commonJsonFile = new File('/temp/dev/pipeline/common.json') commonJsonText = new JsonSlurper().parseText(commonJsonFile.text) } println(commonJsonText.pspopensslv6.gitproject); {code} Below is the error we got {code} [Pipeline] node Running on NETSEC_PUNE_SUSE11_X86_1 in ********** Pipeline] { [Pipeline] } [Pipeline] // node [Pipeline] End of Pipeline java.io.FileNotFoundException: /temp/dev/pipeline/common.json (No such file or directory) at java.io.FileInputStream.open0(Native Method) at java.io.FileInputStream.open(FileInputStream.java:195) at java.io.FileInputStream.<init>(FileInputStream.java:138) at groovy.util.CharsetToolkit.<init>(CharsetToolkit.java:71) at org.codehaus.groovy.runtime.ResourceGroovyMethods.newReader(ResourceGroovyMethods.java:1572) at org.codehaus.groovy.runtime.ResourceGroovyMethods.getText(ResourceGroovyMethods.java:600) at org.codehaus.groovy.runtime.dgm$962.doMethodInvoke(Unknown Source) at org.codehaus.groovy.reflection.GeneratedMetaMethod$Proxy.doMethodInvoke(GeneratedMetaMethod.java:73) at groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:1852) at groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:3735) at org.codehaus.groovy.runtime.InvokerHelper.getProperty(InvokerHelper.java:177) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.getProperty(ScriptBytecodeAdapter.java:456) at com.cloudbees.groovy.cps.sandbox.DefaultInvoker.getProperty(DefaultInvoker.java:26) at com.cloudbees.groovy.cps.impl.PropertyAccessBlock.rawGet(PropertyAccessBlock.java:20) at WorkflowScript.run(WorkflowScript:10) at ___cps.transform___(Native Method) at com.cloudbees.groovy.cps.impl.PropertyishBlock$ContinuationImpl.get(PropertyishBlock.java:74) at com.cloudbees.groovy.cps.LValueBlock$GetAdapter.receive(LValueBlock.java:30) at com.cloudbees.groovy.cps.impl.PropertyishBlock$ContinuationImpl.fixName(PropertyishBlock.java:66) at sun.reflect.GeneratedMethodAccessor414.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72) at com.cloudbees.groovy.cps.impl.ConstantBlock.eval(ConstantBlock.java:21) at com.cloudbees.groovy.cps.Next.step(Next.java:58) at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:154) at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:164) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:361) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$100(CpsThreadGroup.java:80) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:236) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:226) at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:47) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:112) at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Finished: FAILURE {code}

    Jenkins JIRA | 4 months ago | Anudeep Lalam
    java.io.FileNotFoundException: /temp/dev/pipeline/common.json (No such file or directory)
  2. 0

    Intermittent java.io.FileNotFoundException on release

    GitHub | 1 year ago | samthebest
    java.io.FileNotFoundException: /var/lib/jenkins/workspace/altmetrics/target/scala-2.10/classes/com/MYCLASS$$anonfun$main$5$$anonfun$apply$3$$anonfun$apply$5.class (No such file or directory)
  3. 0

    I am studying Robolectric but an error occured

    Stack Overflow | 2 years ago | kidoher
    java.io.FileNotFoundException: build/intermediates/bundles/debug/AndroidManifest.xml (No such file or directory)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    How to use serialized CRFClassifier with StanfordCoreNLP prop 'ner'

    Stack Overflow | 2 years ago
    java.io.FileNotFoundException: edu/stanford/nlp/models/ner/english.all.3class.distsim.crf.ser.gz (No such file or directory)
  6. 0

    Jenkins(not local) is not able to find input sheet(.xlsx)

    Stack Overflow | 1 year ago | Ayan Haldar
    java.io.FileNotFoundException: C:\Users\Ayan_Haldar\workspace2\test\Test\test\TestData.xlsx (The system cannot find the path specified)**

  1. r1chjames 1 times, last 4 days ago
  2. richard77 1 times, last 1 week ago
  3. gehel 2 times, last 2 weeks ago
  4. Kialandei 100 times, last 2 weeks ago
  5. Reich 1 times, last 2 weeks ago
45 more registered users
50 unregistered visitors
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.io.FileNotFoundException

    /temp/dev/pipeline/common.json (No such file or directory)

    at java.io.FileInputStream.open0()
  2. Java RT
    FileInputStream.<init>
    1. java.io.FileInputStream.open0(Native Method)
    2. java.io.FileInputStream.open(FileInputStream.java:195)
    3. java.io.FileInputStream.<init>(FileInputStream.java:138)
    3 frames
  3. Groovy
    ScriptBytecodeAdapter.getProperty
    1. groovy.util.CharsetToolkit.<init>(CharsetToolkit.java:71)
    2. org.codehaus.groovy.runtime.ResourceGroovyMethods.newReader(ResourceGroovyMethods.java:1572)
    3. org.codehaus.groovy.runtime.ResourceGroovyMethods.getText(ResourceGroovyMethods.java:600)
    4. org.codehaus.groovy.runtime.dgm$962.doMethodInvoke(Unknown Source)
    5. org.codehaus.groovy.reflection.GeneratedMetaMethod$Proxy.doMethodInvoke(GeneratedMetaMethod.java:73)
    6. groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:1852)
    7. groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:3735)
    8. org.codehaus.groovy.runtime.InvokerHelper.getProperty(InvokerHelper.java:177)
    9. org.codehaus.groovy.runtime.ScriptBytecodeAdapter.getProperty(ScriptBytecodeAdapter.java:456)
    9 frames
  4. com.cloudbees.groovy
    PropertyAccessBlock.rawGet
    1. com.cloudbees.groovy.cps.sandbox.DefaultInvoker.getProperty(DefaultInvoker.java:26)
    2. com.cloudbees.groovy.cps.impl.PropertyAccessBlock.rawGet(PropertyAccessBlock.java:20)
    2 frames
  5. Unknown
    ___cps.transform___
    1. WorkflowScript.run(WorkflowScript:10)
    2. ___cps.transform___(Native Method)
    2 frames
  6. com.cloudbees.groovy
    PropertyishBlock$ContinuationImpl.fixName
    1. com.cloudbees.groovy.cps.impl.PropertyishBlock$ContinuationImpl.get(PropertyishBlock.java:74)
    2. com.cloudbees.groovy.cps.LValueBlock$GetAdapter.receive(LValueBlock.java:30)
    3. com.cloudbees.groovy.cps.impl.PropertyishBlock$ContinuationImpl.fixName(PropertyishBlock.java:66)
    3 frames
  7. Java RT
    Method.invoke
    1. sun.reflect.GeneratedMethodAccessor414.invoke(Unknown Source)
    2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    3. java.lang.reflect.Method.invoke(Method.java:497)
    3 frames
  8. com.cloudbees.groovy
    Continuable.run0
    1. com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
    2. com.cloudbees.groovy.cps.impl.ConstantBlock.eval(ConstantBlock.java:21)
    3. com.cloudbees.groovy.cps.Next.step(Next.java:58)
    4. com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:154)
    4 frames
  9. org.jenkinsci.plugins
    CpsVmExecutorService$2.call
    1. org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:164)
    2. org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:361)
    3. org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$100(CpsThreadGroup.java:80)
    4. org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:236)
    5. org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:226)
    6. org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:47)
    6 frames
  10. Java RT
    FutureTask.run
    1. java.util.concurrent.FutureTask.run(FutureTask.java:266)
    1 frame
  11. Hudson :: Remoting Layer
    SingleLaneExecutorService$1.run
    1. hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:112)
    1 frame
  12. jenkins.util
    ContextResettingExecutorService$1.run
    1. jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
    1 frame
  13. Java RT
    Thread.run
    1. java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    2. java.util.concurrent.FutureTask.run(FutureTask.java:266)
    3. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    4. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    5. java.lang.Thread.run(Thread.java:745)
    5 frames