1

我尝试了将 cassandra1.1.9 与 play framework2.0.4 连接的https://github.com/deanhiller/playorm/wiki/PlayFramework-2.x-support示例。但是当我添加

  • nosql.nosqltype=cassandra
  • nosql.cassandra.clusterName=Test Cluster
  • nosql.cassandra.keyspace=iyte
  • nosql.cassandra.seeds=a:9160,b:9160,c:9160

我得到了错误,无法修复。
Expecting end of input or a comma, got ':' if you intended ':' to be part of the value for 'nosql.cassandra.seeds', try enclosing the value in double quotes, or you may be able to rename the file .properties rather than .conf
我在 input\libexclude 中添加了 playorm-1.4.4 和其他 3 个 jar,从 application.conf 中删除了 nosql.cassandra.seeds=a:9160,b:9160,c:9160。这是错误
! Internal server error, for request [GET /] ->

sbt.PlayExceptions$CompilationException: Compilation error [value Context is not a member of object play.mvc.Http] at sbt.PlayReloader$$anon$2$$anonfun$reload$3$$anonfun$4$$anonfun$apply$12$$anonfun$apply$13.apply(PlayReloader.scala:236) ~[na:na] at sbt.PlayReloader$$anon$2$$anonfun$reload$3$$anonfun$4$$anonfun$apply$12$$anonfun$apply$13.apply(PlayReloader.scala:236) ~[na:na] at scala.Option.map(Option.scala:133) ~[scala-library.jar:0.11.3] at sbt.PlayReloader$$anon$2$$anonfun$reload$3$$anonfun$4$$anonfun$apply$12.apply(PlayReloader.scala:236) ~[na:na] at sbt.PlayReloader$$anon$2$$anonfun$reload$3$$anonfun$4$$anonfun$apply$12.apply(PlayReloader.scala:233) ~[na:na] at scala.Option.map(Option.scala:133) ~[scala-library.jar:0.11.3] at sbt.PlayReloader$$anon$2$$anonfun$reload$3$$anonfun$4.apply(PlayReloader.scala:233) ~[na:na] at sbt.PlayReloader$$anon$2$$anonfun$reload$3$$anonfun$4.apply(PlayReloader.scala:231) ~[na:na] at scala.Either$LeftProjection.map(Either.scala:183) ~[scala-library.jar:0.11.3] at sbt.PlayReloader$$anon$2$$anonfun$reload$3.apply(PlayReloader.scala:231) ~[na:na] at sbt.PlayReloader$$anon$2$$anonfun$reload$3.apply(PlayReloader.scala:226) ~[na:na] at scala.Option.getOrElse(Option.scala:108) ~[scala-library.jar:0.11.3] at sbt.PlayReloader$$anon$2.reload(PlayReloader.scala:226) ~[na:na] at play.core.ReloadableApplication$$anonfun$get$1.apply(ApplicationProvider.scala:110) ~[play_2.9.1.jar:2.0.4] at play.core.ReloadableApplication$$anonfun$get$1.apply(ApplicationProvider.scala:110) ~[play_2.9.1.jar:2.0.4] at akka.dispatch.Future$$anon$3.liftedTree1$1(Future.scala:195) ~[akka-actor.jar:2.0.2] at akka.dispatch.Future$$anon$3.run(Future.scala:194) ~[akka-actor.jar:2.0.2] at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:94) ~[akka-actor.jar:2.0.2] at akka.jsr166y.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1381) ~[akka-actor.jar:2.0.2] at akka.jsr166y.ForkJoinTask.doExec(ForkJoinTask.java:259) ~[akka-actor.jar:2.0.2] at akka.jsr166y.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:975) ~[akka-actor.jar:2.0.2] at akka.jsr166y.ForkJoinPool.runWorker(ForkJoinPool.java:1479) ~[akka-actor.jar:2.0.2] at akka.jsr166y.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:104) ~[akka-actor.jar:2.0.2]

4

2 回答 2

1

我的坏,我给种子如下:

nosql.cassandra.seeds= "localhost:9160"

因为 application.conf 中的其他默认属性用双引号给出。请在您的应用程序中将种子定义为

nosql.cassandra.seeds="a:9160,b:9160,c:9160"

如果您仍然遇到问题,请告诉我们。

所以,问题确实出在 wiki 上,我没有从我的测试应用程序中复制属性,而是从 play1 插件中获取了整个文本。我会更新的。

于 2013-02-03T17:52:18.567 回答
0

有趣的是,我在 2 个客户端上使用带有 1.2.x 的 playorm,但不使用 play 2.0 插件,并且在 application.conf 中有这个确切的设置,我猜你从 astyanax 那里得到了那个例外?(因为此时不涉及 casssandra)。我会让 vikas(写它的人)在他在的星期一看这个。

您可以将异常堆栈跟踪粘贴到那里吗?

谢谢,院长

于 2013-02-03T17:07:42.023 回答