DB update error for H2

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

DB update error for H2

Mavlarn

Hi Juno,


I got an error during DB updtae for H2.


Today, I want to use local H2 DB to test, but it alwasy fail. The error message is as below.

From the message I noticed:"Caused by: org.h2.jdbc.JdbcSQLException: Value too long for column "ENABLED CHAR(1) DEFAULT 'T' NOT NULL": "'TRUE' (4)"; SQL statement:"

And I also find the class "H2ExTypeConverter", which is overwrited by us to make the value of boolean type as "T" and "F". But from the log, it still get "TRUE".


And in DatabaseUpdater.init(), I found the code :

TypeConverterFactory.getInstance().register(H2ExTypeConverter.class);

It always register the type converter of H2. Is it proper to add this converter all the time?


2012-11-12 13:08:50 org.apache.catalina.core.StandardContext listenerStart

严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor#0': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'databaseUpdater': Invocation of init method failed; nested exception is org.ngrinder.common.exception.NGrinderRuntimeException: Exception occurs while Liquibase update DB

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)

at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)

at org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:728)

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:449)

at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:384)

at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:283)

at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)

at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4172)

at org.apache.catalina.core.StandardContext.start(StandardContext.java:4671)

at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)

at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)

at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)

at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)

at org.apache.catalina.core.StandardService.start(StandardService.java:525)

at org.apache.catalina.core.StandardServer.start(StandardServer.java:701)

at org.apache.catalina.startup.Catalina.start(Catalina.java:585)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)

at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)

at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'databaseUpdater': Invocation of init method failed; nested exception is org.ngrinder.common.exception.NGrinderRuntimeException: Exception occurs while Liquibase update DB

at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:135)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:394)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1448)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)

at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:284)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)

at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:400)

at org.springframework.beans.factory.BeanFactoryUtils.beansOfTypeIncludingAncestors(BeanFactoryUtils.java:275)

at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.detectPersistenceExceptionTranslators(PersistenceExceptionTranslationInterceptor.java:139)

at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.<init>(PersistenceExceptionTranslationInterceptor.java:79)

at org.springframework.dao.annotation.PersistenceExceptionTranslationAdvisor.<init>(PersistenceExceptionTranslationAdvisor.java:70)

at org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor.setBeanFactory(PersistenceExceptionTranslationPostProcessor.java:103)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeAwareMethods(AbstractAutowireCapableBeanFactory.java:1475)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1443)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)

... 25 more

Caused by: org.ngrinder.common.exception.NGrinderRuntimeException: Exception occurs while Liquibase update DB

at org.ngrinder.infra.init.DatabaseUpdater.init(DatabaseUpdater.java:98)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)

at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:346)

at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:299)

at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:132)

... 44 more

Caused by: liquibase.exception.MigrationFailedException: Migration failed for change set ngrinder_datachange_logfile/db.changelog_schema_H2_5.xml::5::ngrinder.3.0-b3:

     Reason: liquibase.exception.DatabaseException: Error executing SQL alter table nuser alter column enabled char(1) default 'T';

alter table nuser alter column is_external char(1) default 'F';

alter table agent alter column approved char(1);

alter table perf_test alter column stop_request char(1) default 'F';

alter table perf_test alter column send_mail char(1)  default 'F';

alter table perf_test alter column use_rampup char(1);: Value too long for column "ENABLED CHAR(1) DEFAULT 'T' NOT NULL": "'TRUE' (4)"; SQL statement:

alter table nuser alter column enabled char(1) default 'T';

alter table nuser alter column is_external char(1) default 'F';

alter table agent alter column approved char(1);

alter table perf_test alter column stop_request char(1) default 'F';

alter table perf_test alter column send_mail char(1)  default 'F';

alter table perf_test alter column use_rampup char(1); [22001-168]:

          Caused By: Error executing SQL alter table nuser alter column enabled char(1) default 'T';

alter table nuser alter column is_external char(1) default 'F';

alter table agent alter column approved char(1);

alter table perf_test alter column stop_request char(1) default 'F';

alter table perf_test alter column send_mail char(1)  default 'F';

alter table perf_test alter column use_rampup char(1);: Value too long for column "ENABLED CHAR(1) DEFAULT 'T' NOT NULL": "'TRUE' (4)"; SQL statement:

alter table nuser alter column enabled char(1) default 'T';

alter table nuser alter column is_external char(1) default 'F';

alter table agent alter column approved char(1);

alter table perf_test alter column stop_request char(1) default 'F';

alter table perf_test alter column send_mail char(1)  default 'F';

alter table perf_test alter column use_rampup char(1); [22001-168]:

          Caused By: Value too long for column "ENABLED CHAR(1) DEFAULT 'T' NOT NULL": "'TRUE' (4)"; SQL statement:

alter table nuser alter column enabled char(1) default 'T';

alter table nuser alter column is_external char(1) default 'F';

alter table agent alter column approved char(1);

alter table perf_test alter column stop_request char(1) default 'F';

alter table perf_test alter column send_mail char(1)  default 'F';

alter table perf_test alter column use_rampup char(1); [22001-168]

at liquibase.changelog.ChangeSet.execute(ChangeSet.java:347)

at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:27)

at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:58)

at org.ngrinder.infra.init.LiquibaseEx.update(LiquibaseEx.java:68)

at org.ngrinder.infra.init.DatabaseUpdater.init(DatabaseUpdater.java:96)

... 51 more

Caused by: liquibase.exception.DatabaseException: Error executing SQL alter table nuser alter column enabled char(1) default 'T';

alter table nuser alter column is_external char(1) default 'F';

alter table agent alter column approved char(1);

alter table perf_test alter column stop_request char(1) default 'F';

alter table perf_test alter column send_mail char(1)  default 'F';

alter table perf_test alter column use_rampup char(1);: Value too long for column "ENABLED CHAR(1) DEFAULT 'T' NOT NULL": "'TRUE' (4)"; SQL statement:

alter table nuser alter column enabled char(1) default 'T';

alter table nuser alter column is_external char(1) default 'F';

alter table agent alter column approved char(1);

alter table perf_test alter column stop_request char(1) default 'F';

alter table perf_test alter column send_mail char(1)  default 'F';

alter table perf_test alter column use_rampup char(1); [22001-168]

at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:62)

at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:104)

at liquibase.database.AbstractDatabase.execute(AbstractDatabase.java:1091)

at liquibase.database.AbstractDatabase.executeStatements(AbstractDatabase.java:1075)

at liquibase.changelog.ChangeSet.execute(ChangeSet.java:317)

... 55 more

Caused by: org.h2.jdbc.JdbcSQLException: Value too long for column "ENABLED CHAR(1) DEFAULT 'T' NOT NULL": "'TRUE' (4)"; SQL statement:

alter table nuser alter column enabled char(1) default 'T';

alter table nuser alter column is_external char(1) default 'F';

alter table agent alter column approved char(1);

alter table perf_test alter column stop_request char(1) default 'F';

alter table perf_test alter column send_mail char(1)  default 'F';

alter table perf_test alter column use_rampup char(1); [22001-168]

at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)

at org.h2.message.DbException.get(DbException.java:169)

at org.h2.table.Column.validateConvertUpdateSequence(Column.java:315)

at org.h2.table.Table.validateConvertUpdateSequence(Table.java:689)

at org.h2.command.dml.Insert.addRow(Insert.java:159)

at org.h2.command.dml.Select.queryFlat(Select.java:524)

at org.h2.command.dml.Select.queryWithoutCache(Select.java:618)

at org.h2.command.dml.Query.query(Query.java:307)

at org.h2.command.dml.Insert.insertRows(Insert.java:132)

at org.h2.command.dml.Insert.update(Insert.java:84)

at org.h2.command.ddl.CreateTable.update(CreateTable.java:181)

at org.h2.command.ddl.AlterTableAlterColumn.execute(AlterTableAlterColumn.java:432)

at org.h2.command.ddl.AlterTableAlterColumn.cloneTableStructure(AlterTableAlterColumn.java:332)

at org.h2.command.ddl.AlterTableAlterColumn.copyData(AlterTableAlterColumn.java:214)

at org.h2.command.ddl.AlterTableAlterColumn.update(AlterTableAlterColumn.java:138)

at org.h2.command.CommandContainer.update(CommandContainer.java:75)

at org.h2.command.Command.executeUpdate(Command.java:230)

at org.h2.command.CommandList.update(CommandList.java:41)

at org.h2.command.Command.executeUpdate(Command.java:230)

at org.h2.jdbc.JdbcStatement.executeInternal(JdbcStatement.java:177)

at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:152)

at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)

at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)

at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)

at liquibase.executor.jvm.JdbcExecutor$1ExecuteStatementCallback.doInStatement(JdbcExecutor.java:92)

at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:55)

... 59 more

2012-11-12 13:08:50 org.apache.catalina.core.StandardContext start

严重: Error listenerStart



Reply | Threaded
Open this post in threaded view
|

RE: DB update error for H2

junoyoon
Administrator


It's because... I missed sth in the table alter.

<changeSet author="ngrinder.3.0-b3" id="5" dbms="h2">
<comment>Change missing h2 boolean type into char(1).</comment>
<sql splitStatements="false">
alter table nuser alter column enabled char(1) default 'T';
alter table nuser alter column is_external char(1) default 'F';
alter table agent alter column approved char(1);
alter table perf_test alter column stop_request char(1) default 'F';
alter table perf_test alter column send_mail char(1)  default 'F';
alter table perf_test alter column use_rampup char(1);
   </sql>
    </changeSet>

H2 save "TRUE" "FALSE" in the boolean type.
If you already have those record in your table... It might be fail to covert "TRUE" to "T"
I need to add the update query on this changeset.


JunHo Yoon
Global Platform Development Lab
/ Senior Engineer

13th FL., Bundang First Tower, 266-1, Seohyeon-dong, Bundang-gu, Seongnam-si, Gyeonggi-do, 463-824, KOREA
Tel 031-600-9071   Fax --   Mobile 010-6255-0559
Email  [hidden email]

NHN Business & Platform NAVER HANGAME 쥬니어네이버 해피빈 미투데이


-----Original Message-----
From: "Mavlarn [via ngrinder]"<[hidden email]>
To: "junoyoon"<[hidden email]>;
Cc:
Sent: 2012-11-12 (월) 14:19:58
Subject: DB update error for H2

Hi Juno,


I got an error during DB updtae for H2.


Today, I want to use local H2 DB to test, but it alwasy fail. The error message is as below.

From the message I noticed:"Caused by: org.h2.jdbc.JdbcSQLException: Value too long for column "ENABLED CHAR(1) DEFAULT 'T' NOT NULL": "'TRUE' (4)"; SQL statement:"

And I also find the class "H2ExTypeConverter", which is overwrited by us to make the value of boolean type as "T" and "F". But from the log, it still get "TRUE".


And in DatabaseUpdater.init(), I found the code :

TypeConverterFactory.getInstance().register(H2ExTypeConverter.class);

It always register the type converter of H2. Is it proper to add this converter all the time?


2012-11-12 13:08:50 org.apache.catalina.core.StandardContext listenerStart

严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor#0': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'databaseUpdater': Invocation of init method failed; nested exception is org.ngrinder.common.exception.NGrinderRuntimeException: Exception occurs while Liquibase update DB

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)

at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)

at org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:728)

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:449)

at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:384)

at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:283)

at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)

at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4172)

at org.apache.catalina.core.StandardContext.start(StandardContext.java:4671)

at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)

at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)

at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)

at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)

at org.apache.catalina.core.StandardService.start(StandardService.java:525)

at org.apache.catalina.core.StandardServer.start(StandardServer.java:701)

at org.apache.catalina.startup.Catalina.start(Catalina.java:585)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)

at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)

at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'databaseUpdater': Invocation of init method failed; nested exception is org.ngrinder.common.exception.NGrinderRuntimeException: Exception occurs while Liquibase update DB

at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:135)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:394)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1448)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)

at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:284)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)

at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:400)

at org.springframework.beans.factory.BeanFactoryUtils.beansOfTypeIncludingAncestors(BeanFactoryUtils.java:275)

at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.detectPersistenceExceptionTranslators(PersistenceExceptionTranslationInterceptor.java:139)

at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.<init>(PersistenceExceptionTranslationInterceptor.java:79)

at org.springframework.dao.annotation.PersistenceExceptionTranslationAdvisor.<init>(PersistenceExceptionTranslationAdvisor.java:70)

at org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor.setBeanFactory(PersistenceExceptionTranslationPostProcessor.java:103)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeAwareMethods(AbstractAutowireCapableBeanFactory.java:1475)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1443)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)

... 25 more

Caused by: org.ngrinder.common.exception.NGrinderRuntimeException: Exception occurs while Liquibase update DB

at org.ngrinder.infra.init.DatabaseUpdater.init(DatabaseUpdater.java:98)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)

at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:346)

at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:299)

at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:132)

... 44 more

Caused by: liquibase.exception.MigrationFailedException: Migration failed for change set ngrinder_datachange_logfile/db.changelog_schema_H2_5.xml::5::ngrinder.3.0-b3:

     Reason: liquibase.exception.DatabaseException: Error executing SQL alter table nuser alter column enabled char(1) default 'T';

alter table nuser alter column is_external char(1) default 'F';

alter table agent alter column approved char(1);

alter table perf_test alter column stop_request char(1) default 'F';

alter table perf_test alter column send_mail char(1)  default 'F';

alter table perf_test alter column use_rampup char(1);: Value too long for column "ENABLED CHAR(1) DEFAULT 'T' NOT NULL": "'TRUE' (4)"; SQL statement:

alter table nuser alter column enabled char(1) default 'T';

alter table nuser alter column is_external char(1) default 'F';

alter table agent alter column approved char(1);

alter table perf_test alter column stop_request char(1) default 'F';

alter table perf_test alter column send_mail char(1)  default 'F';

alter table perf_test alter column use_rampup char(1); [22001-168]:

          Caused By: Error executing SQL alter table nuser alter column enabled char(1) default 'T';

alter table nuser alter column is_external char(1) default 'F';

alter table agent alter column approved char(1);

alter table perf_test alter column stop_request char(1) default 'F';

alter table perf_test alter column send_mail char(1)  default 'F';

alter table perf_test alter column use_rampup char(1);: Value too long for column "ENABLED CHAR(1) DEFAULT 'T' NOT NULL": "'TRUE' (4)"; SQL statement:

alter table nuser alter column enabled char(1) default 'T';

alter table nuser alter column is_external char(1) default 'F';

alter table agent alter column approved char(1);

alter table perf_test alter column stop_request char(1) default 'F';

alter table perf_test alter column send_mail char(1)  default 'F';

alter table perf_test alter column use_rampup char(1); [22001-168]:

          Caused By: Value too long for column "ENABLED CHAR(1) DEFAULT 'T' NOT NULL": "'TRUE' (4)"; SQL statement:

alter table nuser alter column enabled char(1) default 'T';

alter table nuser alter column is_external char(1) default 'F';

alter table agent alter column approved char(1);

alter table perf_test alter column stop_request char(1) default 'F';

alter table perf_test alter column send_mail char(1)  default 'F';

alter table perf_test alter column use_rampup char(1); [22001-168]

at liquibase.changelog.ChangeSet.execute(ChangeSet.java:347)

at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:27)

at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:58)

at org.ngrinder.infra.init.LiquibaseEx.update(LiquibaseEx.java:68)

at org.ngrinder.infra.init.DatabaseUpdater.init(DatabaseUpdater.java:96)

... 51 more

Caused by: liquibase.exception.DatabaseException: Error executing SQL alter table nuser alter column enabled char(1) default 'T';

alter table nuser alter column is_external char(1) default 'F';

alter table agent alter column approved char(1);

alter table perf_test alter column stop_request char(1) default 'F';

alter table perf_test alter column send_mail char(1)  default 'F';

alter table perf_test alter column use_rampup char(1);: Value too long for column "ENABLED CHAR(1) DEFAULT 'T' NOT NULL": "'TRUE' (4)"; SQL statement:

alter table nuser alter column enabled char(1) default 'T';

alter table nuser alter column is_external char(1) default 'F';

alter table agent alter column approved char(1);

alter table perf_test alter column stop_request char(1) default 'F';

alter table perf_test alter column send_mail char(1)  default 'F';

alter table perf_test alter column use_rampup char(1); [22001-168]

at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:62)

at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:104)

at liquibase.database.AbstractDatabase.execute(AbstractDatabase.java:1091)

at liquibase.database.AbstractDatabase.executeStatements(AbstractDatabase.java:1075)

at liquibase.changelog.ChangeSet.execute(ChangeSet.java:317)

... 55 more

Caused by: org.h2.jdbc.JdbcSQLException: Value too long for column "ENABLED CHAR(1) DEFAULT 'T' NOT NULL": "'TRUE' (4)"; SQL statement:

alter table nuser alter column enabled char(1) default 'T';

alter table nuser alter column is_external char(1) default 'F';

alter table agent alter column approved char(1);

alter table perf_test alter column stop_request char(1) default 'F';

alter table perf_test alter column send_mail char(1)  default 'F';

alter table perf_test alter column use_rampup char(1); [22001-168]

at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)

at org.h2.message.DbException.get(DbException.java:169)

at org.h2.table.Column.validateConvertUpdateSequence(Column.java:315)

at org.h2.table.Table.validateConvertUpdateSequence(Table.java:689)

at org.h2.command.dml.Insert.addRow(Insert.java:159)

at org.h2.command.dml.Select.queryFlat(Select.java:524)

at org.h2.command.dml.Select.queryWithoutCache(Select.java:618)

at org.h2.command.dml.Query.query(Query.java:307)

at org.h2.command.dml.Insert.insertRows(Insert.java:132)

at org.h2.command.dml.Insert.update(Insert.java:84)

at org.h2.command.ddl.CreateTable.update(CreateTable.java:181)

at org.h2.command.ddl.AlterTableAlterColumn.execute(AlterTableAlterColumn.java:432)

at org.h2.command.ddl.AlterTableAlterColumn.cloneTableStructure(AlterTableAlterColumn.java:332)

at org.h2.command.ddl.AlterTableAlterColumn.copyData(AlterTableAlterColumn.java:214)

at org.h2.command.ddl.AlterTableAlterColumn.update(AlterTableAlterColumn.java:138)

at org.h2.command.CommandContainer.update(CommandContainer.java:75)

at org.h2.command.Command.executeUpdate(Command.java:230)

at org.h2.command.CommandList.update(CommandList.java:41)

at org.h2.command.Command.executeUpdate(Command.java:230)

at org.h2.jdbc.JdbcStatement.executeInternal(JdbcStatement.java:177)

at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:152)

at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)

at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)

at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)

at liquibase.executor.jvm.JdbcExecutor$1ExecuteStatementCallback.doInStatement(JdbcExecutor.java:92)

at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:55)

... 59 more

2012-11-12 13:08:50 org.apache.catalina.core.StandardContext start

严重: Error listenerStart






If you reply to this email, your message will be added to the discussion below:
http://ngrinder.642.n7.nabble.com/DB-update-error-for-H2-tp59.html
To start a new topic under ngrinder_dev, email [hidden email]
To unsubscribe from ngrinder_dev, click here.
NAML
Reply | Threaded
Open this post in threaded view
|

Re: DB update error for H2

tantan
In reply to this post by Mavlarn
how to add the update query on this changeset.
Reply | Threaded
Open this post in threaded view
|

Lana電子煙彈有尼古丁嗎?

aksmnm34

隨著電子煙在台灣市場的快速普及,Lana煙彈以其時尚的透明發光設計、豐富的口味選擇和優質的吸食體驗,成為許多電子煙愛好者的首選品牌。對於有意嘗試電子煙的消費者來說,一個常見的問題是:Lana煙彈是否含有尼古丁?尼古丁的存在不僅影響吸食的滿足感,也關係到使用安全和健康考量。本文將從Lana煙彈的尼古丁含量、尼古丁的配方特性以及對使用者的影響三個面向,詳細探討Lana煙彈的尼古丁相關資訊,幫助讀者更全面地了解這款產品。

Lana煙彈的尼古丁含量

Lana菸彈的設計以滿足不同用戶需求為目標,其產品明確含有尼古丁,以提供類似傳統香菸的滿足感。根據多個電子煙零售網站的資料,例如香港的VapeHongKong和台灣的蒸氣天堂,Lana煙彈的尼古丁濃度通常為3%(30毫克/毫升),一顆2.5毫升的煙彈含有約75毫克尼古丁。

部分市場也提供5%濃度的選項,適合對尼古丁需求較高的用戶。Lana煙彈的尼古丁含量在包裝和銷售頁面上均有清楚標示,消費者可根據自身偏好選擇合適的濃度。

值得注意的是,Lanavape煙彈目前沒有推出零尼古丁版本,因此所有口味(如薄荷冰、芒果百香果或藍莓爆珠)的Lana煙彈均含有尼古丁。這一設計使其特別適合希望從傳統香菸轉向電子煙的用戶,因為尼古丁能提供熟悉的喉擊感和滿足感。

Lana煙彈尼古丁的配方特性

Lana發光煙彈採用尼古丁鹽作為其尼古丁的主要形式,這是電子煙行業的常見配方,與傳統香菸中的游離鹼尼古丁不同。尼古丁鹽的優勢在於其吸食時更溫和,喉部刺激感較低,同時吸收效率更高,能更快提供滿足感。

Lana煙彈的尼古丁鹽配方經過精準調配,確保吸食時的擊喉感平滑,適合新手和長期使用者。例如,使用「薄荷冰」口味的Lana煙彈時,消費者可感受到清涼感與尼古丁的完美結合,既提神又滿足。

此外,Lana煙彈的陶瓷蜂窩式線圈技術有助於均勻加熱煙油,使尼古丁釋放更加穩定,避免吸食過程中出現濃度不均的情況。這種配方特性讓Lana煙彈在提供尼古丁滿足感的同時,保持了順暢的吸食體驗,特別是在搭配RELX一代主機時表現尤為出色。

尼古丁對Lana煙彈使用者的影響

Lana煙蛋中的尼古丁對使用者的影響因個人吸食習慣和健康狀況而異。對於從傳統香菸轉向電子煙的用戶,Lana煙彈的尼古丁含量能有效滿足其需求,幫助減輕戒菸過程中的焦慮感。例如,「藍莓爆珠」口味的Lana煙彈以濃郁果香和適度尼古丁結合,讓吸食過程更愉悅,成為許多轉換用戶的首選。

然而,尼古丁作為一種成癮性物質,長期使用可能對健康產生影響,包括心血管負擔或依賴性風險,因此建議用戶適量使用並密切關注自身狀況。Lana煙彈的透明發光設計和多樣口味為尼古丁吸食增添了趣味性,但消費者仍需謹慎選擇濃度,例如3%濃度適合輕度使用者,而5%則更適合重度吸菸者。

此外,Lana煙彈不含傳統香菸中的焦油和一氧化碳,相對減少了部分健康風險,但尼古丁的存在意味著它並非完全無害的產品。

總結

總的來說,Lana煙彈官網明確含有尼古丁,濃度通常為3%或5%,採用尼古丁鹽配方,提供平滑且高效的吸食體驗。其2.5毫升的煙油容量和陶瓷線圈技術確保尼古丁釋放穩定,無論是薄荷冰的清涼感還是芒果百香果的熱帶風情,Lana煙彈都能為用戶帶來滿足感與口味享受。對於希望從傳統香菸轉向電子煙的消費者,Lana煙彈的尼古丁含量提供了理想的替代選擇,但用戶需注意尼古丁的潛在健康影響,適量使用並選擇適合的濃度。

透明發光設計和多樣口味進一步提升了Lana煙彈的吸引力,使其在電子煙市場中脫穎而出。建議消費者在購買前確認尼古丁濃度,並根據個人需求理性使用。未來,隨著Lana煙彈持續優化產品,其尼古丁配方和口味創新可望為用戶帶來更優質的體驗。