Play Framework Slick HikariCP 错误

Play Framework Slick HikariCP Error

我想我在尝试使用 Play Framework + Slick + HikariCP 时遇到了某种 class 兼容性错误:

play.api.UnexpectedException: Unexpected exception[UnsupportedClassVersionError: com/zaxxer/hikari/HikariConfig : Unsupported major.minor version 52.0]
    at play.core.ReloadableApplication$$anonfun$get$$anonfun$apply$$anonfun.apply(ApplicationProvider.scala:170) ~[play_2.11-2.3.7.jar:2.3.7]
    at play.core.ReloadableApplication$$anonfun$get$$anonfun$apply$$anonfun.apply(ApplicationProvider.scala:130) ~[play_2.11-2.3.7.jar:2.3.7]
    at scala.Option.map(Option.scala:146) ~[scala-library-2.11.6.jar:na]
    at play.core.ReloadableApplication$$anonfun$get$$anonfun$apply.apply(ApplicationProvider.scala:130) ~[play_2.11-2.3.7.jar:2.3.7]
    at play.core.ReloadableApplication$$anonfun$get$$anonfun$apply.apply(ApplicationProvider.scala:128) ~[play_2.11-2.3.7.jar:2.3.7]
    at scala.util.Success.flatMap(Try.scala:230) ~[scala-library-2.11.6.jar:na]
    at play.core.ReloadableApplication$$anonfun$get.apply(ApplicationProvider.scala:128) ~[play_2.11-2.3.7.jar:2.3.7]
    at play.core.ReloadableApplication$$anonfun$get.apply(ApplicationProvider.scala:120) ~[play_2.11-2.3.7.jar:2.3.7]
    at scala.concurrent.impl.Future$PromiseCompletingRunnable.liftedTree1(Future.scala:24) ~[scala-library-2.11.6.jar:na]
    at scala.concurrent.impl.Future$PromiseCompletingRunnable.run(Future.scala:24) ~[scala-library-2.11.6.jar:na]
    at scala.concurrent.forkjoin.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1361) ~[scala-library-2.11.6.jar:na]
    at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) ~[scala-library-2.11.6.jar:na]
    at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) ~[scala-library-2.11.6.jar:na]
    at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) ~[scala-library-2.11.6.jar:na]
    at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107) ~[scala-library-2.11.6.jar:na]
Caused by: java.lang.UnsupportedClassVersionError: com/zaxxer/hikari/HikariConfig : Unsupported major.minor version 52.0

这是我的 sbt 中的内容:

"com.typesafe.slick" %% "slick" % "3.0.0",
"org.postgresql" % "postgresql" % "9.4-1201-jdbc4",
"com.zaxxer" % "HikariCP" % "2.3.7"

我正在使用 Play 2.3.4 和 Scala 2.11.5!有什么想法吗?

好的,我明白了。我是 运行 Java 7,所以我不得不使用以下作为我的依赖项:

"com.zaxxer" % "HikariCP-java6" % "2.3.7"

根据可在此处找到的 HirakiCP 文档:

https://github.com/brettwooldridge/HikariCP