游戏框架中有一个bug。根据此错误,play_evolutions
无法实例化Oracle数据库。
如this question中所述,我使用以下脚本手动生成play_evolutions
表:
CREATE TABLE play_evolutions
(
id Number(10,0) Not Null Enable,
hash VARCHAR2(255 Byte),
applied_at Timestamp Not Null,
apply_script clob,
revert_script clob,
state Varchar2(255),
last_problem clob,
CONSTRAINT play_evolutions_pk PRIMARY KEY (id)
);
手动生成表,应用演化,但程序停止并跟随堆栈跟踪:
Unexpected exception
NullPointerException: null
No source available, here is the exception stack trace:
->java.lang.NullPointerException:
play.api.db.evolutions.Evolution.<init>(Evolutions.scala:36)
play.api.db.evolutions.Evolutions$$anonfun$databaseEvolutions$1.apply(Evolutions.scala:378)
play.api.db.evolutions.Evolutions$$anonfun$databaseEvolutions$1.apply(Evolutions.scala:374)
play.api.libs.Collections$.loop$1(Collections.scala:29)
play.api.libs.Collections$.unfoldLeft(Collections.scala:33)
play.api.db.evolutions.Evolutions$.databaseEvolutions(Evolutions.scala:374)
play.api.db.evolutions.Evolutions$$anonfun$evolutionScript$2.apply(Evolutions.scala:332)
play.api.db.evolutions.Evolutions$$anonfun$evolutionScript$2.apply(Evolutions.scala:330)
scala.Option.map(Option.scala:145)
play.api.db.evolutions.Evolutions$.evolutionScript(Evolutions.scala:330)
play.api.db.evolutions.EvolutionsPlugin$$anonfun$onStart$1$$anonfun$apply$1.apply$mcV$sp(Evolutions.scala:486)
play.api.db.evolutions.EvolutionsPlugin.withLock(Evolutions.scala:531)
play.api.db.evolutions.EvolutionsPlugin$$anonfun$onStart$1.apply(Evolutions.scala:485)
play.api.db.evolutions.EvolutionsPlugin$$anonfun$onStart$1.apply(Evolutions.scala:483)
scala.collection.immutable.List.foreach(List.scala:383)
play.api.db.evolutions.EvolutionsPlugin.onStart(Evolutions.scala:483)
play.api.Play$$anonfun$start$1$$anonfun$apply$mcV$sp$1.apply(Play.scala:91)
play.api.Play$$anonfun$start$1$$anonfun$apply$mcV$sp$1.apply(Play.scala:91)
scala.collection.immutable.List.foreach(List.scala:383)
play.api.Play$$anonfun$start$1.apply$mcV$sp(Play.scala:91)
play.api.Play$$anonfun$start$1.apply(Play.scala:91)
play.api.Play$$anonfun$start$1.apply(Play.scala:91)
play.utils.Threads$.withContextClassLoader(Threads.scala:21)
play.api.Play$.start(Play.scala:90)
play.core.ReloadableApplication$$anonfun$get$1$$anonfun$apply$1$$anonfun$1.apply(ApplicationProvider.scala:142)
play.core.ReloadableApplication$$anonfun$get$1$$anonfun$apply$1$$anonfun$1.apply(ApplicationProvider.scala:115)
scala.Option.map(Option.scala:145)
play.core.ReloadableApplication$$anonfun$get$1$$anonfun$apply$1.apply(ApplicationProvider.scala:115)
play.core.ReloadableApplication$$anonfun$get$1$$anonfun$apply$1.apply(ApplicationProvider.scala:113)
scala.util.Success.flatMap(Try.scala:230)
play.core.ReloadableApplication$$anonfun$get$1.apply(ApplicationProvider.scala:113)
play.core.ReloadableApplication$$anonfun$get$1.apply(ApplicationProvider.scala:105)
scala.concurrent.impl.Future$PromiseCompletingRunnable.liftedTree1$1(Future.scala:24)
scala.concurrent.impl.Future$PromiseCompletingRunnable.run(Future.scala:24)
scala.concurrent.forkjoin.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1361)
scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)