liquibase.exception.DatabaseException: java.text.ParseException: Unknown bit value: CREATE DEFAULT d_FALSE as 0

JIRA | Vitali Nashkevich | 6 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    1. new database has been created CREATE DEFAULT d_FALSE as 0 GO CREATE DEFAULT d_TRUE as 1 GO CREATE TABLE column_with_default ( column_with_default bit NOT NULL ); go sp_bindefault 'd_FALSE', 'column_with_default.column_with_default' go 2. liquibase has been started using the following command: #!/bin/tcsh set lb=/cygdrive/c/Software/liquibase/2.0.1/liquibase set driver=com.microsoft.sqlserver.jdbc.SQLServerDriver set url="jdbc:sqlserver://localhost:1433;database=vn;integratedSequrity=true" set user="vn" set password=golive set driver_cp="./sqljdbc-3.0.jar" $lb --driver=${driver} \ --classpath="${driver_cp}" \ --url="${url}" \ --username="${user}" \ --password=${password} \ --changeLogFile="./localhost.vn.xml" \ generateChangeLog It outputs the following messages: liquibase.exception.DatabaseException: java.text.ParseException: Unknown bit value: CREATE DEFAULT d_FALSE as 0 Liquibase Home is not set. Liquibase Home: /cygdrive/c/Software/liquibase/2.0.1 INFO 05.05.11 15:33:liquibase: Reading tables for vn @ jdbc:sqlserver://localhost:1433;xopenStates=false;sendTimeAsDatetime=true;trustServerCertificat e=false;sendStringParametersAsUnicode=true;selectMethod=direct;responseBuffering=adaptive;packetSize=8000;loginTimeout=15;lockTimeout=-1;lastUpdateCou nt=true;encrypt=false;disableStatementPooling=true;databaseName=vn;applicationName=Microsoft SQL Server JDBC Driver; (Default Schema: dbo) ... INFO 05.05.11 15:33:liquibase: Reading views for vn @ jdbc:sqlserver://localhost:1433;xopenStates=false;sendTimeAsDatetime=true;trustServerCertificate =false;sendStringParametersAsUnicode=true;selectMethod=direct;responseBuffering=adaptive;packetSize=8000;loginTimeout=15;lockTimeout=-1;lastUpdateCoun t=true;encrypt=false;disableStatementPooling=true;databaseName=vn;applicationName=Microsoft SQL Server JDBC Driver; (Default Schema: dbo) ... INFO 05.05.11 15:33:liquibase: Reading foreign keys for vn @ jdbc:sqlserver://localhost:1433;xopenStates=false;sendTimeAsDatetime=true;trustServerCert ificate=false;sendStringParametersAsUnicode=true;selectMethod=direct;responseBuffering=adaptive;packetSize=8000;loginTimeout=15;lockTimeout=-1;lastUpd ateCount=true;encrypt=false;disableStatementPooling=true;databaseName=vn;applicationName=Microsoft SQL Server JDBC Driver; (Default Schema: dbo) ... INFO 05.05.11 15:33:liquibase: Reading primary keys for vn @ jdbc:sqlserver://localhost:1433;xopenStates=false;sendTimeAsDatetime=true;trustServerCert ificate=false;sendStringParametersAsUnicode=true;selectMethod=direct;responseBuffering=adaptive;packetSize=8000;loginTimeout=15;lockTimeout=-1;lastUpd ateCount=true;encrypt=false;disableStatementPooling=true;databaseName=vn;applicationName=Microsoft SQL Server JDBC Driver; (Default Schema: dbo) ... INFO 05.05.11 15:33:liquibase: Reading columns for vn @ jdbc:sqlserver://localhost:1433;xopenStates=false;sendTimeAsDatetime=true;trustServerCertifica te=false;sendStringParametersAsUnicode=true;selectMethod=direct;responseBuffering=adaptive;packetSize=8000;loginTimeout=15;lockTimeout=-1;lastUpdateCo unt=true;encrypt=false;disableStatementPooling=true;databaseName=vn;applicationName=Microsoft SQL Server JDBC Driver; (Default Schema: dbo) ... Liquibase Update Failed: Unknown bit value: CREATE DEFAULT d_FALSE as 0 SEVERE 05.05.11 15:33:liquibase: Unknown bit value: CREATE DEFAULT d_FALSE as 0 liquibase.exception.DatabaseException: java.text.ParseException: Unknown bit value: CREATE DEFAULT d_FALSE as 0 at liquibase.snapshot.jvm.JdbcDatabaseSnapshotGenerator.getColumnTypeAndDefValue(JdbcDatabaseSnapshotGenerator.java:402) at liquibase.snapshot.jvm.JdbcDatabaseSnapshotGenerator.readColumn(JdbcDatabaseSnapshotGenerator.java:202) at liquibase.snapshot.jvm.JdbcDatabaseSnapshotGenerator.readColumns(JdbcDatabaseSnapshotGenerator.java:335) at liquibase.snapshot.jvm.JdbcDatabaseSnapshotGenerator.createSnapshot(JdbcDatabaseSnapshotGenerator.java:244) at liquibase.snapshot.DatabaseSnapshotGeneratorFactory.createSnapshot(DatabaseSnapshotGeneratorFactory.java:69) at liquibase.diff.Diff.compare(Diff.java:63) at liquibase.integration.commandline.CommandLineUtils.doGenerateChangeLog(CommandLineUtils.java:145) at liquibase.integration.commandline.Main.doMigration(Main.java:624) at liquibase.integration.commandline.Main.main(Main.java:116) Caused by: java.text.ParseException: Unknown bit value: CREATE DEFAULT d_FALSE as 0 at liquibase.database.typeconversion.core.AbstractTypeConverter.convertToCorrectObjectType(AbstractTypeConverter.java:105) at liquibase.database.typeconversion.core.AbstractTypeConverter.convertDatabaseValueToObject(AbstractTypeConverter.java:28) at liquibase.database.typeconversion.core.MSSQLTypeConverter.convertDatabaseValueToObject(MSSQLTypeConverter.java:34) at liquibase.snapshot.jvm.JdbcDatabaseSnapshotGenerator.getColumnTypeAndDefValue(JdbcDatabaseSnapshotGenerator.java:400) ... 8 more

    JIRA | 6 years ago | Vitali Nashkevich
    liquibase.exception.DatabaseException: java.text.ParseException: Unknown bit value: CREATE DEFAULT d_FALSE as 0
  2. 0

    1. new database has been created CREATE DEFAULT d_FALSE as 0 GO CREATE DEFAULT d_TRUE as 1 GO CREATE TABLE column_with_default ( column_with_default bit NOT NULL ); go sp_bindefault 'd_FALSE', 'column_with_default.column_with_default' go 2. liquibase has been started using the following command: #!/bin/tcsh set lb=/cygdrive/c/Software/liquibase/2.0.1/liquibase set driver=com.microsoft.sqlserver.jdbc.SQLServerDriver set url="jdbc:sqlserver://localhost:1433;database=vn;integratedSequrity=true" set user="vn" set password=golive set driver_cp="./sqljdbc-3.0.jar" $lb --driver=${driver} \ --classpath="${driver_cp}" \ --url="${url}" \ --username="${user}" \ --password=${password} \ --changeLogFile="./localhost.vn.xml" \ generateChangeLog It outputs the following messages: liquibase.exception.DatabaseException: java.text.ParseException: Unknown bit value: CREATE DEFAULT d_FALSE as 0 Liquibase Home is not set. Liquibase Home: /cygdrive/c/Software/liquibase/2.0.1 INFO 05.05.11 15:33:liquibase: Reading tables for vn @ jdbc:sqlserver://localhost:1433;xopenStates=false;sendTimeAsDatetime=true;trustServerCertificat e=false;sendStringParametersAsUnicode=true;selectMethod=direct;responseBuffering=adaptive;packetSize=8000;loginTimeout=15;lockTimeout=-1;lastUpdateCou nt=true;encrypt=false;disableStatementPooling=true;databaseName=vn;applicationName=Microsoft SQL Server JDBC Driver; (Default Schema: dbo) ... INFO 05.05.11 15:33:liquibase: Reading views for vn @ jdbc:sqlserver://localhost:1433;xopenStates=false;sendTimeAsDatetime=true;trustServerCertificate =false;sendStringParametersAsUnicode=true;selectMethod=direct;responseBuffering=adaptive;packetSize=8000;loginTimeout=15;lockTimeout=-1;lastUpdateCoun t=true;encrypt=false;disableStatementPooling=true;databaseName=vn;applicationName=Microsoft SQL Server JDBC Driver; (Default Schema: dbo) ... INFO 05.05.11 15:33:liquibase: Reading foreign keys for vn @ jdbc:sqlserver://localhost:1433;xopenStates=false;sendTimeAsDatetime=true;trustServerCert ificate=false;sendStringParametersAsUnicode=true;selectMethod=direct;responseBuffering=adaptive;packetSize=8000;loginTimeout=15;lockTimeout=-1;lastUpd ateCount=true;encrypt=false;disableStatementPooling=true;databaseName=vn;applicationName=Microsoft SQL Server JDBC Driver; (Default Schema: dbo) ... INFO 05.05.11 15:33:liquibase: Reading primary keys for vn @ jdbc:sqlserver://localhost:1433;xopenStates=false;sendTimeAsDatetime=true;trustServerCert ificate=false;sendStringParametersAsUnicode=true;selectMethod=direct;responseBuffering=adaptive;packetSize=8000;loginTimeout=15;lockTimeout=-1;lastUpd ateCount=true;encrypt=false;disableStatementPooling=true;databaseName=vn;applicationName=Microsoft SQL Server JDBC Driver; (Default Schema: dbo) ... INFO 05.05.11 15:33:liquibase: Reading columns for vn @ jdbc:sqlserver://localhost:1433;xopenStates=false;sendTimeAsDatetime=true;trustServerCertifica te=false;sendStringParametersAsUnicode=true;selectMethod=direct;responseBuffering=adaptive;packetSize=8000;loginTimeout=15;lockTimeout=-1;lastUpdateCo unt=true;encrypt=false;disableStatementPooling=true;databaseName=vn;applicationName=Microsoft SQL Server JDBC Driver; (Default Schema: dbo) ... Liquibase Update Failed: Unknown bit value: CREATE DEFAULT d_FALSE as 0 SEVERE 05.05.11 15:33:liquibase: Unknown bit value: CREATE DEFAULT d_FALSE as 0 liquibase.exception.DatabaseException: java.text.ParseException: Unknown bit value: CREATE DEFAULT d_FALSE as 0 at liquibase.snapshot.jvm.JdbcDatabaseSnapshotGenerator.getColumnTypeAndDefValue(JdbcDatabaseSnapshotGenerator.java:402) at liquibase.snapshot.jvm.JdbcDatabaseSnapshotGenerator.readColumn(JdbcDatabaseSnapshotGenerator.java:202) at liquibase.snapshot.jvm.JdbcDatabaseSnapshotGenerator.readColumns(JdbcDatabaseSnapshotGenerator.java:335) at liquibase.snapshot.jvm.JdbcDatabaseSnapshotGenerator.createSnapshot(JdbcDatabaseSnapshotGenerator.java:244) at liquibase.snapshot.DatabaseSnapshotGeneratorFactory.createSnapshot(DatabaseSnapshotGeneratorFactory.java:69) at liquibase.diff.Diff.compare(Diff.java:63) at liquibase.integration.commandline.CommandLineUtils.doGenerateChangeLog(CommandLineUtils.java:145) at liquibase.integration.commandline.Main.doMigration(Main.java:624) at liquibase.integration.commandline.Main.main(Main.java:116) Caused by: java.text.ParseException: Unknown bit value: CREATE DEFAULT d_FALSE as 0 at liquibase.database.typeconversion.core.AbstractTypeConverter.convertToCorrectObjectType(AbstractTypeConverter.java:105) at liquibase.database.typeconversion.core.AbstractTypeConverter.convertDatabaseValueToObject(AbstractTypeConverter.java:28) at liquibase.database.typeconversion.core.MSSQLTypeConverter.convertDatabaseValueToObject(MSSQLTypeConverter.java:34) at liquibase.snapshot.jvm.JdbcDatabaseSnapshotGenerator.getColumnTypeAndDefValue(JdbcDatabaseSnapshotGenerator.java:400) ... 8 more

    JIRA | 6 years ago | Vitali Nashkevich
    liquibase.exception.DatabaseException: java.text.ParseException: Unknown bit value: CREATE DEFAULT d_FALSE as 0

    Root Cause Analysis

    1. java.text.ParseException

      Unknown bit value: CREATE DEFAULT d_FALSE as 0

      at liquibase.database.typeconversion.core.AbstractTypeConverter.convertToCorrectObjectType()
    2. liquibase.database.typeconversion
      MSSQLTypeConverter.convertDatabaseValueToObject
      1. liquibase.database.typeconversion.core.AbstractTypeConverter.convertToCorrectObjectType(AbstractTypeConverter.java:105)
      2. liquibase.database.typeconversion.core.AbstractTypeConverter.convertDatabaseValueToObject(AbstractTypeConverter.java:28)
      3. liquibase.database.typeconversion.core.MSSQLTypeConverter.convertDatabaseValueToObject(MSSQLTypeConverter.java:34)
      3 frames
    3. Liquibase Core
      Main.main
      1. liquibase.snapshot.jvm.JdbcDatabaseSnapshotGenerator.getColumnTypeAndDefValue(JdbcDatabaseSnapshotGenerator.java:400)
      2. liquibase.snapshot.jvm.JdbcDatabaseSnapshotGenerator.readColumn(JdbcDatabaseSnapshotGenerator.java:202)
      3. liquibase.snapshot.jvm.JdbcDatabaseSnapshotGenerator.readColumns(JdbcDatabaseSnapshotGenerator.java:335)
      4. liquibase.snapshot.jvm.JdbcDatabaseSnapshotGenerator.createSnapshot(JdbcDatabaseSnapshotGenerator.java:244)
      5. liquibase.snapshot.DatabaseSnapshotGeneratorFactory.createSnapshot(DatabaseSnapshotGeneratorFactory.java:69)
      6. liquibase.diff.Diff.compare(Diff.java:63)
      7. liquibase.integration.commandline.CommandLineUtils.doGenerateChangeLog(CommandLineUtils.java:145)
      8. liquibase.integration.commandline.Main.doMigration(Main.java:624)
      9. liquibase.integration.commandline.Main.main(Main.java:116)
      9 frames