播放阶段命令中的“编码字符串太长”错误

时间:2017-02-07 13:07:57

标签: playframework-2.1

使用play framework v2.1.1,我们使用命令

play clean compile stage

生成可部署的工件。过去几个月它运作良好。我们没有改变任何东西,但现在当我再次尝试相同的命令时,它会抛出错误:

java.lang.RuntimeException: encoded string too long: 65909 bytes
at scala.sys.package$.error(package.scala:27)
at scala.Predef$.error(Predef.scala:123)
at sbinary.JavaUTF$StringFormat$.writes(javaprotocol.scala:165)
at sbinary.JavaUTF$StringFormat$.writes(javaprotocol.scala:100)
at sbt.InputCache$$anon$1.write(SeparatedCache.scala:27)
at sbt.HListCacheImplicits$$anon$12.write(Cache.scala:185)
at sbt.HListCacheImplicits$$anon$12.write(Cache.scala:173)
at sbt.HListCacheImplicits$$anon$12.write(Cache.scala:186)
at sbt.HListCacheImplicits$$anon$12.write(Cache.scala:173)
at sbt.HListCacheImplicits$$anon$12.write(Cache.scala:186)
at sbt.HListCacheImplicits$$anon$12.write(Cache.scala:173)
at sbt.Tracked$CacheHelp$$anonfun$save$1.apply(Tracked.scala:68)
at sbt.Tracked$CacheHelp$$anonfun$save$1.apply(Tracked.scala:68)
at sbt.Using.apply(Using.scala:25)
at sbt.Tracked$CacheHelp.save(Tracked.scala:68)
at sbt.Tracked$$anonfun$inputChanged$1.apply(Tracked.scala:48)
at sbt.Doc$class.cached(Doc.scala:55)
at sbt.Scaladoc.cached(Doc.scala:58)
at sbt.Defaults$$anonfun$docTaskSettings$1.apply(Defaults.scala:546)
at sbt.Defaults$$anonfun$docTaskSettings$1.apply(Defaults.scala:540)
at sbt.Scoped$$anonfun$hf5$1.apply(Structure.scala:581)
at sbt.Scoped$$anonfun$hf5$1.apply(Structure.scala:581)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:49)
at sbt.Scoped$Reduced$$anonfun$combine$1$$anonfun$apply$12.apply(Structure.scala:311)
at sbt.Scoped$Reduced$$anonfun$combine$1$$anonfun$apply$12.apply(Structure.scala:311)
at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:41)
at sbt.std.Transform$$anon$5.work(System.scala:71)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:232)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:232)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
at sbt.Execute.work(Execute.scala:238)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:232)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:232)
at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:160)
at sbt.CompletionService$$anon$2.call(CompletionService.scala:30)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)

[error] (compile:doc) encoded string too long: 65909 bytes
[error] Total time: 3 s, completed 7 Feb, 2017 5:35:58 PM

我再次设置播放,清理所有必需的目录但仍然没有成功。任何帮助将不胜感激。

1 个答案:

答案 0 :(得分:1)

我通过删除Java api文档的生成来解决此问题。这是我添加到build.sbt文件中的内容:

publishArtifact in (Compile, packageDoc) := false
publishArtifact in packageDoc := false
sources in (Compile,doc) := Seq.empty