Caused by: org.h2.jdbc.JdbcSQLException: Unknown data type: "JSON"; SQL statement:

今天在写ebean写json语句的时候出现了上述的错误:

com.google.inject.CreationException: Unable to create injector, see the following errors:

1) Error injecting constructor, javax.persistence.PersistenceException: Failed to run script
  at play.db.ebean.EbeanDynamicEvolutions.<init>(EbeanDynamicEvolutions.java:35)
  at play.db.ebean.EbeanDynamicEvolutions.class(EbeanDynamicEvolutions.java:32)
  while locating play.db.ebean.EbeanDynamicEvolutions
  at Module.configure(Module.java:46) (via modules: com.google.inject.util.Modules$OverrideModule -> Module)
  while locating play.api.db.evolutions.DynamicEvolutions
  while locating play.api.db.evolutions.ApplicationEvolutionsProvider
  at play.api.db.evolutions.EvolutionsModule.<init>(EvolutionsModule.scala:20):
Binding(class play.api.db.evolutions.ApplicationEvolutions to ProviderConstructionTarget(class play.api.db.evolutions.ApplicationEvolutionsProvider) eagerly) (via modules: com.google.inject.util.Modules$OverrideModule -> play.api.inject.guice.GuiceableModuleConversions$$anon$4)
  while locating play.api.db.evolutions.ApplicationEvolutions
Caused by: javax.persistence.PersistenceException: Failed to run script
	at io.ebeaninternal.dbmigration.DdlGenerator.runScript(DdlGenerator.java:126)
	at io.ebeaninternal.dbmigration.DdlGenerator.runCreateSql(DdlGenerator.java:154)
	at io.ebeaninternal.dbmigration.DdlGenerator.runDdl(DdlGenerator.java:93)
	at io.ebeaninternal.dbmigration.DdlGenerator.execute(DdlGenerator.java:68)
	at io.ebeaninternal.server.core.DefaultServer.executePlugins(DefaultServer.java:311)
	at io.ebeaninternal.server.core.DefaultContainer.createServer(DefaultContainer.java:146)
	at io.ebeaninternal.server.core.DefaultContainer.createServer(DefaultContainer.java:45)
	at io.ebean.EbeanServerFactory.createInternal(EbeanServerFactory.java:109)
	at io.ebean.EbeanServerFactory.create(EbeanServerFactory.java:70)
	at play.db.ebean.EbeanDynamicEvolutions.lambda$start$3(EbeanDynamicEvolutions.java:49)
	at java.util.HashMap.forEach(HashMap.java:1288)
	at play.db.ebean.EbeanDynamicEvolutions.start(EbeanDynamicEvolutions.java:49)
	at play.db.ebean.EbeanDynamicEvolutions.<init>(EbeanDynamicEvolutions.java:38)
	at play.db.ebean.EbeanDynamicEvolutions$$FastClassByGuice$$52c94231.newInstance(<generated>)
	at com.google.inject.internal.DefaultConstructionProxyFactory$FastClassProxy.newInstance(DefaultConstructionProxyFactory.java:89)
	at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:111)
	at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:90)
	at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:268)
	at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
	at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
	at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
	at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:194)
	at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
	at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:56)
	at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
	at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
	at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
	at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:194)
	at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
	at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1019)
	at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
	at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1015)
	at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1054)
	at play.api.inject.guice.GuiceInjector.instanceOf(GuiceInjectorBuilder.scala:409)
	at play.api.inject.guice.GuiceInjector.instanceOf(GuiceInjectorBuilder.scala:404)
	at play.api.inject.ContextClassLoaderInjector.$anonfun$instanceOf$2(Injector.scala:117)
	at play.api.inject.ContextClassLoaderInjector.withContext(Injector.scala:126)
	at play.api.inject.ContextClassLoaderInjector.instanceOf(Injector.scala:117)
	at play.api.db.evolutions.ApplicationEvolutionsProvider.get$lzycompute(EvolutionsModule.scala:49)
	at play.api.db.evolutions.ApplicationEvolutionsProvider.get(EvolutionsModule.scala:49)
	at play.api.db.evolutions.ApplicationEvolutionsProvider.get(EvolutionsModule.scala:40)
	at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:81)
	at com.google.inject.internal.BoundProviderFactory.provision(BoundProviderFactory.java:72)
	at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:61)
	at com.google.inject.internal.BoundProviderFactory.get(BoundProviderFactory.java:62)
	at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
	at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
	at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
	at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:194)
	at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
	at com.google.inject.internal.InternalInjectorCreator$1.call(InternalInjectorCreator.java:205)
	at com.google.inject.internal.InternalInjectorCreator$1.call(InternalInjectorCreator.java:199)
	at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1085)
	at com.google.inject.internal.InternalInjectorCreator.loadEagerSingletons(InternalInjectorCreator.java:199)
	at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:180)
	at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:110)
	at com.google.inject.Guice.createInjector(Guice.java:99)
	at com.google.inject.Guice.createInjector(Guice.java:84)
	at play.api.inject.guice.GuiceBuilder.injector(GuiceInjectorBuilder.scala:185)
	at play.inject.guice.GuiceBuilder.injector(GuiceBuilder.java:221)
	at play.inject.guice.GuiceApplicationBuilder.build(GuiceApplicationBuilder.java:156)
	at AbstractTest.setup(AbstractTest.java:36)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
	at org.junit.runners.Suite.runChild(Suite.java:128)
	at org.junit.runners.Suite.runChild(Suite.java:27)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
	at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
Caused by: java.sql.SQLException: Error executing stmt[create table et_survey_answer ( id                            bigint auto_increment not null, survey_id                     int(11) NOT NULL COMMENT '问卷id', user_id                       int(11) NOT NULL DEFAULT '0' COMMENT '问卷回答者id', survey_question_id            int(11) NOT NULL COMMENT '问卷项id', answer                        json DEFAULT NULL COMMENT '问卷答案', deleted                       bit(1) NOT NULL COMMENT '是否删除', constraint pk_et_survey_answer primary key (id) )] error[Unknown data type: "JSON"; SQL statement:
create table et_survey_answer ( id                            bigint auto_increment not null, survey_id                     int(11) NOT NULL COMMENT '问卷id', user_id                       int(11) NOT NULL DEFAULT '0' COMMENT '问卷回答者id', survey_question_id            int(11) NOT NULL COMMENT '问卷项id', answer                        json DEFAULT NULL COMMENT '问卷答案', deleted                       bit(1) NOT NULL COMMENT '是否删除', constraint pk_et_survey_answer primary key (id) ) [50004-197]]
	at io.ebean.migration.ddl.DdlRunner.runStatement(DdlRunner.java:113)
	at io.ebean.migration.ddl.DdlRunner.runStatements(DdlRunner.java:70)
	at io.ebean.migration.ddl.DdlRunner.runAll(DdlRunner.java:49)
	at io.ebeaninternal.dbmigration.DdlGenerator.runScript(DdlGenerator.java:118)
	... 92 more
Caused by: org.h2.jdbc.JdbcSQLException: Unknown data type: "JSON"; SQL statement:
create table et_survey_answer ( id                            bigint auto_increment not null, survey_id                     int(11) NOT NULL COMMENT '问卷id', user_id                       int(11) NOT NULL DEFAULT '0' COMMENT '问卷回答者id', survey_question_id            int(11) NOT NULL COMMENT '问卷项id', answer                        json DEFAULT NULL COMMENT '问卷答案', deleted                       bit(1) NOT NULL COMMENT '是否删除', constraint pk_et_survey_answer primary key (id) ) [50004-197]
	at org.h2.message.DbException.getJdbcSQLException(DbException.java:357)
	at org.h2.message.DbException.get(DbException.java:179)
	at org.h2.message.DbException.get(DbException.java:155)
	at org.h2.command.Parser.parseColumnWithType(Parser.java:4400)
	at org.h2.command.Parser.parseColumnForTable(Parser.java:4215)
	at org.h2.command.Parser.parseTableColumnDefinition(Parser.java:6662)
	at org.h2.command.Parser.parseCreateTable(Parser.java:6570)
	at org.h2.command.Parser.parseCreate(Parser.java:4615)
	at org.h2.command.Parser.parsePrepared(Parser.java:380)
	at org.h2.command.Parser.parse(Parser.java:335)
	at org.h2.command.Parser.parse(Parser.java:307)
	at org.h2.command.Parser.prepareCommand(Parser.java:278)
	at org.h2.engine.Session.prepareLocal(Session.java:611)
	at org.h2.engine.Session.prepareCommand(Session.java:549)
	at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1247)
	at org.h2.jdbc.JdbcPreparedStatement.<init>(JdbcPreparedStatement.java:76)
	at org.h2.jdbc.JdbcConnection.prepareStatement(JdbcConnection.java:304)
	at com.zaxxer.hikari.pool.ProxyConnection.prepareStatement(ProxyConnection.java:318)
	at com.zaxxer.hikari.pool.HikariProxyConnection.prepareStatement(HikariProxyConnection.java)
	at io.ebean.migration.ddl.DdlRunner.runStatement(DdlRunner.java:105)
	... 95 more

2) Error injecting constructor, javax.persistence.PersistenceException: Failed to run script
  at play.db.ebean.EbeanDynamicEvolutions.<init>(EbeanDynamicEvolutions.java:35)
  at play.db.ebean.EbeanDynamicEvolutions.class(EbeanDynamicEvolutions.java:32)
  while locating play.db.ebean.EbeanDynamicEvolutions
  at Module.configure(Module.java:46) (via modules: com.google.inject.util.Modules$OverrideModule -> Module)
  while locating play.api.db.evolutions.DynamicEvolutions
Caused by: javax.persistence.PersistenceException: Failed to run script
	at io.ebeaninternal.dbmigration.DdlGenerator.runScript(DdlGenerator.java:126)
	at io.ebeaninternal.dbmigration.DdlGenerator.runCreateSql(DdlGenerator.java:154)
	at io.ebeaninternal.dbmigration.DdlGenerator.runDdl(DdlGenerator.java:93)
	at io.ebeaninternal.dbmigration.DdlGenerator.execute(DdlGenerator.java:68)
	at io.ebeaninternal.server.core.DefaultServer.executePlugins(DefaultServer.java:311)
	at io.ebeaninternal.server.core.DefaultContainer.createServer(DefaultContainer.java:146)
	at io.ebeaninternal.server.core.DefaultContainer.createServer(DefaultContainer.java:45)
	at io.ebean.EbeanServerFactory.createInternal(EbeanServerFactory.java:109)
	at io.ebean.EbeanServerFactory.create(EbeanServerFactory.java:70)
	at play.db.ebean.EbeanDynamicEvolutions.lambda$start$3(EbeanDynamicEvolutions.java:49)
	at java.util.HashMap.forEach(HashMap.java:1288)
	at play.db.ebean.EbeanDynamicEvolutions.start(EbeanDynamicEvolutions.java:49)
	at play.db.ebean.EbeanDynamicEvolutions.<init>(EbeanDynamicEvolutions.java:38)
	at play.db.ebean.EbeanDynamicEvolutions$$FastClassByGuice$$52c94231.newInstance(<generated>)
	at com.google.inject.internal.DefaultConstructionProxyFactory$FastClassProxy.newInstance(DefaultConstructionProxyFactory.java:89)
	at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:111)
	at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:90)
	at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:268)
	at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
	at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
	at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
	at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:194)
	at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
	at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:56)
	at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
	at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
	at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
	at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:194)
	at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
	at com.google.inject.internal.InternalInjectorCreator$1.call(InternalInjectorCreator.java:205)
	at com.google.inject.internal.InternalInjectorCreator$1.call(InternalInjectorCreator.java:199)
	at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1085)
	at com.google.inject.internal.InternalInjectorCreator.loadEagerSingletons(InternalInjectorCreator.java:199)
	at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:180)
	at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:110)
	at com.google.inject.Guice.createInjector(Guice.java:99)
	at com.google.inject.Guice.createInjector(Guice.java:84)
	at play.api.inject.guice.GuiceBuilder.injector(GuiceInjectorBuilder.scala:185)
	at play.inject.guice.GuiceBuilder.injector(GuiceBuilder.java:221)
	at play.inject.guice.GuiceApplicationBuilder.build(GuiceApplicationBuilder.java:156)
	at AbstractTest.setup(AbstractTest.java:36)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
	at org.junit.runners.Suite.runChild(Suite.java:128)
	at org.junit.runners.Suite.runChild(Suite.java:27)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
	at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
Caused by: java.sql.SQLException: Error executing stmt[create table et_activity ( id                            bigint auto_increment not null, title                         varchar(255), creator_id                    bigint, introduction                  varchar(255), content                       varchar(255), enroll_start_time             datetime, enroll_end_time               datetime, max_enroll_number             bigint, current_enroll_number         bigint, notice_news                   varchar(255), start_time                    datetime, end_time                      datetime, sign_in_start_time            datetime, sign_in_end_time              datetime, file_id                       bigint, location                      varchar(255), location_id                   bigint, type                          tinyint, qrcode_content                varchar(255), qrcode_id                     bigint, status                        tinyint, delete_time                   datetime, create_time                   datetime not null, update_time                   datetime not null, constraint pk_et_activity primary key (id) )] error[Table "ET_ACTIVITY" already exists; SQL statement:
create table et_activity ( id                            bigint auto_increment not null, title                         varchar(255), creator_id                    bigint, introduction                  varchar(255), content                       varchar(255), enroll_start_time             datetime, enroll_end_time               datetime, max_enroll_number             bigint, current_enroll_number         bigint, notice_news                   varchar(255), start_time                    datetime, end_time                      datetime, sign_in_start_time            datetime, sign_in_end_time              datetime, file_id                       bigint, location                      varchar(255), location_id                   bigint, type                          tinyint, qrcode_content                varchar(255), qrcode_id                     bigint, status                        tinyint, delete_time                   datetime, create_time                   datetime not null, update_time                   datetime not null, constraint pk_et_activity primary key (id) ) [42101-197]]
	at io.ebean.migration.ddl.DdlRunner.runStatement(DdlRunner.java:113)
	at io.ebean.migration.ddl.DdlRunner.runStatements(DdlRunner.java:70)
	at io.ebean.migration.ddl.DdlRunner.runAll(DdlRunner.java:49)
	at io.ebeaninternal.dbmigration.DdlGenerator.runScript(DdlGenerator.java:118)
	... 71 more
Caused by: org.h2.jdbc.JdbcSQLException: Table "ET_ACTIVITY" already exists; SQL statement:
create table et_activity ( id                            bigint auto_increment not null, title                         varchar(255), creator_id                    bigint, introduction                  varchar(255), content                       varchar(255), enroll_start_time             datetime, enroll_end_time               datetime, max_enroll_number             bigint, current_enroll_number         bigint, notice_news                   varchar(255), start_time                    datetime, end_time                      datetime, sign_in_start_time            datetime, sign_in_end_time              datetime, file_id                       bigint, location                      varchar(255), location_id                   bigint, type                          tinyint, qrcode_content                varchar(255), qrcode_id                     bigint, status                        tinyint, delete_time                   datetime, create_time                   datetime not null, update_time                   datetime not null, constraint pk_et_activity primary key (id) ) [42101-197]
	at org.h2.message.DbException.getJdbcSQLException(DbException.java:357)
	at org.h2.message.DbException.get(DbException.java:179)
	at org.h2.message.DbException.get(DbException.java:155)
	at org.h2.command.ddl.CreateTable.update(CreateTable.java:86)
	at org.h2.command.CommandContainer.update(CommandContainer.java:102)
	at org.h2.command.Command.executeUpdate(Command.java:261)
	at org.h2.jdbc.JdbcPreparedStatement.execute(JdbcPreparedStatement.java:249)
	at com.zaxxer.hikari.pool.ProxyPreparedStatement.execute(ProxyPreparedStatement.java:44)
	at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.execute(HikariProxyPreparedStatement.java)
	at io.ebean.migration.ddl.DdlRunner.runStatement(DdlRunner.java:106)
	... 74 more

2 errors

	at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:470)
	at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:184)
	at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:110)
	at com.google.inject.Guice.createInjector(Guice.java:99)
	at com.google.inject.Guice.createInjector(Guice.java:84)
	at play.api.inject.guice.GuiceBuilder.injector(GuiceInjectorBuilder.scala:185)
	at play.inject.guice.GuiceBuilder.injector(GuiceBuilder.java:221)
	at play.inject.guice.GuiceApplicationBuilder.build(GuiceApplicationBuilder.java:156)
	at AbstractTest.setup(AbstractTest.java:36)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
	at org.junit.runners.Suite.runChild(Suite.java:128)
	at org.junit.runners.Suite.runChild(Suite.java:27)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
	at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)


java.lang.NullPointerException
	at play.test.Helpers.stop(Helpers.java:606)
	at AbstractTest.teardown(AbstractTest.java:42)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:33)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
	at org.junit.runners.Suite.runChild(Suite.java:128)
	at org.junit.runners.Suite.runChild(Suite.java:27)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
	at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)

解决方法

@Constraints.Required
@Column(columnDefinition = "longtext NOT NULL COMMENT '问卷项'")
private String question;

把columndefinition里面的json改成longtext就行了。

因为h2不支持json类型,mysql里面的json本质上是longtext。

参考文献

[1]. How can solve JSON column in H2. https://stackoverflow.com/questions/39620317/how-can-solve-json-column-in-h2

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

农民小飞侠

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值