java.lang.ClassCastException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • When trying to obtain a diffChangeLog between 2 schemas like ./liquibase.sh --logLevel=debug --driver=com.mysql.jdbc.Driver --changeLogFile=../diffLabs.xml --url=jdbc:mysql://127.0.0.1:3306/lab1 --username=root --password=xxxxxxx diffChangeLog --referenceUrl=jdbc:mysql://127.0.0.1:3306/lab2 --referenceUsername=root --referencePassword=xxxxxxx I am getting a casting error {noformat} Liquibase diffChangeLog Failed: java.lang.Integer cannot be cast to java.lang.Boolean SEVERE 12/2/13 7:15 AM:liquibase: java.lang.Integer cannot be cast to java.lang.Boolean java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Boolean at liquibase.datatype.core.BooleanType.objectToSql(BooleanType.java:75) at liquibase.diff.output.changelog.core.MissingColumnChangeGenerator.fixMissing(MissingColumnChangeGenerator.java:72) at liquibase.diff.output.changelog.ChangeGeneratorChain.fixMissing(ChangeGeneratorChain.java:44) at liquibase.diff.output.changelog.ChangeGeneratorFactory.fixMissing(ChangeGeneratorFactory.java:95) at liquibase.diff.output.changelog.DiffToChangeLog.generateChangeSets(DiffToChangeLog.java:140) at liquibase.diff.output.changelog.DiffToChangeLog.print(DiffToChangeLog.java:121) at liquibase.diff.output.changelog.DiffToChangeLog.print(DiffToChangeLog.java:67) at liquibase.diff.output.changelog.DiffToChangeLog.print(DiffToChangeLog.java:50) at liquibase.integration.commandline.CommandLineUtils.doDiffToChangeLog(CommandLineUtils.java:153) at liquibase.integration.commandline.Main.doMigration(Main.java:788) at liquibase.integration.commandline.Main.main(Main.java:133) {noformat} Looks like it is trying to add a new column and mixing up Integers and Booleans.
    via by Rubén Lagar,
  • When trying to obtain a diffChangeLog between 2 schemas like ./liquibase.sh --logLevel=debug --driver=com.mysql.jdbc.Driver --changeLogFile=../diffLabs.xml --url=jdbc:mysql://127.0.0.1:3306/lab1 --username=root --password=xxxxxxx diffChangeLog --referenceUrl=jdbc:mysql://127.0.0.1:3306/lab2 --referenceUsername=root --referencePassword=xxxxxxx I am getting a casting error {noformat} Liquibase diffChangeLog Failed: java.lang.Integer cannot be cast to java.lang.Boolean SEVERE 12/2/13 7:15 AM:liquibase: java.lang.Integer cannot be cast to java.lang.Boolean java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Boolean at liquibase.datatype.core.BooleanType.objectToSql(BooleanType.java:75) at liquibase.diff.output.changelog.core.MissingColumnChangeGenerator.fixMissing(MissingColumnChangeGenerator.java:72) at liquibase.diff.output.changelog.ChangeGeneratorChain.fixMissing(ChangeGeneratorChain.java:44) at liquibase.diff.output.changelog.ChangeGeneratorFactory.fixMissing(ChangeGeneratorFactory.java:95) at liquibase.diff.output.changelog.DiffToChangeLog.generateChangeSets(DiffToChangeLog.java:140) at liquibase.diff.output.changelog.DiffToChangeLog.print(DiffToChangeLog.java:121) at liquibase.diff.output.changelog.DiffToChangeLog.print(DiffToChangeLog.java:67) at liquibase.diff.output.changelog.DiffToChangeLog.print(DiffToChangeLog.java:50) at liquibase.integration.commandline.CommandLineUtils.doDiffToChangeLog(CommandLineUtils.java:153) at liquibase.integration.commandline.Main.doMigration(Main.java:788) at liquibase.integration.commandline.Main.main(Main.java:133) {noformat} Looks like it is trying to add a new column and mixing up Integers and Booleans.
    via by Rubén Lagar,
    • java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Boolean at liquibase.datatype.core.BooleanType.objectToSql(BooleanType.java:75) at liquibase.diff.output.changelog.core.MissingColumnChangeGenerator.fixMissing(MissingColumnChangeGenerator.java:72) at liquibase.diff.output.changelog.ChangeGeneratorChain.fixMissing(ChangeGeneratorChain.java:44) at liquibase.diff.output.changelog.ChangeGeneratorFactory.fixMissing(ChangeGeneratorFactory.java:95) at liquibase.diff.output.changelog.DiffToChangeLog.generateChangeSets(DiffToChangeLog.java:140) at liquibase.diff.output.changelog.DiffToChangeLog.print(DiffToChangeLog.java:121) at liquibase.diff.output.changelog.DiffToChangeLog.print(DiffToChangeLog.java:67) at liquibase.diff.output.changelog.DiffToChangeLog.print(DiffToChangeLog.java:50) at liquibase.integration.commandline.CommandLineUtils.doDiffToChangeLog(CommandLineUtils.java:153) at liquibase.integration.commandline.Main.doMigration(Main.java:788) at liquibase.integration.commandline.Main.main(Main.java:133)
    No Bugmate found.