java.lang.Boolean

JIRA | Julien HENRY | 6 years ago
  1. 0

    I tried to run this very simple changeset on an empty Oracle schema: {code:xml} <databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd"> <changeSet id="1" author="bob"> <createTable tableName="department"> <column name="id" type="int"> <constraints primaryKey="true" nullable="false"/> </column> <column name="name" type="varchar(50)"> <constraints nullable="false"/> </column> <column name="active" type="boolean" defaultValue="1"/> </createTable> </changeSet> </databaseChangeLog> {code} But I get this error: {code} [INFO] [liquibase:update {execution: default}] [INFO] ------------------------------------------------------------------------ [INFO] Loading artfacts into URLClassLoader [INFO] artifact: file:/D:/DevJava/Params/Maven/DepotLocal/com/oracle/ojdbc14/10.2.0.4.0/ojdbc14-10.2.0.4.0.jar [...] [INFO] ------------------------------------------------------------------------ [INFO] Parsing Liquibase Properties File [INFO] File: target/classes/liquibase.properties [INFO] ------------------------------------------------------------------------ [INFO] Settings---------------------------- [INFO] driver: oracle.jdbc.driver.OracleDriver [INFO] url: jdbc:oracle:thin:@localhost:1521:XE [INFO] username: xxxxxxxx [INFO] password: xxxxxxxxx [INFO] use empty password: false [INFO] properties file: target/classes/liquibase.properties [INFO] properties file will override? false [INFO] prompt on non-local database? true [INFO] clear checksums? false [INFO] changeLogFile: src/main/resources/changelog.xml [INFO] context(s): null [INFO] number of changes to apply: 0 [INFO] drop first? false [INFO] ------------------------------------------------------------------------ [INFO] Executing on Database: jdbc:oracle:thin:@localhost:1521:XE XXX - Loaded UIFacade INFO 06/09/10 16:59:liquibase: Can not use class liquibase.executor.LoggingExecutor as a Liquibase service because it does not have a default constructor 6 sept. 2010 16:59:41 liquibase.logging.jvm.JavaUtilLogger info INFO: Successfully acquired change log lock 6 sept. 2010 16:59:41 liquibase.logging.jvm.JavaUtilLogger info INFO: Creating database history table with name: DATABASECHANGELOG 6 sept. 2010 16:59:41 liquibase.logging.jvm.JavaUtilLogger info INFO: Reading from DATABASECHANGELOG 6 sept. 2010 16:59:41 liquibase.logging.jvm.JavaUtilLogger info INFO: Reading from DATABASECHANGELOG 6 sept. 2010 16:59:41 liquibase.logging.jvm.JavaUtilLogger info INFO: Successfully released change log lock 6 sept. 2010 16:59:41 liquibase.logging.jvm.JavaUtilLogger info INFO: Successfully released change log lock [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Error setting up or running Liquibase: Migration failed for change set src/main/resources/changelog.xml::1::bob: Reason: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Boolean: Caused By: java.lang.String cannot be cast to java.lang.Boolean {code} Here is the stack trace: {code} Caused by: org.apache.maven.plugin.MojoExecutionException: Error setting up or running Liquibase: Migration failed for change set src/main/resources/changelog.xml::1::bob: Reason: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Boolean: Caused By: java.lang.String cannot be cast to java.lang.Boolean at org.liquibase.maven.plugins.AbstractLiquibaseMojo.execute(AbstractLiquibaseMojo.java:292) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694) ... 17 more Caused by: liquibase.exception.MigrationFailedException: Migration failed for change set src/main/resources/changelog.xml::1::bob: Reason: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Boolean: Caused By: java.lang.String cannot be cast to java.lang.Boolean at liquibase.changelog.ChangeSet.execute(ChangeSet.java:286) at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:27) at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:39) at liquibase.Liquibase.update(Liquibase.java:109) at org.liquibase.maven.plugins.LiquibaseUpdate.doUpdate(LiquibaseUpdate.java:32) at org.liquibase.maven.plugins.AbstractLiquibaseUpdateMojo.performLiquibaseTask(AbstractLiquibaseUpdateMojo.java:24) at org.liquibase.maven.plugins.AbstractLiquibaseMojo.execute(AbstractLiquibaseMojo.java:288) ... 19 more Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Boolean at liquibase.database.structure.type.BooleanType.convertObjectToString(BooleanType.java:27) at liquibase.sqlgenerator.core.CreateTableGenerator.generateSql(CreateTableGenerator.java:60) at liquibase.sqlgenerator.core.CreateTableGenerator.generateSql(CreateTableGenerator.java:19) at liquibase.sqlgenerator.SqlGeneratorChain.generateSql(SqlGeneratorChain.java:30) at liquibase.sqlgenerator.SqlGeneratorFactory.generateSql(SqlGeneratorFactory.java:142) at liquibase.executor.AbstractExecutor.applyVisitors(AbstractExecutor.java:22) at liquibase.executor.jvm.JdbcExecutor.access$000(JdbcExecutor.java:36) at liquibase.executor.jvm.JdbcExecutor$1ExecuteStatementCallback.doInStatement(JdbcExecutor.java:82) at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:55) at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:97) at liquibase.database.AbstractDatabase.execute(AbstractDatabase.java:981) at liquibase.database.AbstractDatabase.executeStatements(AbstractDatabase.java:968) at liquibase.changelog.ChangeSet.execute(ChangeSet.java:257) ... 25 more [INFO] ------------------------------------------------------------------------ {code}

    JIRA | 6 years ago | Julien HENRY
    java.lang.Boolean
  2. 0

    Restore Defaults causes ClassCastException

    Eclipse Bugzilla | 8 years ago | euthanasia_waltz
    java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Boolean
  3. 0

    Hibernate issue java.lang.Boolean cannot be cast to java.lang.String Using JDK 1.7

    Stack Overflow | 2 years ago | Ishwar Lal
    java.lang.ClassCastException: java.lang.Boolean cannot be cast to java.lang.String
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    ClassCastException in OCompositeKey [moved]

    GitHub | 4 years ago | lvca
    java.lang.ClassCastException: java.lang.Boolean cannot be cast to java.lang.String
  6. 0

    ClassCastException on stoping server

    GitHub | 4 years ago | clienthax
    java.lang.ClassCastException: java.lang.Boolean cannot be cast to java.lang.String

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.ClassCastException

      java.lang.String cannot be cast to java.lang.Boolean

      at liquibase.database.structure.type.BooleanType.convertObjectToString()
    2. liquibase.database.structure
      BooleanType.convertObjectToString
      1. liquibase.database.structure.type.BooleanType.convertObjectToString(BooleanType.java:27)
      1 frame
    3. Liquibase Core
      Liquibase.update
      1. liquibase.sqlgenerator.core.CreateTableGenerator.generateSql(CreateTableGenerator.java:60)
      2. liquibase.sqlgenerator.core.CreateTableGenerator.generateSql(CreateTableGenerator.java:19)
      3. liquibase.sqlgenerator.SqlGeneratorChain.generateSql(SqlGeneratorChain.java:30)
      4. liquibase.sqlgenerator.SqlGeneratorFactory.generateSql(SqlGeneratorFactory.java:142)
      5. liquibase.executor.AbstractExecutor.applyVisitors(AbstractExecutor.java:22)
      6. liquibase.executor.jvm.JdbcExecutor.access$000(JdbcExecutor.java:36)
      7. liquibase.executor.jvm.JdbcExecutor$1ExecuteStatementCallback.doInStatement(JdbcExecutor.java:82)
      8. liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:55)
      9. liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:97)
      10. liquibase.database.AbstractDatabase.execute(AbstractDatabase.java:981)
      11. liquibase.database.AbstractDatabase.executeStatements(AbstractDatabase.java:968)
      12. liquibase.changelog.ChangeSet.execute(ChangeSet.java:257)
      13. liquibase.changelog.ChangeSet.execute(ChangeSet.java:286)
      14. liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:27)
      15. liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:39)
      16. liquibase.Liquibase.update(Liquibase.java:109)
      16 frames
    4. org.liquibase.maven
      AbstractLiquibaseMojo.execute
      1. org.liquibase.maven.plugins.LiquibaseUpdate.doUpdate(LiquibaseUpdate.java:32)
      2. org.liquibase.maven.plugins.AbstractLiquibaseUpdateMojo.performLiquibaseTask(AbstractLiquibaseUpdateMojo.java:24)
      3. org.liquibase.maven.plugins.AbstractLiquibaseMojo.execute(AbstractLiquibaseMojo.java:288)
      3 frames