こんにちはだから私は簡単なテーブルを作成しました:
package models;
import javax.persistence.*;
import play.db.ebean.Model;
@Entity
public class Phone extends Model {
@Id
public Long phoneID;
public String group;
public String name;
}
そして、私は次のエラーを受け取ります:
PersistenceException:シーケンスnextvalの取得中にエラーが発生しましたjavax.persistence.PersistenceException:シーケンスnextvalの取得中にエラーが発生しましたcom.avaje.ebean.config.dbplatform.SequenceIdGenerator.getMoreIds(SequenceIdGenerator.java:213)com.avaje.ebean.config.dbplatform.SequenceIdGenerator.loadMoreIds( SequenceIdGenerator.java:163)com.avaje.ebean.config.dbplatform.SequenceIdGenerator.nextId(SequenceIdGenerator.java:118)com.avaje.ebeaninternal.server.deploy.BeanDescriptor.nextId(BeanDescriptor.java:1218)com.avaje。 ebeaninternal.server.persist.DefaultPersister.setIdGenValue(DefaultPersister.java:1304)com.avaje.ebeaninternal.server.persist.DefaultPersister.insert(DefaultPersister.java:403)com.avaje.ebeaninternal.server.persist.DefaultPersister.saveEnhanced( DefaultPersister.java:345)com.avaje.ebeaninternal。server.persist.DefaultPersister.saveRecurse(DefaultPersister.java:315)com.avaje.ebeaninternal.server.persist.DefaultPersister.save(DefaultPersister.java:282)com.avaje.ebeaninternal.server.core.DefaultServer.save(DefaultServer。 java:1577)com.avaje.ebeaninternal.server.core.DefaultServer.save(DefaultServer.java:1567)com.avaje.ebean.Ebean.save(Ebean.java:538)play.db.ebean.Model.save( Model.java:76)models.Command.createCommand(Command.java:100)models.Command.populateCommands(Command.java:68)Global.onStart(Global.java:22)play.core.j.JavaGlobalSettingsAdapter.onStart( JavaGlobalSettingsAdapter.scala:15)play.api.GlobalPlugin.onStart(Global.scala:134)play.api.Play $$ anonfun $ start $ 1.apply(Play.scala:60)play.api.Play $$ anonfun $ start $ 1.apply(Play.scala:60)scala.collection。LinearSeqOptimized $ class.foreach(LinearSeqOptimized.scala:59)scala.collection.immutable.List.foreach(List.scala:45)play.api.Play $ .start(Play.scala:60)play.core.ReloadableApplication $$ anonfun $ get $ 1 $$ anonfun $ apply $ 3 $$ anonfun $ 1.apply(ApplicationProvider.scala:125)play.core.ReloadableApplication $$ anonfun $ get $ 1 $$ anonfun $ apply $ 3 $$ anonfun $ 1.apply(ApplicationProvider.scala :112)scala.Option.map(Option.scala:133)play.core.ReloadableApplication $$ anonfun $ get $ 1 $$ anonfun $ apply $ 3.apply(ApplicationProvider.scala:112)play.core.ReloadableApplication $$ anonfun $ get $ 1 $$ anonfun $ apply $ 3.apply(ApplicationProvider.scala:110)scala.Either $ RightProjection.flatMap(Either.scala:277)play.core.ReloadableApplication $$ anonfun $ get $ 1.apply(ApplicationProvider.scala:110) )play.core。ReloadableApplication $$ anonfun $ get $ 1.apply(ApplicationProvider.scala:110)akka.dispatch.Future $$ anon $ 3.liftedTree1 $ 1(Future.scala:195)akka.dispatch.Future $$ anon $ 3.run(Future.scala :194)akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:83)akka.jsr166y.ForkJoinTask $ AdaptedRunnableAction.exec(ForkJoinTask.java:1381)akka.jsr166y.ForkJoinTask.doExec(ForkJoinTask.java:259)akka.jsr166y .ForkJoinPool $ WorkQueue.runTask(ForkJoinPool.java:974)akka.jsr166y.ForkJoinPool.runWorker(ForkJoinPool.java:1478)akka.jsr166y.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:104)run(AbstractDispatcher.scala:83)akka.jsr166y.ForkJoinTask $ AdaptedRunnableAction.exec(ForkJoinTask.java:1381)akka.jsr166y.ForkJoinTask.doExec(ForkJoinTask.java:259)akka.jsr166y.ForkJoinPool $ WorkQueue.runTask java:974)akka.jsr166y.ForkJoinPool.runWorker(ForkJoinPool.java:1478)akka.jsr166y.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:104)run(AbstractDispatcher.scala:83)akka.jsr166y.ForkJoinTask $ AdaptedRunnableAction.exec(ForkJoinTask.java:1381)akka.jsr166y.ForkJoinTask.doExec(ForkJoinTask.java:259)akka.jsr166y.ForkJoinPool $ WorkQueue.runTask java:974)akka.jsr166y.ForkJoinPool.runWorker(ForkJoinPool.java:1478)akka.jsr166y.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:104)
h2メモリデータベースを使用できるテーブルの最大数はありますか?このエラーがどこから来ているのかよくわかりません。この行を削除すると正常に動作しますが、別のクラスが問題を引き起こしているようです:createCommand、これには次のようなものがあります。
public static void create(Command data) {
data.save();
}
public static void populateCommands() {
createCommand(0x00, "Cmd1");
createCommand(0x02, "Cmd2");
createCommand(0x03, "Cmd3");
}
助けていただければ幸いです。