我使用的遊戲框架,並增加模型的應用程序後,發生下列錯誤:遊戲框架:用戶缺少特權或找不到對象:PLAY_EVOLUTIONS
java.sql.SQLSyntaxErrorException: user lacks privilege or object not found: PLAY_EVOLUTIONS
org.hsqldb.jdbc.Util.sqlException(Unknown Source)
我的配置:
db.queen.driver=org.hsqldb.jdbcDriver
db.queen.url="jdbc:hsqldb:file:queen-db;shutdown=true;hsqldb.write_delay=false;"
db.queen.user=sa
db.queen.password=""
ebean.queen="models.*"
我只有一個表(Users
),我也有一個模型(User
)。我的應用程序有什麼問題?
ADD我發現我的表Users
沒有創造我介紹User
模型
我演進(1.SQL)後:
# Users schema
# --- !Ups
CREATE TABLE User (
id bigint(20) NOT NULL AUTO_INCREMENT,
first_name varchar(255) NOT NULL,
last_name varchar(255) NOT NULL,
nick_name varchar(255) NOT NULL,
PRIMARY KEY (id)
);
# --- !Downs
DROP TABLE User;
地址我創建沒有機型的新應用,並且出現以下錯誤
[info] play - database [default] connected at jdbc:hsqldb:file:queen-db;shutdown=true;hsqldb.write_delay=false;
[warn] application - play_evolutions table already existed
[error] application -
! @6emindcmh - Internal server error, for (GET) [/users] ->
play.api.UnexpectedException: Unexpected exception[SQLSyntaxErrorException: user lacks privilege or object not found: PLAY_EVOLUTIONS]
at play.core.ReloadableApplication$$anonfun$get$1$$anonfun$1.apply(ApplicationProvider.scala:142) ~[play_2.10.jar:2.1.1]
at play.core.ReloadableApplication$$anonfun$get$1$$anonfun$1.apply(ApplicationProvider.scala:106) ~[play_2.10.jar:2.1.1]
at scala.Option.map(Option.scala:145) ~[scala-library.jar:na]
at play.core.ReloadableApplication$$anonfun$get$1.apply(ApplicationProvider.scala:106) ~[play_2.10.jar:2.1.1]
at play.core.ReloadableApplication$$anonfun$get$1.apply(ApplicationProvider.scala:104) ~[play_2.10.jar:2.1.1]
at scala.util.Either$RightProjection.flatMap(Either.scala:523) [scala-library.jar:na]
Caused by: java.sql.SQLSyntaxErrorException: user lacks privilege or object not found: PLAY_EVOLUTIONS
at org.hsqldb.jdbc.Util.sqlException(Unknown Source) ~[hsqldb-2.2.9.jar:2.2.9]
at org.hsqldb.jdbc.Util.sqlException(Unknown Source) ~[hsqldb-2.2.9.jar:2.2.9]
at org.hsqldb.jdbc.JDBCStatement.fetchResult(Unknown Source) ~[hsqldb-2.2.9.jar:2.2.9]
at org.hsqldb.jdbc.JDBCStatement.executeQuery(Unknown Source) ~[hsqldb-2.2.9.jar:2.2.9]
at com.jolbox.bonecp.StatementHandle.executeQuery(StatementHandle.java:503) ~[bonecp.jar:0.7.1.RELEASE]
at play.api.db.evolutions.Evolutions$.executeQuery(Evolutions.scala:118) ~[play-jdbc_2.10.jar:2.1.1]
Caused by: org.hsqldb.HsqlException: user lacks privilege or object not found: PLAY_EVOLUTIONS
at org.hsqldb.error.Error.error(Unknown Source) ~[hsqldb-2.2.9.jar:2.2.9]
at org.hsqldb.error.Error.error(Unknown Source) ~[hsqldb-2.2.9.jar:2.2.9]
at org.hsqldb.SchemaManager.getTable(Unknown Source) ~[hsqldb-2.2.9.jar:2.2.9]
at org.hsqldb.ParserDQL.readTableName(Unknown Source) ~[hsqldb-2.2.9.jar:2.2.9]
at org.hsqldb.ParserDQL.readTableOrSubquery(Unknown Source) ~[hsqldb-2.2.9.jar:2.2.9]
at org.hsqldb.ParserDQL.XreadTableReference(Unknown Source) ~[hsqldb-2.2.9.jar:2.2.9]
我的應用程序的配置:
application.langs="en"
db.default.driver=org.hsqldb.jdbcDriver
db.default.url="jdbc:hsqldb:file:queen-db;shutdown=true;hsqldb.write_delay=false;"
db.default.user=sa
db.default.password=""
ebean.default="models.*"
PS:我分享我的消息來源:https://github.com/skayred/play-hsqldb-test
請將您的進化文件的內容添加到問題 –
請參閱編輯請 – skayred