Database error
A database error occured : No database found. Check the configuration of your application.
play.exceptions.DatabaseException: No database found. Check the configuration of your application.
at play.db.DB.getConnection(DB.java:65)
at play.modules.siena.PlayConnectionManager.getConnection(PlayConnectionManager.java:16)
at play.modules.siena.SienaPlugin.onApplicationStart(SienaPlugin.java:138)
at play.plugins.PluginCollection.onApplicationStart(PluginCollection.java:525)
at play.Play.start(Play.java:526)
at play.Play.detectChanges(Play.java:630)
at play.Invoker$Invocation.init(Invoker.java:198)
at Invocation.HTTP Request(Play!)
Caused by: java.lang.NullPointerException
at play.db.DB.getConnection(DB.java:58)
这是活跃的环境:
%h2dev.application.mode=dev
%h2dev.db.url=jdbc:h2:file:/var/stkdb/h2.db;MODE=MYSQL;LOCK_MODE=0
%h2dev.jpa.ddl=create
%h2dev.mail.smtp=mock
有什么想法吗?我也安装了GAE模块。这应该无关紧要......
答案 0 :(得分:1)
您需要将以下行添加到application.conf
:
%h2dev.db.driver=org.h2.Driver
%h2dev.db.user=sa
%h2dev.db.pass=
答案 1 :(得分:1)
如上所述 - 您无法在GAE上使用文件系统DB。如果你的目的是让这个只用于测试/开发,那么也许这样可行。如果你想在GAE上部署这个代码,那么你将无法在GAE上使用H2。