Forum Stats

  • 3,767,981 Users
  • 2,252,736 Discussions
  • 7,874,399 Comments

Discussions

lb genschema leads to unique constraint error

User_W45BH
User_W45BH Member Posts: 2 Red Ribbon

Hi,

with the new version of sqlcl (21.3.0.278.1045) liquibase failes with genschema:

> lb genschema

[...]

[Method processCaptureTable]: Processing has failed for your request.

ORA-00001: unique constraint (SCHEMA1.DATABASECHANGELOG_EXPORT_PK) violated

Anyone else has seen this behaviour? Any suggestions?

Best regards,

Diego

Tagged:

Answers

  • Paavo
    Paavo Member Posts: 675 Silver Badge
    edited Oct 25, 2021 12:10PM

    Hi, yes

    [Method processCaptureTable]: Processing has failed for your request.
    ORA-00001: unique constraint (X.DATABASECHANGELOG_EXPORT_PK) violated
     >lb version
    
    
    Liquibase version: 4.4.2
    Extension Version: 21.3.1.0
    
    
    
  • bglazyr
    bglazyr Member Posts: 48 Bronze Badge

    I have the same problem

    SQL> lb genschema -debug

    [{log=false, replace=false, dir=, type=, sql=false, password=, enable=true, context=, grants=false, silent=false, debug=true, runalways=false, synonyms=false, emit_schema=false, count=, changelog=, label=, runonchange=false, url=, command=genschema, fail=false, help=false, report=true, name=, privs=true, user=, isSqlCl=true}]



    Export Flags Used:


    Export Grants          false

    Export Synonyms        false

    [Method loadCaptureTable]:

                    Executing

    [Type - TYPE_SPEC]:                         258 ms

    [Type - TYPE_BODY]:                          75 ms

    [Type - SEQUENCE]:                          201 ms

    [Type - DIRECTORY]:                           5 ms

    [Type - CLUSTER]:                            36 ms

    [Type - TABLE]:                            6529 ms

    [Type - MATERIALIZED_VIEW_LOG]:             126 ms

    [Type - MATERIALIZED_VIEW]:                 239 ms

    [Type - VIEW]:                              840 ms

    [Type - REF_CONSTRAINT]:                   1718 ms

    [Type - DIMENSION]:                           8 ms

    [Type - FUNCTION]:                          144 ms

    [Type - PROCEDURE]:                         374 ms

    [Type - PACKAGE_SPEC]:                      517 ms

    [Type - DB_LINK]:                            16 ms

    [Type - SYNONYM]:                            50 ms

    [Type - INDEX]:                            2987 ms

    [Type - TRIGGER]:                           257 ms

    [Type - PACKAGE_BODY]:                    13796 ms

    [Type - JOB]:                                74 ms

                    End

    [Method loadCaptureTable]:                28251 ms

    [Method processCaptureTable]: --------------------------------------------------------------------------------

    Oracle Liquibase Exception Handler additional information available using -debug

    --------------------------------------------------------------------------------

    processError

    --------------------------------------------------------------------------------

    java.sql.SQLIntegrityConstraintViolationException: ORA-00001: unique constraint (SED4.DATABASECHANGELOG_EXPORT_PK) violated


           at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:628)

           at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:562)

           at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1145)

           at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:726)

           at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:291)

           at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:492)

           at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:148)

           at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:1038)

           at oracle.jdbc.driver.OracleStatement.executeSQLStatement(OracleStatement.java:1507)

           at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1287)

           at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3735)

           at oracle.jdbc.driver.OraclePreparedStatement.executeLargeUpdate(OraclePreparedStatement.java:3910)

           at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3889)

           at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:992)

           at oracle.dbtools.raptor.liquibase.generator.SchemaGenerator.insertCommentCaptureTable(SchemaGenerator.java:901)

           at oracle.dbtools.raptor.liquibase.generator.SchemaGenerator.processCaptureTable(SchemaGenerator.java:1070)

           at oracle.dbtools.raptor.liquibase.generator.SchemaGenerator.doSchemaExport(SchemaGenerator.java:186)

           at oracle.dbtools.raptor.scriptrunner.commands.liquibase.LiquibaseActions.genDbSchemaWork(LiquibaseActions.java:545)

           at oracle.dbtools.raptor.scriptrunner.commands.liquibase.liquibaseCommand.handleEvent(liquibaseCommand.java:206)

           at oracle.dbtools.raptor.newscriptrunner.CommandRegistry.fireListeners(CommandRegistry.java:346)

           at oracle.dbtools.raptor.newscriptrunner.ScriptRunner.run(ScriptRunner.java:226)

           at oracle.dbtools.raptor.newscriptrunner.ScriptExecutor.run(ScriptExecutor.java:344)

           at oracle.dbtools.raptor.newscriptrunner.ScriptExecutor.run(ScriptExecutor.java:227)

           at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.processLine(SqlCli.java:337)

           at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.runSqlcl(SqlCli.java:1056)

           at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.main(SqlCli.java:364)

    Caused by: Error : 1, Position : 0, Sql = insert into DATABASECHANGELOG_EXPORT (rank,type,seq,meta,file_name,object_name) values (:rank,:type,:seq,:meta,:filename,:object_name), OriginalSql = insert into DATABASECHANGELOG_EXPORT (rank,type,seq,meta,file_name,object_name) values (:rank,:type,:seq,:meta,:filename,:object_name), Error Msg = ORA-00001: unique constraint (SED4.DATABASECHANGELOG_EXPORT_PK) violated


           at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:632)

           ... 25 more


    --------------------------------------------------------------------------------

    --------------------------------------------------------------------------------

    Oracle Liquibase Exception Handler additional information available using -debug

    --------------------------------------------------------------------------------

    processCaptureTable

    --------------------------------------------------------------------------------

    java.sql.SQLIntegrityConstraintViolationException: ORA-00001: unique constraint (SED4.DATABASECHANGELOG_EXPORT_PK) violated


           at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:628)

           at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:562)

           at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1145)

           at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:726)

           at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:291)

           at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:492)

           at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:148)

           at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:1038)

           at oracle.jdbc.driver.OracleStatement.executeSQLStatement(OracleStatement.java:1507)

           at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1287)

           at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3735)

           at oracle.jdbc.driver.OraclePreparedStatement.executeLargeUpdate(OraclePreparedStatement.java:3910)

           at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3889)

           at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:992)

           at oracle.dbtools.raptor.liquibase.generator.SchemaGenerator.insertCommentCaptureTable(SchemaGenerator.java:901)

           at oracle.dbtools.raptor.liquibase.generator.SchemaGenerator.processCaptureTable(SchemaGenerator.java:1070)

           at oracle.dbtools.raptor.liquibase.generator.SchemaGenerator.doSchemaExport(SchemaGenerator.java:186)

           at oracle.dbtools.raptor.scriptrunner.commands.liquibase.LiquibaseActions.genDbSchemaWork(LiquibaseActions.java:545)

           at oracle.dbtools.raptor.scriptrunner.commands.liquibase.liquibaseCommand.handleEvent(liquibaseCommand.java:206)

           at oracle.dbtools.raptor.newscriptrunner.CommandRegistry.fireListeners(CommandRegistry.java:346)

           at oracle.dbtools.raptor.newscriptrunner.ScriptRunner.run(ScriptRunner.java:226)

           at oracle.dbtools.raptor.newscriptrunner.ScriptExecutor.run(ScriptExecutor.java:344)

           at oracle.dbtools.raptor.newscriptrunner.ScriptExecutor.run(ScriptExecutor.java:227)

           at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.processLine(SqlCli.java:337)

           at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.runSqlcl(SqlCli.java:1056)

           at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.main(SqlCli.java:364)

    Caused by: Error : 1, Position : 0, Sql = insert into DATABASECHANGELOG_EXPORT (rank,type,seq,meta,file_name,object_name) values (:rank,:type,:seq,:meta,:filename,:object_name), OriginalSql = insert into DATABASECHANGELOG_EXPORT (rank,type,seq,meta,file_name,object_name) values (:rank,:type,:seq,:meta,:filename,:object_name), Error Msg = ORA-00001: unique constraint (SED4.DATABASECHANGELOG_EXPORT_PK) violated


           at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:632)

           ... 25 more


    --------------------------------------------------------------------------------

    --------------------------------------------------------------------------------

    Oracle Liquibase Exception Handler additional information available using -debug

    --------------------------------------------------------------------------------

    processCaptureTable

    --------------------------------------------------------------------------------

    java.sql.SQLIntegrityConstraintViolationException: ORA-00001: unique constraint (SED4.DATABASECHANGELOG_EXPORT_PK) violated


           at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:628)

           at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:562)

           at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1145)

           at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:726)

           at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:291)

           at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:492)

           at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:148)

           at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:1038)

           at oracle.jdbc.driver.OracleStatement.executeSQLStatement(OracleStatement.java:1507)

           at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1287)

           at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3735)

           at oracle.jdbc.driver.OraclePreparedStatement.executeLargeUpdate(OraclePreparedStatement.java:3910)

           at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3889)

           at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:992)

           at oracle.dbtools.raptor.liquibase.generator.SchemaGenerator.insertCommentCaptureTable(SchemaGenerator.java:901)

           at oracle.dbtools.raptor.liquibase.generator.SchemaGenerator.processCaptureTable(SchemaGenerator.java:1070)

           at oracle.dbtools.raptor.liquibase.generator.SchemaGenerator.doSchemaExport(SchemaGenerator.java:186)

           at oracle.dbtools.raptor.scriptrunner.commands.liquibase.LiquibaseActions.genDbSchemaWork(LiquibaseActions.java:545)

           at oracle.dbtools.raptor.scriptrunner.commands.liquibase.liquibaseCommand.handleEvent(liquibaseCommand.java:206)

           at oracle.dbtools.raptor.newscriptrunner.CommandRegistry.fireListeners(CommandRegistry.java:346)

           at oracle.dbtools.raptor.newscriptrunner.ScriptRunner.run(ScriptRunner.java:226)

           at oracle.dbtools.raptor.newscriptrunner.ScriptExecutor.run(ScriptExecutor.java:344)

           at oracle.dbtools.raptor.newscriptrunner.ScriptExecutor.run(ScriptExecutor.java:227)

           at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.processLine(SqlCli.java:337)

           at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.runSqlcl(SqlCli.java:1056)

           at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.main(SqlCli.java:364)

    Caused by: Error : 1, Position : 0, Sql = insert into DATABASECHANGELOG_EXPORT (rank,type,seq,meta,file_name,object_name) values (:rank,:type,:seq,:meta,:filename,:object_name), OriginalSql = insert into DATABASECHANGELOG_EXPORT (rank,type,seq,meta,file_name,object_name) values (:rank,:type,:seq,:meta,:filename,:object_name), Error Msg = ORA-00001: unique constraint (SED4.DATABASECHANGELOG_EXPORT_PK) violated


           at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:632)

           ... 25 more


    --------------------------------------------------------------------------------

    --------------------------------------------------------------------------------

    Oracle Liquibase Exception Handler additional information available using -debug

    --------------------------------------------------------------------------------

    processCaptureTable

    --------------------------------------------------------------------------------

    java.sql.SQLIntegrityConstraintViolationException: ORA-00001: unique constraint (SED4.DATABASECHANGELOG_EXPORT_PK) violated


           at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:628)

           at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:562)

           at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1145)

           at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:726)

           at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:291)

           at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:492)

           at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:148)

           at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:1038)

           at oracle.jdbc.driver.OracleStatement.executeSQLStatement(OracleStatement.java:1507)

           at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1287)

           at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3735)

           at oracle.jdbc.driver.OraclePreparedStatement.executeLargeUpdate(OraclePreparedStatement.java:3910)

           at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3889)

           at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:992)

           at oracle.dbtools.raptor.liquibase.generator.SchemaGenerator.insertCommentCaptureTable(SchemaGenerator.java:901)

           at oracle.dbtools.raptor.liquibase.generator.SchemaGenerator.processCaptureTable(SchemaGenerator.java:1070)

           at oracle.dbtools.raptor.liquibase.generator.SchemaGenerator.doSchemaExport(SchemaGenerator.java:186)

           at oracle.dbtools.raptor.scriptrunner.commands.liquibase.LiquibaseActions.genDbSchemaWork(LiquibaseActions.java:545)

           at oracle.dbtools.raptor.scriptrunner.commands.liquibase.liquibaseCommand.handleEvent(liquibaseCommand.java:206)

           at oracle.dbtools.raptor.newscriptrunner.CommandRegistry.fireListeners(CommandRegistry.java:346)

           at oracle.dbtools.raptor.newscriptrunner.ScriptRunner.run(ScriptRunner.java:226)

           at oracle.dbtools.raptor.newscriptrunner.ScriptExecutor.run(ScriptExecutor.java:344)

           at oracle.dbtools.raptor.newscriptrunner.ScriptExecutor.run(ScriptExecutor.java:227)

           at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.processLine(SqlCli.java:337)

           at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.runSqlcl(SqlCli.java:1056)

           at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.main(SqlCli.java:364)

    Caused by: Error : 1, Position : 0, Sql = insert into DATABASECHANGELOG_EXPORT (rank,type,seq,meta,file_name,object_name) values (:rank,:type,:seq,:meta,:filename,:object_name), OriginalSql = insert into DATABASECHANGELOG_EXPORT (rank,type,seq,meta,file_name,object_name) values (:rank,:type,:seq,:meta,:filename,:object_name), Error Msg = ORA-00001: unique constraint (SED4.DATABASECHANGELOG_EXPORT_PK) violated


           at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:632)

           ... 25 more


    --------------------------------------------------------------------------------

    --------------------------------------------------------------------------------

    Oracle Liquibase Exception Handler additional information available using -debug

    --------------------------------------------------------------------------------

    Processing has failed for your request.

    {0}

    {1}


    --------------------------------------------------------------------------------

    java.sql.SQLIntegrityConstraintViolationException: ORA-00001: unique constraint (SED4.DATABASECHANGELOG_EXPORT_PK) violated


           at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:628)

           at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:562)

           at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1145)

           at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:726)

           at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:291)

           at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:492)

           at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:148)

           at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:1038)

           at oracle.jdbc.driver.OracleStatement.executeSQLStatement(OracleStatement.java:1507)

           at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1287)

           at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3735)

           at oracle.jdbc.driver.OraclePreparedStatement.executeLargeUpdate(OraclePreparedStatement.java:3910)

           at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3889)

           at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:992)

           at oracle.dbtools.raptor.liquibase.generator.SchemaGenerator.insertCommentCaptureTable(SchemaGenerator.java:901)

           at oracle.dbtools.raptor.liquibase.generator.SchemaGenerator.processCaptureTable(SchemaGenerator.java:1070)

           at oracle.dbtools.raptor.liquibase.generator.SchemaGenerator.doSchemaExport(SchemaGenerator.java:186)

           at oracle.dbtools.raptor.scriptrunner.commands.liquibase.LiquibaseActions.genDbSchemaWork(LiquibaseActions.java:545)

           at oracle.dbtools.raptor.scriptrunner.commands.liquibase.liquibaseCommand.handleEvent(liquibaseCommand.java:206)

           at oracle.dbtools.raptor.newscriptrunner.CommandRegistry.fireListeners(CommandRegistry.java:346)

           at oracle.dbtools.raptor.newscriptrunner.ScriptRunner.run(ScriptRunner.java:226)

           at oracle.dbtools.raptor.newscriptrunner.ScriptExecutor.run(ScriptExecutor.java:344)

           at oracle.dbtools.raptor.newscriptrunner.ScriptExecutor.run(ScriptExecutor.java:227)

           at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.processLine(SqlCli.java:337)

           at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.runSqlcl(SqlCli.java:1056)

           at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.main(SqlCli.java:364)

    Caused by: Error : 1, Position : 0, Sql = insert into DATABASECHANGELOG_EXPORT (rank,type,seq,meta,file_name,object_name) values (:rank,:type,:seq,:meta,:filename,:object_name), OriginalSql = insert into DATABASECHANGELOG_EXPORT (rank,type,seq,meta,file_name,object_name) values (:rank,:type,:seq,:meta,:filename,:object_name), Error Msg = ORA-00001: unique constraint (SED4.DATABASECHANGELOG_EXPORT_PK) violated


           at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:632)

           ... 25 more


    --------------------------------------------------------------------------------

    Processing has failed for your request.

    ORA-00001: unique constraint (SED4.DATABASECHANGELOG_EXPORT_PK) violated

    SQL> lb version

    Liquibase version:  4.4.2

    Extension Version:  21.3.3.0

    SQL> lb genschema ORA-00001: unique constraint (SED4.DATABASECHANGELOG_EXPORT_PK) violated