- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在使用play 2 Elasticsearch 插件(https://github.com/cleverage/play2-elasticsearch),并且在开发模式下可以正常运行,但是当我运行play dist并打包应用程序时,在我运行它后不会创建索引。
这是堆栈跟踪:
[错误]应用程序-ElasticSearch:启动ElasticSearch Client时出错
org.elasticsearch.ElasticSearchIllegalStateException:无法获取节点锁定,以下位置是否可写?:[data / play2-elasticsearch]
在org.elasticsearch.env.NodeEnvironment。(NodeEnvironment.java:123)〜[org.elasticsearch.elasticsearch-0.90.5.jar:na]
在org.elasticsearch.node.internal.InternalNode。(InternalNode.java:139)〜[org.elasticsearch.elasticsearch-0.90.5.jar:na]
在org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:159)〜[org.elasticsearch.elasticsearch-0.90.5.jar:na]
在org.elasticsearch.node.NodeBuilder.node(NodeBuilder.java:166)〜[org.elasticsearch.elasticsearch-0.90.5.jar:na]
在com.github.cleverage.elasticsearch.IndexClient.start(IndexClient.java:36)〜[com.clever-age.play2-elasticsearch-0.8-SNAPSHOT.jar:0.8-SNAPSHOT]
在com.github.cleverage.elasticsearch.plugin.IndexPlugin.onStart(IndexPlugin.java:47)〜[com.clever-age.play2-elasticsearch-0.8-SNAPSHOT.jar:0.8-SNAPSHOT]
由以下原因引起:java.io.IOException:无法获得对/ Users / Nicolas / IdeaProjects / lavidaporloscolores / target / universal / stage / data / play2-elasticsearch / nodes / 49的锁定
在org.elasticsearch.env.NodeEnvironment。(NodeEnvironment.java:102)〜[org.elasticsearch.elasticsearch-0.90.5.jar:na]
在org.elasticsearch.node.internal.InternalNode。(InternalNode.java:139)〜[org.elasticsearch.elasticsearch-0.90.5.jar:na]
在org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:159)〜[org.elasticsearch.elasticsearch-0.90.5.jar:na]
在org.elasticsearch.node.NodeBuilder.node(NodeBuilder.java:166)〜[org.elasticsearch.elasticsearch-0.90.5.jar:na]
在com.github.cleverage.elasticsearch.IndexClient.start(IndexClient.java:36)〜[com.clever-age.play2-elasticsearch-0.8-SNAPSHOT.jar:0.8-SNAPSHOT]
在com.github.cleverage.elasticsearch.plugin.IndexPlugin.onStart(IndexPlugin.java:47)〜[com.clever-age.play2-elasticsearch-0.8-SNAPSHOT.jar:0.8-SNAPSHOT]
引起原因:java.io.IOException:无法创建目录:/ Users / Nicolas / IdeaProjects / lavidaporloscolores / target / universal / stage / data / play2-elasticsearch / nodes / 49
在org.apache.lucene.store.NativeFSLock.obtain(NativeFSLockFactory.java:171)〜[org.apache.lucene.lucene-core-4.4.0.jar:4.4.0 1504776-sarowe-2013-07-19 02 :53:42]
在org.elasticsearch.env.NodeEnvironment。(NodeEnvironment.java:80)〜[org.elasticsearch.elasticsearch-0.90.5.jar:na]
在org.elasticsearch.node.internal.InternalNode。(InternalNode.java:139)〜[org.elasticsearch.elasticsearch-0.90.5.jar:na]
在org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:159)〜[org.elasticsearch.elasticsearch-0.90.5.jar:na]
在org.elasticsearch.node.NodeBuilder.node(NodeBuilder.java:166)〜[org.elasticsearch.elasticsearch-0.90.5.jar:na]
在com.github.cleverage.elasticsearch.IndexClient.start(IndexClient.java:36)〜[com.clever-age.play2-elasticsearch-0.8-SNAPSHOT.jar:0.8-SNAPSHOT]
[错误]应用程序-ElasticSearch:索引准备期间发生了意外的异常。索引尚未创建和准备。
java.lang.NullPointerException:空
在com.github.cleverage.elasticsearch.IndexService.existsIndex(IndexService.java:378)〜[com.clever-age.play2-elasticsearch-0.8-SNAPSHOT.jar:0.8-SNAPSHOT]
在com.github.cleverage.elasticsearch.plugin.IndexPlugin.onStart(IndexPlugin.java:58)〜[com.clever-age.play2-elasticsearch-0.8-SNAPSHOT.jar:0.8-SNAPSHOT]
在play.api.Play $$ anonfun $ start $ 1 $$ anonfun $ apply $ mcV $ sp $ 1.apply(Play.scala:88)[com.typesafe.play.play_2.10-2.2.0.jar:2.2。 0]
在play.api.Play $$ anonfun $ start $ 1 $$ anonfun $ apply $ mcV $ sp $ 1.apply(Play.scala:88)[com.typesafe.play.play_2.10-2.2.0.jar:2.2。 0]
在scala.collection.immutable.List.foreach(List.scala:318)[org.scala-lang.scala-library-2.10.2.jar:na]
在play.api.Play $$ anonfun $ start $ 1.apply $ mcV $ sp(Play.scala:88)[com.typesafe.play.play_2.10-2.2.0.jar:2.2.0]
有任何想法吗?谢谢
最佳答案
找到了解决方案:
在application.conf上添加以下行:
关于playframework-2.0 - Play dist上的Play2 elasticsearch错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19672749/
我正在使用Play 2.1.0,突然之间一切都很好,当我从Play控制台执行~run时遇到了这个奇怪的错误(附加快照)。 环境: Windows 7,IntelliJ12,Mysql,JDK 1.6
最佳答案在评论部分(所以我不能给他们答案:()。 我想知道 playframework 是否以这种方式异步(这将是真正的异步或完全异步)。是的, Play 在前端是异步的,允许 100 个线程上的 1
以编程方式停止 Play 应用程序以便返回到 activator 控制台的最佳方法是什么?(用Java 8玩2.3.7) 如果出现初始化问题,我的服务器应该在启动时退出。 System.exit(1)
我想用 activator run在不发出任何请求的情况下启动应用程序。当前 activator run在启动应用程序之前等待第一个请求。有什么办法可以解决吗? 我知道 activator start
我使用带有@OnApplicationStart 的“通用”作业来做一些初始化工作。如果其中任何一个失败, Play 应该退出。我试过 Play.stop(),但在开发模式下,它会重复重启。 最佳答案
是否有一种简单/内置的方法让 Controller 检查连接是否被授权访问静态文件而不是服务器(使用数据库查找),然后在需要时提供访问权限。 有大视频文件,我想 a) 检查是否允许用户访问该文件,以及
我昨天晚上在南特(法国)和 Play! 参加了与 Guillaume Bort 的 session 。真的很棒!! 我从大约 2 周开始使用它。 Guillaume 使用了 URL http://lo
我在 Global.scala 和 application.conf application.global=Global 中添加了一些代码 object Global extends WithFilt
我正在努力让 capistrano 发布我的 PlayFramework 应用程序,但我在运行命令时遇到了一些问题。 发生的事情是 cap 运行 Play 开始命令并且它似乎正在启动,但是当我执行一个
我们正在使用 play 1.2.x 数据库进化功能。我想让脚本创建和开发正在 Play 自动测试中测试的模式 所以在测试套件之前我需要一个空的数据库。 我想过: 注册可以删除所有的@OnApplica
我在 Scala 中从事一个 playframework 项目。然而,我们的团队想要使用 scalatest 而不是规范。我已将以下内容添加到 plugins.sbt 文件中: libraryDepe
现在 playframework 有了新的版本 2,与版本 1 完全不同;后者会怎样?在 play 1 中编写的所有项目都应该绝对迁移到版本 2 吗?我想知道是否可以依靠 play 1 在近期或中期不
是否可以运行一些 Controller 和 路线仅在测试模式下? 单击链接时,我需要模拟一些响应。我将创建仅在运行 时可用的 Controller 和路由游戏测试 . 是否可以? 最佳答案 正如 Mi
我正在使用PlayFramework 2.4.6,尝试上传多部分文件(大小为18M),并且服务器返回以下错误: For request 'POST /api/myEndpoint' [Request
由于依赖于我正在使用 Play!Framework 开发 Web 应用程序的项目,我必须配置 logback 以防止它用 DEBUG 消息淹没我的输出。 但由于 log4j 是 Play!Framew
我正在使用 PlayFramework 的 2.0.2 版本,并且正在尝试创建一个游戏play.mvc.Action实现 后置过滤器 对于 http 结果。 play docs 中解释了使用 acto
我已经开发了一个基于 Play Framework 的小应用程序(我还在学习)。现在我需要把它捆绑起来运输。一种方法是创建一个 war 文件并将其部署在 servlet 容器(例如 tomcat)中
使用 Play Framework 2.1.1-RC1,我将一个项目分成多个模块,如下所示: object ApplicationBuild extends Build { val appName
我正在使用 Play 2.1 (Java) 和 Play 附带的默认 logback (1.0.7) 记录器。在我的一个 Controller 中,我使用“play.Logger”来打印调试日志消息。
这个问题不太可能帮助任何 future 的访客;它仅与一个小地理区域、一个特定时刻或一个非常狭窄的情况相关,而这些情况通常不适用于互联网的全局受众。如需帮助使这个问题更广泛地适用,visit the
我是一名优秀的程序员,十分优秀!