liquibase.exception.DatabaseException: ERROR: syntax error at or near "0" Position: 385 [Failed SQL: CREATE TABLE reporting.report (id BIGSERIAL NOT NULL, name VARCHAR(255) NOT NULL, description TEXT, filter_expression TEXT NOT NULL, out_components VARCHAR(255) NOT NULL, scope_id BIGINT NOT NULL, created_by VARCHAR(255) NOT NULL, created_on TIMESTAMP(29) WITHOUT TIME ZONE NOT NULL, deleted_on TIMESTAMP(29) WITHOUT TIME ZONE, deleted_by VARCHAR(255), is_deleted BPCHAR(1) DEFAULT ''0': :bpchar', is_shared BPCHAR(1) DEFAULT ''0'::bpchar' NOT NULL, CONSTRAINT report_pkey PRIMARY KEY (id))]

JIRA | Georgi Georgiev | 2 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

    The stacktrace bellow shows that the generated changelog contains an extra single quote, in front of the default column value: [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building liquibase 1.0.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ liquibase --- [INFO] Deleting C:\dev\UNIONVMS\branches\dev\Modules\Reporting\maven.1438864315428\DB\liquibase\target [INFO] [INFO] --- liquibase-maven-plugin:3.4.0:update (default-cli) @ liquibase --- [INFO] ------------------------------------------------------------------------ [INFO] Executing on Database: jdbc:postgresql://localhost:5432/uvms INFO 8/19/15 11:58 AM: liquibase: Successfully acquired change log lock INFO 8/19/15 11:58 AM: liquibase: Reading from reporting.databasechangelog SEVERE 8/19/15 11:58 AM: liquibase: changelog/db-changelog-master.xml: changelog/0.1/generatedChangelog.xml::1439888259729-7::georgige (generated): Change Set changelog/0.1/generatedChangelog.xml::14398882597 29-7::georgige (generated) failed. Error: ERROR: syntax error at or near "0" Position: 385 [Failed SQL: CREATE TABLE reporting.report (id BIGSERIAL NOT NULL, name VARCHAR(255) NOT NULL, description TEXT, filter_expression TEXT NOT NULL, out_components VARCHAR(255) NOT NULL, scope_id BIGINT NOT NULL, created_by VARCHAR(255) NOT NULL, created_on TIMESTAMP(29) WITHOUT TIME ZONE NOT NULL, deleted_on TIMESTAMP(29) WITHOUT TIME ZONE, deleted_by VARCHAR(255), is_deleted BPCHAR(1) DEFAULT ''0': :bpchar', is_shared BPCHAR(1) DEFAULT ''0'::bpchar' NOT NULL, CONSTRAINT report_pkey PRIMARY KEY (id))] liquibase.exception.DatabaseException: ERROR: syntax error at or near "0" Position: 385 [Failed SQL: CREATE TABLE reporting.report (id BIGSERIAL NOT NULL, name VARCHAR(255) NOT NULL, description TEXT, filter_expression TEXT NOT NULL, out_components VARCHAR(255) NOT NULL, scope_id BIGINT NOT NULL, created_by VARCHAR(255) NOT NULL, created_on TIMESTAMP(29) WITHOUT TIME ZONE NOT NULL, deleted_on TIMESTAMP(29) WITHOUT TIME ZONE, deleted_by VARCHAR(255), is_deleted BPCHAR(1) DEFAULT ''0': :bpchar', is_shared BPCHAR(1) DEFAULT ''0'::bpchar' NOT NULL, CONSTRAINT report_pkey PRIMARY KEY (id))] at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:316) at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:55) at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:122) at liquibase.database.AbstractJdbcDatabase.execute(AbstractJdbcDatabase.java:1243) at liquibase.database.AbstractJdbcDatabase.executeStatements(AbstractJdbcDatabase.java:1226) at liquibase.changelog.ChangeSet.execute(ChangeSet.java:548) at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:51)

    JIRA | 2 years ago | Georgi Georgiev
    liquibase.exception.DatabaseException: ERROR: syntax error at or near "0" Position: 385 [Failed SQL: CREATE TABLE reporting.report (id BIGSERIAL NOT NULL, name VARCHAR(255) NOT NULL, description TEXT, filter_expression TEXT NOT NULL, out_components VARCHAR(255) NOT NULL, scope_id BIGINT NOT NULL, created_by VARCHAR(255) NOT NULL, created_on TIMESTAMP(29) WITHOUT TIME ZONE NOT NULL, deleted_on TIMESTAMP(29) WITHOUT TIME ZONE, deleted_by VARCHAR(255), is_deleted BPCHAR(1) DEFAULT ''0': :bpchar', is_shared BPCHAR(1) DEFAULT ''0'::bpchar' NOT NULL, CONSTRAINT report_pkey PRIMARY KEY (id))]
  2. 0

    The stacktrace bellow shows that the generated changelog contains an extra single quote, in front of the default column value: [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building liquibase 1.0.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ liquibase --- [INFO] Deleting C:\dev\UNIONVMS\branches\dev\Modules\Reporting\maven.1438864315428\DB\liquibase\target [INFO] [INFO] --- liquibase-maven-plugin:3.4.0:update (default-cli) @ liquibase --- [INFO] ------------------------------------------------------------------------ [INFO] Executing on Database: jdbc:postgresql://localhost:5432/uvms INFO 8/19/15 11:58 AM: liquibase: Successfully acquired change log lock INFO 8/19/15 11:58 AM: liquibase: Reading from reporting.databasechangelog SEVERE 8/19/15 11:58 AM: liquibase: changelog/db-changelog-master.xml: changelog/0.1/generatedChangelog.xml::1439888259729-7::georgige (generated): Change Set changelog/0.1/generatedChangelog.xml::14398882597 29-7::georgige (generated) failed. Error: ERROR: syntax error at or near "0" Position: 385 [Failed SQL: CREATE TABLE reporting.report (id BIGSERIAL NOT NULL, name VARCHAR(255) NOT NULL, description TEXT, filter_expression TEXT NOT NULL, out_components VARCHAR(255) NOT NULL, scope_id BIGINT NOT NULL, created_by VARCHAR(255) NOT NULL, created_on TIMESTAMP(29) WITHOUT TIME ZONE NOT NULL, deleted_on TIMESTAMP(29) WITHOUT TIME ZONE, deleted_by VARCHAR(255), is_deleted BPCHAR(1) DEFAULT ''0': :bpchar', is_shared BPCHAR(1) DEFAULT ''0'::bpchar' NOT NULL, CONSTRAINT report_pkey PRIMARY KEY (id))] liquibase.exception.DatabaseException: ERROR: syntax error at or near "0" Position: 385 [Failed SQL: CREATE TABLE reporting.report (id BIGSERIAL NOT NULL, name VARCHAR(255) NOT NULL, description TEXT, filter_expression TEXT NOT NULL, out_components VARCHAR(255) NOT NULL, scope_id BIGINT NOT NULL, created_by VARCHAR(255) NOT NULL, created_on TIMESTAMP(29) WITHOUT TIME ZONE NOT NULL, deleted_on TIMESTAMP(29) WITHOUT TIME ZONE, deleted_by VARCHAR(255), is_deleted BPCHAR(1) DEFAULT ''0': :bpchar', is_shared BPCHAR(1) DEFAULT ''0'::bpchar' NOT NULL, CONSTRAINT report_pkey PRIMARY KEY (id))] at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:316) at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:55) at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:122) at liquibase.database.AbstractJdbcDatabase.execute(AbstractJdbcDatabase.java:1243) at liquibase.database.AbstractJdbcDatabase.executeStatements(AbstractJdbcDatabase.java:1226) at liquibase.changelog.ChangeSet.execute(ChangeSet.java:548) at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:51)

    JIRA | 2 years ago | Georgi Georgiev
    liquibase.exception.DatabaseException: ERROR: syntax error at or near "0" Position: 385 [Failed SQL: CREATE TABLE reporting.report (id BIGSERIAL NOT NULL, name VARCHAR(255) NOT NULL, description TEXT, filter_expression TEXT NOT NULL, out_components VARCHAR(255) NOT NULL, scope_id BIGINT NOT NULL, created_by VARCHAR(255) NOT NULL, created_on TIMESTAMP(29) WITHOUT TIME ZONE NOT NULL, deleted_on TIMESTAMP(29) WITHOUT TIME ZONE, deleted_by VARCHAR(255), is_deleted BPCHAR(1) DEFAULT ''0': :bpchar', is_shared BPCHAR(1) DEFAULT ''0'::bpchar' NOT NULL, CONSTRAINT report_pkey PRIMARY KEY (id))]

    Root Cause Analysis

    1. liquibase.exception.DatabaseException

      ERROR: syntax error at or near "0" Position: 385 [Failed SQL: CREATE TABLE reporting.report (id BIGSERIAL NOT NULL, name VARCHAR(255) NOT NULL, description TEXT, filter_expression TEXT NOT NULL, out_components VARCHAR(255) NOT NULL, scope_id BIGINT NOT NULL, created_by VARCHAR(255) NOT NULL, created_on TIMESTAMP(29) WITHOUT TIME ZONE NOT NULL, deleted_on TIMESTAMP(29) WITHOUT TIME ZONE, deleted_by VARCHAR(255), is_deleted BPCHAR(1) DEFAULT ''0': :bpchar', is_shared BPCHAR(1) DEFAULT ''0'::bpchar' NOT NULL, CONSTRAINT report_pkey PRIMARY KEY (id))]

      at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement()
    2. Liquibase Core
      UpdateVisitor.visit
      1. liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:316)
      2. liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:55)
      3. liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:122)
      4. liquibase.database.AbstractJdbcDatabase.execute(AbstractJdbcDatabase.java:1243)
      5. liquibase.database.AbstractJdbcDatabase.executeStatements(AbstractJdbcDatabase.java:1226)
      6. liquibase.changelog.ChangeSet.execute(ChangeSet.java:548)
      7. liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:51)
      7 frames