Intermittent java.io.FileNotFoundException on release
See original GitHub issueWhen running
sbt -Dpublish.url=${releases_url} clean release
we get the following stacktrace, but it works OK with sbt assembly
. What is really weird is it only happens sometimes, sometimes it works!
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)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at sbt.Using$$anonfun$fileInputStream$1.apply(Using.scala:73)
at sbt.Using$$anonfun$fileInputStream$1.apply(Using.scala:73)
at sbt.Using$$anon$2.openImpl(Using.scala:65)
at sbt.OpenFile$class.open(Using.scala:43)
at sbt.Using$$anon$2.open(Using.scala:64)
at sbt.Using$$anon$2.open(Using.scala:64)
at sbt.Using.apply(Using.scala:23)
at sbt.IO$.transfer(IO.scala:252)
at sbt.IO$.sbt$IO$$addFileEntry$1(IO.scala:446)
at sbt.IO$$anonfun$sbt$IO$$writeZip$2.apply(IO.scala:454)
at sbt.IO$$anonfun$sbt$IO$$writeZip$2.apply(IO.scala:454)
at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59)
at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:47)
at sbt.IO$.sbt$IO$$writeZip(IO.scala:454)
at sbt.IO$$anonfun$archive$1.apply(IO.scala:410)
at sbt.IO$$anonfun$archive$1.apply(IO.scala:408)
at sbt.IO$$anonfun$withZipOutput$1.apply(IO.scala:498)
at sbt.IO$$anonfun$withZipOutput$1.apply(IO.scala:485)
at sbt.Using.apply(Using.scala:24)
at sbt.IO$.withZipOutput(IO.scala:485)
at sbt.IO$.archive(IO.scala:408)
at sbt.IO$.jar(IO.scala:392)
at sbt.Package$.makeJar(Package.scala:97)
at sbt.Package$$anonfun$3$$anonfun$apply$3.apply(Package.scala:64)
at sbt.Package$$anonfun$3$$anonfun$apply$3.apply(Package.scala:62)
at sbt.Tracked$$anonfun$outputChanged$1.apply(Tracked.scala:84)
at sbt.Tracked$$anonfun$outputChanged$1.apply(Tracked.scala:79)
at sbt.Package$.apply(Package.scala:72)
at sbt.Defaults$$anonfun$packageTask$1.apply(Defaults.scala:685)
at sbt.Defaults$$anonfun$packageTask$1.apply(Defaults.scala:684)
at scala.Function2$$anonfun$tupled$1.apply(Function2.scala:54)
at scala.Function2$$anonfun$tupled$1.apply(Function2.scala:53)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
at sbt.std.Transform$$anon$4.work(System.scala:63)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
at sbt.Execute.work(Execute.scala:235)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
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)
[error] (compile:packageBin) java.io.FileNotFoundException: /var/lib/jenkins/workspace/altmetrics/target/scala-2.10/classes/com/MCLASS$$anonfun$main$5$$anonfun$apply$3$$anonfun$apply$5.class (No such file or directory)
[error] Total time: 57 s, completed Dec 7, 2015 4:35:59 PM
Issue Analytics
- State:
- Created 8 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
xsl fo - What can cause fop intermittent java.io ... - Stack Overflow
Is this a known issue, was it solved in a fop release ? What can cause this ? AFAIK No changes related to...
Read more >How to Fix the FileNotFoundException in Java.io - Rollbar
The FileNotFoundException is a checked exception in Java that occurs when an attempt to open a file denoted by a specified pathname fails....
Read more >94415 – Intermittent java.io.FileNotFoundException during ...
run(EventDispatchThread.java:121) Caused by: java.io.FileNotFoundException: C:\Documents and Settings\sandeep\WebApplication144\web\.LCKPage9.
Read more >FileNotFoundException intermittently occurs on the Android ...
When calling track() of the amplitude SDK, the app crashes with a FileNotFoundException error. It's a very occasional error, but I don't know ......
Read more >java.io.FileNotFoundException when running tests from ... - IBM
When running tests from a command prompt with IBM® Rational® Performance Tester, an intermittent java.io.FileNotFoundException error can ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi, is there any update on this issue? We’re experiencing this in our build. Every other deploy attempt ends with this exception.
FYI we had this problem as well when using sbt-assembly 0.14.0 and it’s fixed now with sbt-assembly 0.14.3. Like in the build file above we are using shading and I believe that was causing the problem. It seems that it was fixed by this: https://github.com/sbt/sbt-assembly/pull/197