[英]play framework error in New I/O worker #1 when applying evolution script (JPA and Ebean version)
[英]Why Play Framework uses old Ebean version in the new project templates?
我(幾乎從字面意義上)猛烈地抨擊牆壁,試圖弄清楚為什么在過去的17天內出現了NullPointException問題(現在您相信了,不是嗎?)。
因此,在閱讀和閱讀Play的文檔時,我注意到了一些東西(我不知道自己以前沒有注意到!)。
Ebean ORM附帶配置Ebean Play。 要啟用它,請將Play Ebean插件添加到project / plugins.sbt中的SBT插件中:
addSbtPlugin("com.typesafe.sbt" % "sbt-play-ebean" % "3.0.0")
另外,在Play的論壇上閱讀了一些帖子,我注意到發布了2.5.6
版,並且我使用的是2.5.4
版,無論如何我都對其進行了升級,並且都可以正常工作,它解決了NullPointerException
問題。
但是,我通過Play的模板創建了一個新項目:
activator new
Fetching the latest list of templates...
Browse the list of templates: http://lightbend.com/activator/templates
Choose from these featured templates or enter a template name:
1) minimal-akka-java-seed
2) minimal-akka-scala-seed
3) minimal-java
4) minimal-scala
5) play-java
6) play-scala
(hit tab to see a list of all templates)
> 5
Enter a name for your application (just press enter for 'play-java')
> a-new-project
OK, application "a-new-project" is being created using the "play-java" template.
To run "a-new-project" from the command line, "cd a-new-project" then:
/tmp/000/a-new-project/activator run
To run the test for "a-new-project" from the command line, "cd a-new-project" then:
/tmp/000/a-new-project/activator test
To run the Activator UI for "a-new-project" from the command line, "cd a-new-project" then:
/tmp/000/a-new-project/activator ui
然后檢查project/plugins.sbt
文件:
// Play Ebean support, to enable, uncomment this line, and enable in your build.sbt using
// enablePlugins(PlayEbean).
// addSbtPlugin("com.typesafe.sbt" % "sbt-play-ebean" % "1.0.0")
這就引出了我的問題:如果您要通過play的項目模板開始一個新項目,為什么要從最早的插件版本開始? 最好從這些插件的最新版本開始?
您可以在此處在存儲庫中查看我的更改。
沒有大礙。 只是模板過時了。 play-java
模板在這里定義:
https://github.com/playframework/playframework/tree/master/templates/play-java
並且,您可以看到模板在此處添加了play-ebean插件:
不幸的是, EBEAN_VERSION
變量沒有更新,如您在此處看到的:
https://github.com/playframework/playframework/blob/master/templates/build.sbt#L62
如果需要,您可以提交(非常小而特定的)拉取請求以解決此問題。
此拉取請求更新模板插件: https : //github.com/playframework/playframework/pull/6515
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.