liquibase.exception.LockException: liquibase.exception.DatabaseException: Error executing SQL CREATE TABLE SYSTEM.DATABASECHANGELOGLOCK (ID INTEGER NOT NULL, LOCKED NUMBER(1) NOT NULL, LOCKGRANTED TIMESTAMP, LOCKEDBY VARCHAR2(255), CONSTRAINT PK_DATABASECHANGELOGLOCK PRIMARY KEY (ID)); on jdbc:oracle:thin:@localhost:1521:WBMDINSERT INTO SYSTEM.DATABASECHANGELOGLOCK (ID, LOCKED) VALUES (1, 0): ORA-00955: nome già utilizzato da un oggetto esistente

JIRA | Nathan Voxland | 3 years ago
  1. 0

    From http://forum.liquibase.org/topic/error-on-system-databasech-angeloglock-while-re-executing-a-migration I re-run migration, but using the command line tool and the same database changelog and files, in order to use the logLevel parameter and get some more detailed information. here is the command I run: java -jar liquibase-core-3.0.2.jar --driver=oracle.jdbc.OracleDriver --classpath=./lib/ojdbc6-11.2.0.3.jar --changeLogFile=dbchangelog.xml --url="jdbc:oracle:thin:@localhost:1521:WBMD" --username=system --password=...... --logLevel=debug update And here the log I get: DEBUG 25/07/13 17.04:liquibase: Unable to load/access Apache Derby driver class to check version DEBUG 25/07/13 17.04:liquibase: Connected to SYSTEM@jdbc:oracle:thin:@localhost:1521:WBMD DEBUG 25/07/13 17.04:liquibase: Setting auto commit to false from true DEBUG 25/07/13 17.04:liquibase: Create Database Lock Table DEBUG 25/07/13 17.04:liquibase: Executing EXECUTE database command: CREATE TABLE SYSTEM.DATABASECHANGELOGLOCK (ID INTEGER NOT NULL, LOCKED NUMBER(1) NOT NULL, LOCKGRANTED TIMESTAMP, LOCKEDBY VARCHAR2(255), CONSTRAINT PK_DATABASECHANGELOGLOCK PRIMARY KEY (ID)) Liquibase update Failed: liquibase.exception.DatabaseException: Error executing SQL CREATE TABLE SYSTEM.DATABASECHANGELOGLOCK (ID INTEGER NOT NULL, LOCKED NUMBER(1) NOT NULL, LOCKGRANTED TIMESTAMP, LOCKEDBY VARCHAR2(255), CONSTRAINT PK_DATABASECHANGELOGLOCK PRIMARY KEY (ID)); on jdbc:oracle:thin:@localhost:1521:WBMDINSERT INTO SYSTEM.DATABASECHANGELOGLOCK (ID, LOCKED) VALUES (1, 0): ORA-00955: nome già utilizzato da un oggetto esistente SEVERE 25/07/13 17.04:liquibase: liquibase.exception.DatabaseException: Error executing SQL CREATE TABLE SYSTEM.DATABASECHANGELOGLOCK (ID INTEGER NOT NULL, LOCKED NUMBER(1) NOT NULL, LOCKGRANTED TIMESTAMP, LOCKEDBY VARCHAR2(255), CONSTRAINT PK_DATABASECHANGELOGLOCK PRIMARY KEY (ID)); on jdbc:oracle:thin:@localhost:1521:WBMDINSERT INTO SYSTEM.DATABASECHANGELOGLOCK (ID, LOCKED) VALUES (1, 0): ORA-00955: nome già utilizzato da un oggetto esistente liquibase.exception.LockException: liquibase.exception.DatabaseException: Error executing SQL CREATE TABLE SYSTEM.DATABASECHANGELOGLOCK (ID INTEGER NOT NULL, LOCKED NUMBER(1) NOT NULL, LOCKGRANTED TIMESTAMP, LOCKEDBY VARCHAR2(255), CONSTRAINT PK_DATABASECHANGELOGLOCK PRIMARY KEY (ID)); on jdbc:oracle:thin:@localhost:1521:WBMDINSERT INTO SYSTEM.DATABASECHANGELOGLOCK (ID, LOCKED) VALUES (1, 0): ORA-00955: nome già utilizzato da un oggetto esistente at liquibase.lockservice.LockServiceImpl.acquireLock(LockServiceImpl.java:122) at liquibase.lockservice.LockServiceImpl.waitForLock(LockServiceImpl.java:62) at liquibase.Liquibase.update(Liquibase.java:123) at liquibase.integration.commandline.Main.doMigration(Main.java:848) at liquibase.integration.commandline.Main.main(Main.java:138) Caused by: liquibase.exception.DatabaseException: Error executing SQL CREATE TABLE SYSTEM.DATABASECHANGELOGLOCK (ID INTEGER NOT NULL, LOCKED NUMBER(1) NOT NULL, LOCKGRANTED TIMESTAMP, LOCKEDBY VARCHAR2(255), CONSTRAINT PK_DATABASECHANGELOGLOCK PRIMARY KEY (ID)); on jdbc:oracle:thin:@localhost:1521:WBMDINSERT INTO SYSTEM.DATABASECHANGELOGLOCK (ID, LOCKED) VALUES (1, 0): ORA-00955: nome già utilizzato da un oggetto esistente at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:56) at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:98) at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:64) at liquibase.database.AbstractJdbcDatabase.checkDatabaseChangeLogLockTable(AbstractJdbcDatabase.java:778) at liquibase.lockservice.LockServiceImpl.acquireLock(LockServiceImpl.java:95) ... 4 more Caused by: java.sql.SQLSyntaxErrorException: ORA-00955: nome già utilizzato da un oggetto esistente at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:445) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396) at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:879) at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:450) at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:192) at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:531) at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:193) at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:1033) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1329) at oracle.jdbc.driver.OracleStatement.executeInternal(OracleStatement.java:1909) at oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:1871) at oracle.jdbc.driver.OracleStatementWrapper.execute(OracleStatementWrapper.java:318) at liquibase.executor.jvm.JdbcExecutor$1ExecuteStatementCallback.doInStatement(JdbcExecutor.java:86) at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:49) ... 8 more First, it's quite strange it talks about "Apache Derby" since I'm using Oracle only. Anyway, it is quite clear to me that for some reason Liquibase is not able to detect that SYSTEM.DATABASECHANGELOGLOCK is not existing, and tries recrearing it. This absolutely does not happen on any other schema migration on the same DB.

    JIRA | 3 years ago | Nathan Voxland
    liquibase.exception.LockException: liquibase.exception.DatabaseException: Error executing SQL CREATE TABLE SYSTEM.DATABASECHANGELOGLOCK (ID INTEGER NOT NULL, LOCKED NUMBER(1) NOT NULL, LOCKGRANTED TIMESTAMP, LOCKEDBY VARCHAR2(255), CONSTRAINT PK_DATABASECHANGELOGLOCK PRIMARY KEY (ID)); on jdbc:oracle:thin:@localhost:1521:WBMDINSERT INTO SYSTEM.DATABASECHANGELOGLOCK (ID, LOCKED) VALUES (1, 0): ORA-00955: nome già utilizzato da un oggetto esistente
  2. 0

    From http://forum.liquibase.org/topic/error-on-system-databasech-angeloglock-while-re-executing-a-migration I re-run migration, but using the command line tool and the same database changelog and files, in order to use the logLevel parameter and get some more detailed information. here is the command I run: java -jar liquibase-core-3.0.2.jar --driver=oracle.jdbc.OracleDriver --classpath=./lib/ojdbc6-11.2.0.3.jar --changeLogFile=dbchangelog.xml --url="jdbc:oracle:thin:@localhost:1521:WBMD" --username=system --password=...... --logLevel=debug update And here the log I get: DEBUG 25/07/13 17.04:liquibase: Unable to load/access Apache Derby driver class to check version DEBUG 25/07/13 17.04:liquibase: Connected to SYSTEM@jdbc:oracle:thin:@localhost:1521:WBMD DEBUG 25/07/13 17.04:liquibase: Setting auto commit to false from true DEBUG 25/07/13 17.04:liquibase: Create Database Lock Table DEBUG 25/07/13 17.04:liquibase: Executing EXECUTE database command: CREATE TABLE SYSTEM.DATABASECHANGELOGLOCK (ID INTEGER NOT NULL, LOCKED NUMBER(1) NOT NULL, LOCKGRANTED TIMESTAMP, LOCKEDBY VARCHAR2(255), CONSTRAINT PK_DATABASECHANGELOGLOCK PRIMARY KEY (ID)) Liquibase update Failed: liquibase.exception.DatabaseException: Error executing SQL CREATE TABLE SYSTEM.DATABASECHANGELOGLOCK (ID INTEGER NOT NULL, LOCKED NUMBER(1) NOT NULL, LOCKGRANTED TIMESTAMP, LOCKEDBY VARCHAR2(255), CONSTRAINT PK_DATABASECHANGELOGLOCK PRIMARY KEY (ID)); on jdbc:oracle:thin:@localhost:1521:WBMDINSERT INTO SYSTEM.DATABASECHANGELOGLOCK (ID, LOCKED) VALUES (1, 0): ORA-00955: nome già utilizzato da un oggetto esistente SEVERE 25/07/13 17.04:liquibase: liquibase.exception.DatabaseException: Error executing SQL CREATE TABLE SYSTEM.DATABASECHANGELOGLOCK (ID INTEGER NOT NULL, LOCKED NUMBER(1) NOT NULL, LOCKGRANTED TIMESTAMP, LOCKEDBY VARCHAR2(255), CONSTRAINT PK_DATABASECHANGELOGLOCK PRIMARY KEY (ID)); on jdbc:oracle:thin:@localhost:1521:WBMDINSERT INTO SYSTEM.DATABASECHANGELOGLOCK (ID, LOCKED) VALUES (1, 0): ORA-00955: nome già utilizzato da un oggetto esistente liquibase.exception.LockException: liquibase.exception.DatabaseException: Error executing SQL CREATE TABLE SYSTEM.DATABASECHANGELOGLOCK (ID INTEGER NOT NULL, LOCKED NUMBER(1) NOT NULL, LOCKGRANTED TIMESTAMP, LOCKEDBY VARCHAR2(255), CONSTRAINT PK_DATABASECHANGELOGLOCK PRIMARY KEY (ID)); on jdbc:oracle:thin:@localhost:1521:WBMDINSERT INTO SYSTEM.DATABASECHANGELOGLOCK (ID, LOCKED) VALUES (1, 0): ORA-00955: nome già utilizzato da un oggetto esistente at liquibase.lockservice.LockServiceImpl.acquireLock(LockServiceImpl.java:122) at liquibase.lockservice.LockServiceImpl.waitForLock(LockServiceImpl.java:62) at liquibase.Liquibase.update(Liquibase.java:123) at liquibase.integration.commandline.Main.doMigration(Main.java:848) at liquibase.integration.commandline.Main.main(Main.java:138) Caused by: liquibase.exception.DatabaseException: Error executing SQL CREATE TABLE SYSTEM.DATABASECHANGELOGLOCK (ID INTEGER NOT NULL, LOCKED NUMBER(1) NOT NULL, LOCKGRANTED TIMESTAMP, LOCKEDBY VARCHAR2(255), CONSTRAINT PK_DATABASECHANGELOGLOCK PRIMARY KEY (ID)); on jdbc:oracle:thin:@localhost:1521:WBMDINSERT INTO SYSTEM.DATABASECHANGELOGLOCK (ID, LOCKED) VALUES (1, 0): ORA-00955: nome già utilizzato da un oggetto esistente at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:56) at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:98) at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:64) at liquibase.database.AbstractJdbcDatabase.checkDatabaseChangeLogLockTable(AbstractJdbcDatabase.java:778) at liquibase.lockservice.LockServiceImpl.acquireLock(LockServiceImpl.java:95) ... 4 more Caused by: java.sql.SQLSyntaxErrorException: ORA-00955: nome già utilizzato da un oggetto esistente at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:445) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396) at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:879) at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:450) at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:192) at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:531) at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:193) at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:1033) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1329) at oracle.jdbc.driver.OracleStatement.executeInternal(OracleStatement.java:1909) at oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:1871) at oracle.jdbc.driver.OracleStatementWrapper.execute(OracleStatementWrapper.java:318) at liquibase.executor.jvm.JdbcExecutor$1ExecuteStatementCallback.doInStatement(JdbcExecutor.java:86) at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:49) ... 8 more First, it's quite strange it talks about "Apache Derby" since I'm using Oracle only. Anyway, it is quite clear to me that for some reason Liquibase is not able to detect that SYSTEM.DATABASECHANGELOGLOCK is not existing, and tries recrearing it. This absolutely does not happen on any other schema migration on the same DB.

    JIRA | 3 years ago | Nathan Voxland
    liquibase.exception.LockException: liquibase.exception.DatabaseException: Error executing SQL CREATE TABLE SYSTEM.DATABASECHANGELOGLOCK (ID INTEGER NOT NULL, LOCKED NUMBER(1) NOT NULL, LOCKGRANTED TIMESTAMP, LOCKEDBY VARCHAR2(255), CONSTRAINT PK_DATABASECHANGELOGLOCK PRIMARY KEY (ID)); on jdbc:oracle:thin:@localhost:1521:WBMDINSERT INTO SYSTEM.DATABASECHANGELOGLOCK (ID, LOCKED) VALUES (1, 0): ORA-00955: nome già utilizzato da un oggetto esistente
  3. 0

    invalid character when running liquibase script

    Stack Overflow | 3 years ago | Marthin
    java.sql.SQLSyntaxErrorException: ORA-00911: invalid character
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    ORA-00933 When trying to insert space followed by "n" Character

    Stack Overflow | 2 years ago | Slettal
    com.googlecode.flyway.core.command.FlywaySqlScriptException: Error executing statement at line 12: INSERT INTO TEST (TEST) VALUES ( ' n');
  6. 0

    Executing SQL Script via Ant

    Stack Overflow | 2 years ago | user1259318
    java.sql.SQLSyntaxErrorException: ORA-00922: Fehlende oder ungültige Option

    3 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.SQLSyntaxErrorException

      ORA-00955: nome già utilizzato da un oggetto esistente

      at oracle.jdbc.driver.T4CTTIoer.processError()
    2. Oracle jdbc
      OracleStatementWrapper.execute
      1. oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:445)
      2. oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
      3. oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:879)
      4. oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:450)
      5. oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:192)
      6. oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:531)
      7. oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:193)
      8. oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:1033)
      9. oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1329)
      10. oracle.jdbc.driver.OracleStatement.executeInternal(OracleStatement.java:1909)
      11. oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:1871)
      12. oracle.jdbc.driver.OracleStatementWrapper.execute(OracleStatementWrapper.java:318)
      12 frames
    3. Liquibase Core
      Main.main
      1. liquibase.executor.jvm.JdbcExecutor$1ExecuteStatementCallback.doInStatement(JdbcExecutor.java:86)
      2. liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:49)
      3. liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:98)
      4. liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:64)
      5. liquibase.database.AbstractJdbcDatabase.checkDatabaseChangeLogLockTable(AbstractJdbcDatabase.java:778)
      6. liquibase.lockservice.LockServiceImpl.acquireLock(LockServiceImpl.java:95)
      7. liquibase.lockservice.LockServiceImpl.waitForLock(LockServiceImpl.java:62)
      8. liquibase.Liquibase.update(Liquibase.java:123)
      9. liquibase.integration.commandline.Main.doMigration(Main.java:848)
      10. liquibase.integration.commandline.Main.main(Main.java:138)
      10 frames