liquibase.exception.DatabaseException: liquibase.exception.UnexpectedLiquibaseException: Cannot parse snapshot offline:o racle?snapshot=snap.json

JIRA | toleb | 1 year ago
  1. 0

    hi. i got an "java.lang.ClassCastException: java.lang.String cannot be cast to liquibase.structure.core.Column" when I do a snapshot and, just after, a diff between this snapshot and the same db : {noformat} F:\liquibase>lb_snapshot.bat F:\liquibase>liquibase --driver=oracle.jdbc.driver.OracleDriver --classpath=ojdbc6.jar --username=IVSYS --password=xxxx --url="jdbc:oracle:thin:@localhost:1521:IVDB43" --outputFile=snap.json snapshot --snapshotFormat=json Liquibase 'snapshot' Successful F:\liquibase> F:\liquibase>liquibase --logLevel=debug --driver=oracle.jdbc.driver.OracleDriver --classpath=ojdbc6.jar --url="jdbc:oracle:thin:@localhost:1521:IVDB43" --username=IVSYS --password=xxxx --referenceUrl="offline:oracle?snapshot=snap.json" diff DEBUG 7/10/15 8:39 AM: liquibase: Connected to IVSYS@jdbc:oracle:thin:@localhost:1521:IVDB43 DEBUG 7/10/15 8:39 AM: liquibase: Setting auto commit to false from true Unexpected error running Liquibase: Cannot parse snapshot offline:oracle?snapshot=snap.json SEVERE 7/10/15 8:39 AM: liquibase: Cannot parse snapshot offline:oracle?snapshot=snap.json liquibase.exception.DatabaseException: liquibase.exception.UnexpectedLiquibaseException: Cannot parse snapshot offline:o racle?snapshot=snap.json at liquibase.integration.commandline.CommandLineUtils.createDatabaseObject(CommandLineUtils.java:143) at liquibase.integration.commandline.Main.createReferenceDatabaseFromCommandParams(Main.java:1249) at liquibase.integration.commandline.Main.doMigration(Main.java:964) at liquibase.integration.commandline.Main.run(Main.java:180) at liquibase.integration.commandline.Main.main(Main.java:99) Caused by: liquibase.exception.UnexpectedLiquibaseException: Cannot parse snapshot offline:oracle?snapshot=snap.json at liquibase.database.OfflineConnection.<init>(OfflineConnection.java:96) at liquibase.database.DatabaseFactory.openConnection(DatabaseFactory.java:167) at liquibase.database.DatabaseFactory.openDatabase(DatabaseFactory.java:146) at liquibase.integration.commandline.CommandLineUtils.createDatabaseObject(CommandLineUtils.java:85) ... 4 more Caused by: liquibase.exception.LiquibaseParseException: liquibase.parser.core.ParsedNodeException: java.lang.ClassCastEx ception: java.lang.String cannot be cast to liquibase.structure.core.Column at liquibase.parser.core.yaml.YamlSnapshotParser.parse(YamlSnapshotParser.java:58) at liquibase.database.OfflineConnection.<init>(OfflineConnection.java:87) ... 7 more Caused by: liquibase.parser.core.ParsedNodeException: java.lang.ClassCastException: java.lang.String cannot be cast to l iquibase.structure.core.Column at liquibase.snapshot.DatabaseSnapshot.load(DatabaseSnapshot.java:443) at liquibase.parser.core.yaml.YamlSnapshotParser.parse(YamlSnapshotParser.java:51) ... 8 more Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to liquibase.structure.core.Column at liquibase.structure.core.PrimaryKey$1.toString(PrimaryKey.java:65) at liquibase.util.StringUtils.join(StringUtils.java:124) at liquibase.structure.core.PrimaryKey.getColumnNames(PrimaryKey.java:62) at liquibase.structure.core.PrimaryKey.hashCode(PrimaryKey.java:119) at java.util.HashMap.hash(Unknown Source) at java.util.HashMap.put(Unknown Source) at java.util.HashSet.add(Unknown Source) at liquibase.structure.DatabaseObjectCollection.add(DatabaseObjectCollection.java:89) at liquibase.snapshot.DatabaseSnapshot.load(DatabaseSnapshot.java:437) ... 9 more For more information, use the --logLevel flag F:\liquibase> {noformat} Regards

    JIRA | 1 year ago | toleb
    liquibase.exception.DatabaseException: liquibase.exception.UnexpectedLiquibaseException: Cannot parse snapshot offline:o racle?snapshot=snap.json
  2. 0

    hi. i got an "java.lang.ClassCastException: java.lang.String cannot be cast to liquibase.structure.core.Column" when I do a snapshot and, just after, a diff between this snapshot and the same db : {noformat} F:\liquibase>lb_snapshot.bat F:\liquibase>liquibase --driver=oracle.jdbc.driver.OracleDriver --classpath=ojdbc6.jar --username=IVSYS --password=xxxx --url="jdbc:oracle:thin:@localhost:1521:IVDB43" --outputFile=snap.json snapshot --snapshotFormat=json Liquibase 'snapshot' Successful F:\liquibase> F:\liquibase>liquibase --logLevel=debug --driver=oracle.jdbc.driver.OracleDriver --classpath=ojdbc6.jar --url="jdbc:oracle:thin:@localhost:1521:IVDB43" --username=IVSYS --password=xxxx --referenceUrl="offline:oracle?snapshot=snap.json" diff DEBUG 7/10/15 8:39 AM: liquibase: Connected to IVSYS@jdbc:oracle:thin:@localhost:1521:IVDB43 DEBUG 7/10/15 8:39 AM: liquibase: Setting auto commit to false from true Unexpected error running Liquibase: Cannot parse snapshot offline:oracle?snapshot=snap.json SEVERE 7/10/15 8:39 AM: liquibase: Cannot parse snapshot offline:oracle?snapshot=snap.json liquibase.exception.DatabaseException: liquibase.exception.UnexpectedLiquibaseException: Cannot parse snapshot offline:o racle?snapshot=snap.json at liquibase.integration.commandline.CommandLineUtils.createDatabaseObject(CommandLineUtils.java:143) at liquibase.integration.commandline.Main.createReferenceDatabaseFromCommandParams(Main.java:1249) at liquibase.integration.commandline.Main.doMigration(Main.java:964) at liquibase.integration.commandline.Main.run(Main.java:180) at liquibase.integration.commandline.Main.main(Main.java:99) Caused by: liquibase.exception.UnexpectedLiquibaseException: Cannot parse snapshot offline:oracle?snapshot=snap.json at liquibase.database.OfflineConnection.<init>(OfflineConnection.java:96) at liquibase.database.DatabaseFactory.openConnection(DatabaseFactory.java:167) at liquibase.database.DatabaseFactory.openDatabase(DatabaseFactory.java:146) at liquibase.integration.commandline.CommandLineUtils.createDatabaseObject(CommandLineUtils.java:85) ... 4 more Caused by: liquibase.exception.LiquibaseParseException: liquibase.parser.core.ParsedNodeException: java.lang.ClassCastEx ception: java.lang.String cannot be cast to liquibase.structure.core.Column at liquibase.parser.core.yaml.YamlSnapshotParser.parse(YamlSnapshotParser.java:58) at liquibase.database.OfflineConnection.<init>(OfflineConnection.java:87) ... 7 more Caused by: liquibase.parser.core.ParsedNodeException: java.lang.ClassCastException: java.lang.String cannot be cast to l iquibase.structure.core.Column at liquibase.snapshot.DatabaseSnapshot.load(DatabaseSnapshot.java:443) at liquibase.parser.core.yaml.YamlSnapshotParser.parse(YamlSnapshotParser.java:51) ... 8 more Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to liquibase.structure.core.Column at liquibase.structure.core.PrimaryKey$1.toString(PrimaryKey.java:65) at liquibase.util.StringUtils.join(StringUtils.java:124) at liquibase.structure.core.PrimaryKey.getColumnNames(PrimaryKey.java:62) at liquibase.structure.core.PrimaryKey.hashCode(PrimaryKey.java:119) at java.util.HashMap.hash(Unknown Source) at java.util.HashMap.put(Unknown Source) at java.util.HashSet.add(Unknown Source) at liquibase.structure.DatabaseObjectCollection.add(DatabaseObjectCollection.java:89) at liquibase.snapshot.DatabaseSnapshot.load(DatabaseSnapshot.java:437) ... 9 more For more information, use the --logLevel flag F:\liquibase> {noformat} Regards

    JIRA | 1 year ago | toleb
    iquibase.structure.core.Column
  3. 0

    Bug ID: JDK-6499662 "java.lang.ClassCastException: cannot be cast to java.lang.String" happens from time to time

    sun.com | 4 months ago
    java.lang.ClassCastException: cannot be cast to java.lang.String
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Bug ID: JDK-6499662 "java.lang.ClassCastException: cannot be cast to java.lang.String" happens from time to time

    sun.com | 4 months ago
    java.lang.ClassCastException: cannot be cast to java.lang.String
  6. 0

    rhino class aliasing

    GitHub | 3 years ago | perimosocordiae
    java.lang.ExceptionInInitializerError

    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 liquibase.structure.core.Column

      at liquibase.structure.core.PrimaryKey$1.toString()
    2. Liquibase Core
      PrimaryKey.hashCode
      1. liquibase.structure.core.PrimaryKey$1.toString(PrimaryKey.java:65)
      2. liquibase.util.StringUtils.join(StringUtils.java:124)
      3. liquibase.structure.core.PrimaryKey.getColumnNames(PrimaryKey.java:62)
      4. liquibase.structure.core.PrimaryKey.hashCode(PrimaryKey.java:119)
      4 frames
    3. Java RT
      HashSet.add
      1. java.util.HashMap.hash(Unknown Source)
      2. java.util.HashMap.put(Unknown Source)
      3. java.util.HashSet.add(Unknown Source)
      3 frames
    4. Liquibase Core
      Main.main
      1. liquibase.structure.DatabaseObjectCollection.add(DatabaseObjectCollection.java:89)
      2. liquibase.snapshot.DatabaseSnapshot.load(DatabaseSnapshot.java:437)
      3. liquibase.parser.core.yaml.YamlSnapshotParser.parse(YamlSnapshotParser.java:51)
      4. liquibase.database.OfflineConnection.<init>(OfflineConnection.java:87)
      5. liquibase.database.DatabaseFactory.openConnection(DatabaseFactory.java:167)
      6. liquibase.database.DatabaseFactory.openDatabase(DatabaseFactory.java:146)
      7. liquibase.integration.commandline.CommandLineUtils.createDatabaseObject(CommandLineUtils.java:85)
      8. liquibase.integration.commandline.Main.createReferenceDatabaseFromCommandParams(Main.java:1249)
      9. liquibase.integration.commandline.Main.doMigration(Main.java:964)
      10. liquibase.integration.commandline.Main.run(Main.java:180)
      11. liquibase.integration.commandline.Main.main(Main.java:99)
      11 frames