liquibase.exception.DatabaseException: Error executing SQL CREATE TABLE ACTION (ACTION_ID INTEGER CONSTRAINT ACTION_PK PRIMARY KEY AUTOINCREMENT AUTOINCREMENT NOT NULL, ACTION TEXT NOT NULL, ACTION_SOURCE_CODE TEXT NOT NULL): [SQLITE_ERROR] SQL error or missing database (near "AUTOINCREMENT": syntax error)

JIRA | Ross Attrill | 3 years ago
  1. 0

    Using sqlite with org.sqlite.JDBC driver and a changeset like this: <changeSet author="me" id="1"> <createTable schemaName="dbo" tableName="ACTION"> <column autoIncrement="true" name="ACTION_ID" type="INT"> <constraints nullable="false" primaryKey="true" primaryKeyName="ACTION_PK"/> </column> Will result in the keyword AUTOINCREMENT being incorrectly repeated and a stack dump: SEVERE 28/01/14 2:46 PM:liquibase: Change Set ./changelog/db.changelog-2.0-baseline.xml::1390877473709-2::rattrill (generated) failed. Error: Error executing SQL CREATE TABLE ACTION (ACTION_ID INTEGER CONSTRAINT ACTION_PK PRIMARY KEY AUTOINCREMENT AUTOINCREMENT NOT NULL, ACTION TEXT NOT NULL, ACTION_SOURCE_CODE TEXT NOT NULL): [SQLITE_ERROR] SQL error or missing database (near "AUTOINCREMENT": syntax error) liquibase.exception.DatabaseException: Error executing SQL CREATE TABLE ACTION (ACTION_ID INTEGER CONSTRAINT ACTION_PK PRIMARY KEY AUTOINCREMENT AUTOINCREMENT NOT NULL, ACTION TEXT NOT NULL, ACTION_SOURCE_CODE TEXT NOT NULL): [SQLITE_ERROR] SQL error or missing database (near "AUTOINCREMENT": syntax error) at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:62) at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:104) at liquibase.database.AbstractDatabase.execute(AbstractDatabase.java:1091) at liquibase.database.AbstractDatabase.executeStatements(AbstractDatabase.java:1075) at liquibase.changelog.ChangeSet.execute(ChangeSet.java:317) at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:27) at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:58) at liquibase.Liquibase.update(Liquibase.java:114) at liquibase.integration.commandline.Main.doMigration(Main.java:825) at liquibase.integration.commandline.Main.main(Main.java:134) Caused by: java.sql.SQLException: [SQLITE_ERROR] SQL error or missing database (near "AUTOINCREMENT": syntax error) at org.sqlite.core.DB.newSQLException(DB.java:890) at org.sqlite.core.DB.newSQLException(DB.java:901) at org.sqlite.core.DB.throwex(DB.java:868) at org.sqlite.core.NativeDB.prepare(Native Method) at org.sqlite.core.DB.prepare(DB.java:211) at org.sqlite.jdbc3.JDBC3Statement.execute(JDBC3Statement.java:60) at liquibase.executor.jvm.JdbcExecutor$1ExecuteStatementCallback.doInStatement(JdbcExecutor.java:92) at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:55) ... 9 more The keyword 'AUTOINCREMENT' works for SQLITE but is incorrectly being repeated.

    JIRA | 3 years ago | Ross Attrill
    liquibase.exception.DatabaseException: Error executing SQL CREATE TABLE ACTION (ACTION_ID INTEGER CONSTRAINT ACTION_PK PRIMARY KEY AUTOINCREMENT AUTOINCREMENT NOT NULL, ACTION TEXT NOT NULL, ACTION_SOURCE_CODE TEXT NOT NULL): [SQLITE_ERROR] SQL error or missing database (near "AUTOINCREMENT": syntax error)
  2. 0

    Using sqlite with org.sqlite.JDBC driver and a changeset like this: <changeSet author="me" id="1"> <createTable schemaName="dbo" tableName="ACTION"> <column autoIncrement="true" name="ACTION_ID" type="INT"> <constraints nullable="false" primaryKey="true" primaryKeyName="ACTION_PK"/> </column> Will result in the keyword AUTOINCREMENT being incorrectly repeated and a stack dump: SEVERE 28/01/14 2:46 PM:liquibase: Change Set ./changelog/db.changelog-2.0-baseline.xml::1390877473709-2::rattrill (generated) failed. Error: Error executing SQL CREATE TABLE ACTION (ACTION_ID INTEGER CONSTRAINT ACTION_PK PRIMARY KEY AUTOINCREMENT AUTOINCREMENT NOT NULL, ACTION TEXT NOT NULL, ACTION_SOURCE_CODE TEXT NOT NULL): [SQLITE_ERROR] SQL error or missing database (near "AUTOINCREMENT": syntax error) liquibase.exception.DatabaseException: Error executing SQL CREATE TABLE ACTION (ACTION_ID INTEGER CONSTRAINT ACTION_PK PRIMARY KEY AUTOINCREMENT AUTOINCREMENT NOT NULL, ACTION TEXT NOT NULL, ACTION_SOURCE_CODE TEXT NOT NULL): [SQLITE_ERROR] SQL error or missing database (near "AUTOINCREMENT": syntax error) at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:62) at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:104) at liquibase.database.AbstractDatabase.execute(AbstractDatabase.java:1091) at liquibase.database.AbstractDatabase.executeStatements(AbstractDatabase.java:1075) at liquibase.changelog.ChangeSet.execute(ChangeSet.java:317) at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:27) at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:58) at liquibase.Liquibase.update(Liquibase.java:114) at liquibase.integration.commandline.Main.doMigration(Main.java:825) at liquibase.integration.commandline.Main.main(Main.java:134) Caused by: java.sql.SQLException: [SQLITE_ERROR] SQL error or missing database (near "AUTOINCREMENT": syntax error) at org.sqlite.core.DB.newSQLException(DB.java:890) at org.sqlite.core.DB.newSQLException(DB.java:901) at org.sqlite.core.DB.throwex(DB.java:868) at org.sqlite.core.NativeDB.prepare(Native Method) at org.sqlite.core.DB.prepare(DB.java:211) at org.sqlite.jdbc3.JDBC3Statement.execute(JDBC3Statement.java:60) at liquibase.executor.jvm.JdbcExecutor$1ExecuteStatementCallback.doInStatement(JdbcExecutor.java:92) at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:55) ... 9 more The keyword 'AUTOINCREMENT' works for SQLITE but is incorrectly being repeated.

    JIRA | 3 years ago | Ross Attrill
    liquibase.exception.DatabaseException: Error executing SQL CREATE TABLE ACTION (ACTION_ID INTEGER CONSTRAINT ACTION_PK PRIMARY KEY AUTOINCREMENT AUTOINCREMENT NOT NULL, ACTION TEXT NOT NULL, ACTION_SOURCE_CODE TEXT NOT NULL): [SQLITE_ERROR] SQL error or missing database (near "AUTOINCREMENT": syntax error)
  3. 0

    Insert data in SQLite for JavaFX Applications

    Stack Overflow | 1 year ago | The Well
    java.sql.SQLException: [SQLITE_ERROR] SQL error or missing database (no such column: fname)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Unique constraints on multiple columns with Hibernate and SQLite?

    Stack Overflow | 6 months ago | sdorof
    org.hibernate.tool.schema.spi.CommandAcceptanceException: Unable to execute command [ alter table Person add constraint UKplt6je0b4xbkw1th6b2buadwp unique (firstname, lastname)]
  6. 0

    not implemented by SQLite JDBC driver

    Stack Overflow | 3 years ago | wenda
    java.sql.SQLException: not implemented by SQLite JDBC driver

  1. linxiaolong 2 times, last 4 months ago
1 unregistered visitors
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.sql.SQLException

    [SQLITE_ERROR] SQL error or missing database (near "AUTOINCREMENT": syntax error)

    at org.sqlite.core.DB.newSQLException()
  2. SQLite JDBC
    JDBC3Statement.execute
    1. org.sqlite.core.DB.newSQLException(DB.java:890)
    2. org.sqlite.core.DB.newSQLException(DB.java:901)
    3. org.sqlite.core.DB.throwex(DB.java:868)
    4. org.sqlite.core.NativeDB.prepare(Native Method)
    5. org.sqlite.core.DB.prepare(DB.java:211)
    6. org.sqlite.jdbc3.JDBC3Statement.execute(JDBC3Statement.java:60)
    6 frames
  3. Liquibase Core
    Main.main
    1. liquibase.executor.jvm.JdbcExecutor$1ExecuteStatementCallback.doInStatement(JdbcExecutor.java:92)
    2. liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:55)
    3. liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:104)
    4. liquibase.database.AbstractDatabase.execute(AbstractDatabase.java:1091)
    5. liquibase.database.AbstractDatabase.executeStatements(AbstractDatabase.java:1075)
    6. liquibase.changelog.ChangeSet.execute(ChangeSet.java:317)
    7. liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:27)
    8. liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:58)
    9. liquibase.Liquibase.update(Liquibase.java:114)
    10. liquibase.integration.commandline.Main.doMigration(Main.java:825)
    11. liquibase.integration.commandline.Main.main(Main.java:134)
    11 frames