Error wrapping InputStream in GZIPInputStream: java.io.EOFException

问题:

本地编译scaladiagrams,报错如下,看日志应该是本地sbt环境问题:

Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
[info] Loading global plugins from /Users/XXXX/.sbt/0.13/plugins
Error wrapping InputStream in GZIPInputStream: java.io.EOFException
    at sbt.ErrorHandling$.translate(ErrorHandling.scala:10)
    at sbt.WrapUsing.open(Using.scala:34)
    at sbt.Using.apply(Using.scala:23)
    at sbt.IO$$anonfun$gzipFileIn$1.apply(IO.scala:810)
    at sbt.IO$$anonfun$gzipFileIn$1.apply(IO.scala:809)
    at sbt.Using.apply(Using.scala:24)
    at sbt.IO$.gzipFileIn(IO.scala:809)
    at sbt.Sync$.readUncaught(Sync.scala:88)
    at sbt.Sync$.readInfo(Sync.scala:84)
    at sbt.Sync$$anonfun$apply$1.apply(Sync.scala:28)
    at sbt.Sync$$anonfun$apply$1.apply(Sync.scala:22)
    at sbt.Defaults$$anonfun$copyResourcesTask$1.apply(Defaults.scala:840)
    at sbt.Defaults$$anonfun$copyResourcesTask$1.apply(Defaults.scala:836)
    at scala.Function4$$anonfun$tupled$1.apply(Function4.scala:35)
    at scala.Function4$$anonfun$tupled$1.apply(Function4.scala:34)
    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:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.EOFException
    at java.util.zip.GZIPInputStream.readUByte(GZIPInputStream.java:268)
    at java.util.zip.GZIPInputStream.readUShort(GZIPInputStream.java:258)
    at java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java:164)
    at java.util.zip.GZIPInputStream.(GZIPInputStream.java:79)
    at sbt.Using$$anonfun$gzipInputStream$1.apply(Using.scala:84)
    at sbt.Using$$anonfun$gzipInputStream$1.apply(Using.scala:84)
    at sbt.Using$$anon$1.openImpl(Using.scala:51)
    at sbt.WrapUsing$$anonfun$open$2.apply(Using.scala:34)
    at sbt.ErrorHandling$.translate(ErrorHandling.scala:10)
    at sbt.WrapUsing.open(Using.scala:34)
    at sbt.Using.apply(Using.scala:23)
    at sbt.IO$$anonfun$gzipFileIn$1.apply(IO.scala:810)
    at sbt.IO$$anonfun$gzipFileIn$1.apply(IO.scala:809)
    at sbt.Using.apply(Using.scala:24)
    at sbt.IO$.gzipFileIn(IO.scala:809)
    at sbt.Sync$.readUncaught(Sync.scala:88)
    at sbt.Sync$.readInfo(Sync.scala:84)
    at sbt.Sync$$anonfun$apply$1.apply(Sync.scala:28)
    at sbt.Sync$$anonfun$apply$1.apply(Sync.scala:22)
    at sbt.Defaults$$anonfun$copyResourcesTask$1.apply(Defaults.scala:840)
    at sbt.Defaults$$anonfun$copyResourcesTask$1.apply(Defaults.scala:836)
    at scala.Function4$$anonfun$tupled$1.apply(Function4.scala:35)
    at scala.Function4$$anonfun$tupled$1.apply(Function4.scala:34)
    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:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
[error] (compile:copyResources) Error wrapping InputStream in GZIPInputStream: java.io.EOFException
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? i
[warn] Ignoring load failure: no project loaded.

原因:

可能是本地sbt repo环境等问题影响

解决:

删除~/.sbt路径下target目录。如下:

> cd ~/.sbt
> find . -name target | xargs rm -rf


然后回到项目跟路径,重新build即可

你可能感兴趣的:(随手记)