问题描述
我尝试在Tomcat服务器上使用akka 2.1.0。但是我遇到一个错误,要求我也将配置库放在类路径上。
I tried to use akka 2.1.0 on a Tomcat server. But I got an error asking me to put the config library on the classpath too.
不是问题。我将Typesafe版本1.0.0(最新)的配置库放在lib文件夹中。但是,我总是收到错误
Well that's not the issue. I put the config library of Typesafe, version 1.0.0 (the latest) in the lib folder. However, I always get the error
8d31597e-1b6e-4be5-9773-4fb7e0591312akka.ConfigurationException: Akka JAR version [2.1.0] does not match the provided config version [2.0]
at akka.actor.ActorSystem$Settings.<init>(ActorSystem.scala:172)
at akka.actor.ActorSystemImpl.<init>(ActorSystem.scala:465)
at akka.actor.ActorSystem$.apply(ActorSystem.scala:111)
at akka.actor.ActorSystem$.apply(ActorSystem.scala:93)
lib文件夹中的jar文件为:
The jar files in the lib folder are :
- akka-actor_2.10-2.1.0.jar
- config-1.0.0.jar
- scala库-2.10.0.jar
此问题来自何处?
推荐答案
它将加载一个包含 akka.version = 2.0
的配置文件,但预期的 2.1.0
。
您可能在 application.conf
中错误地定义了 akka.version
。删除该设置。否则,您的类路径中将包含akka-actor 2.0 jar文件。
It loads a configuration file containing akka.version=2.0
but is expecting 2.1.0
.You might have mistakenly defined akka.version
in your application.conf
. Remove that setting. Otherwise you have a akka-actor 2.0 jar file in your classspath.
这篇关于Akka和Typesafe配置版本问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!