【发布时间】:2013-09-29 13:12:35
【问题描述】:
当我尝试将一个简单的项目保存到我的 H2 数据库时出现此错误:
"javax.persistence.PersistenceException: The default EbeanServer has not been defined ? This is normally set via the ebean.datasource.default property. Otherwise it should be registered programatically via registerServer()"
我的 play application.conf 文件
# Database configuration
# ~~~~~
# You can declare as many datasources as you want.
# By convention, the default datasource is named `efault
db.default.driver=org.h2.Driver
db.default.url="jdbc:h2:mem:play"
db.default.jndiName=DefaultDS
db.default.user=sa
db.default.password=""
# JPA configuration
# ~~~~~
# You can declare as many Ebean servers as you want.
# By convention, the default server is named `default`
jpa.default=defaultPersistenceUnit
ebean.datasource.default=DefaultDS
ebean.default="models.*"
【问题讨论】:
-
你找出问题所在了吗?
标签: playframework playframework-2.0