我尝试了https://github.com/deanhiller/playorm/wiki/PlayFramework-2.x-support示例,将cassandra1.1.9与play framework2.0.4连接起来。但是当我加上
- 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,删除了nosql.cassandra.seeds = a :application.conf中的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]
答案 0 :(得分:1)
我的坏,我给了下面的种子:
nosql.cassandra.seeds= "localhost:9160"
,因为application.conf中的其他默认属性以双引号给出。 请在您的应用程序中定义种子
nosql.cassandra.seeds="a:9160,b:9160,c:9160"
如果您仍然面临问题,请告诉我们。
所以,wiki确实存在问题,我不是从我的测试应用程序中复制属性,而是从play1插件中获取了整个文本。我会更新。
答案 1 :(得分:0)
有趣的是,我在2个客户端上使用了1.2.x的playorm但是没有使用play 2.0插件并在application.conf中进行了这个确切的设置而我猜你从astyanax得到了那个例外? (因为此时casssandra没有参与)。我会得到vikas(编写它的人)在他星期一的星期一看这个。
可以在那里粘贴异常堆栈跟踪吗?
感谢, 迪安