“运行Play项目时,在GZIPInputStream中包装InputStream时出错”

时间:2017-09-27 16:22:17

标签: java exception playframework sbt

当我获得BSOD时,我正在开发我的Play项目。重新启动计算机后,尝试运行任何激活器命令(例如activator cleanactivator run)时,我开始收到以下异常:

[info] Done updating.
Error wrapping InputStream in GZIPInputStream: java.util.zip.ZipException: Not in GZIP format
    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:863)
    at sbt.IO$$anonfun$gzipFileIn$1.apply(IO.scala:862)
    at sbt.Using.apply(Using.scala:24)
    at sbt.IO$.gzipFileIn(IO.scala:862)
    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:941)
    at sbt.Defaults$$anonfun$copyResourcesTask$1.apply(Defaults.scala:937)
    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:228)
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
    at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
    at sbt.Execute.work(Execute.scala:237)
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
    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)
Caused by: java.util.zip.ZipException: Not in GZIP format
    at java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java:165)
    at java.util.zip.GZIPInputStream.<init>(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:863)
    at sbt.IO$$anonfun$gzipFileIn$1.apply(IO.scala:862)
    at sbt.Using.apply(Using.scala:24)
    at sbt.IO$.gzipFileIn(IO.scala:862)
    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:941)
    at sbt.Defaults$$anonfun$copyResourcesTask$1.apply(Defaults.scala:937)
    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:228)
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
    at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
    at sbt.Execute.work(Execute.scala:237)
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
    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] (root/compile:copyResources) Error wrapping InputStream in GZIPInputStream: java.util.zip.ZipException: Not in GZIP format

我尝试了所有找到的解决方法。我删除了我试图运行的项目中的“项目”和所有“目标”文件夹以及它所依赖的项目。我删除了“C:\ Users ...”中的“.sbt”文件夹。我甚至清理了TEMP目录。没有任何帮助 - 我仍然在日志中“从...加载项目定义”和“解析...”消息后收到此错误。还有什么办法可以解决这个问题?

2 个答案:

答案 0 :(得分:1)

尝试清理项目的目标目录

cd ${your_project}
rm -fr project/target
rm -fr project/project/target

答案 1 :(得分:0)

我已经解决了这个问题 - 还有一些其他的依赖项目,当我清理它们时,这个问题就失败了。