Play 2.3 got incompatible errors for DefaultReads

别说谁变了你拦得住时间么 提交于 2019-12-08 03:22:18

问题


I am trying to update play to 2.3 from 2.2, but I got several errors complaining about DefaultReads incompatible.

[error] Could not access term time in package java,
[error] because it (or its dependencies) are missing. Check your build definition for
[error] missing or conflicting dependencies. (Re-run with `-Ylog-classpath` to see the problematic classpath.)
[error] A full rebuild may help if 'DefaultReads.class' was compiled against an incompatible version of java.
[error]       (jsObj \ "items").asOpt[JsArray] match {

回答1:


The problem is play-cache dependency. I shouldn't use the latest one. After I use the one matched with Play version, it works.

"com.typesafe.play" % "play-cache_2.11" % "2.3.8"




回答2:


As suggested by @richard-close, the issue was caused in my case by having a jdk7 used by sbt.

You can check that with

sbt
> eval System.getProperty("java.version")
[info] ans: String = 1.7.0_80
> eval System.getProperty("java.home")
[info] ans: String = /usr/lib/jvm/java-7-oracle/jre


来源:https://stackoverflow.com/questions/29425950/play-2-3-got-incompatible-errors-for-defaultreads

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!