Hi All,
Need help to resolve the issue “DB2 SQL Error: SQLCODE=-2439, SQLSTATE= , SQLERRMC=null, DRIVER=4.31.10”, when i try to execute and do initial setup of creating databasechangelog table in DB2 production instance. Please help to resolve.
Note - databasechangeloglock table is created through jenkin pipeline without issue, but failed to create databasechangelog table
1 Like
Liquibase was able to create DATABASECHANGELOGLOCK table but failed to create DATABASECHANGELOG table repeatedly. We have no clue in resolving the issue.
Liquibase version: 4.15.0
DB2 version: “DB2 v11.1.4.6”, “special_41025”, Fix Pack 6.
JDBC Drivr: jcc-11.5.6.0.jar
Error message:
DB2 SQL Error: SQLCODE=-2439, SQLSTATE= , SQLERRMC=null, DRIVER=4.31.10
(https://www.ibm.com/support/pages/node/6595471)
Thread dump from Liquibase.log below.
[2023-01-28 13:14:10] FINE [liquibase.executor] Release Database Lock
[2023-01-28 13:14:10] FINE [liquibase.executor] Executing with the ‘jdbc’ executor
[2023-01-28 13:14:10] FINE [liquibase.executor] Executing with the ‘jdbc’ executor
[2023-01-28 13:14:10] INFO [liquibase.lockservice] Successfully released change log lock
[2023-01-28 13:14:10] SEVERE [liquibase.integration] DB2 SQL Error: SQLCODE=-2439, SQLSTATE= , SQLERRMC=null, DRIVER=4.31.10
liquibase.exception.CommandExecutionException: liquibase.exception.LiquibaseException: liquibase.exception.UnexpectedLiquibaseException: liquibase.exception.DatabaseException: com.ibm.db2.jcc.am.SqlException: DB2 SQL Error: SQLCODE=-2439, SQLSTATE= , SQLERRMC=null, DRIVER=4.31.10
at liquibase.command.CommandScope.execute(CommandScope.java:179)
at liquibase.integration.commandline.CommandRunner.call(CommandRunner.java:51)
at liquibase.integration.commandline.CommandRunner.call(CommandRunner.java:21)
at picocli.CommandLine.executeUserObject(CommandLine.java:1953)
at picocli.CommandLine.access$1300(CommandLine.java:145)
at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2358)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2352)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2314)
at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
at picocli.CommandLine$RunLast.execute(CommandLine.java:2316)
at picocli.CommandLine.execute(CommandLine.java:2078)
at liquibase.integration.commandline.LiquibaseCommandLine.lambda$execute$1(LiquibaseCommandLine.java:353)
at liquibase.Scope.child(Scope.java:189)
at liquibase.Scope.child(Scope.java:165)
at liquibase.integration.commandline.LiquibaseCommandLine.execute(LiquibaseCommandLine.java:318)
at liquibase.integration.commandline.LiquibaseCommandLine.main(LiquibaseCommandLine.java:84)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at liquibase.integration.commandline.LiquibaseLauncher.main(LiquibaseLauncher.java:107)
Caused by: liquibase.exception.LiquibaseException: liquibase.exception.UnexpectedLiquibaseException: liquibase.exception.DatabaseException: com.ibm.db2.jcc.am.SqlException: DB2 SQL Error: SQLCODE=-2439, SQLSTATE= , SQLERRMC=null, DRIVER=4.31.10
at liquibase.Liquibase.runInScope(Liquibase.java:2419)
at liquibase.Liquibase.update(Liquibase.java:209)
at liquibase.Liquibase.update(Liquibase.java:195)
at liquibase.integration.commandline.Main.doMigration(Main.java:1844)
at liquibase.integration.commandline.Main$1.lambda$run$0(Main.java:397)
at liquibase.Scope.lambda$child$0(Scope.java:180)
at liquibase.Scope.child(Scope.java:189)
at liquibase.Scope.child(Scope.java:179)
at liquibase.Scope.child(Scope.java:158)
at liquibase.integration.commandline.Main$1.run(Main.java:396)
at liquibase.integration.commandline.Main$1.run(Main.java:218)
at liquibase.Scope.child(Scope.java:189)
at liquibase.Scope.child(Scope.java:165)
at liquibase.integration.commandline.Main.run(Main.java:218)
at liquibase.command.AbstractCliWrapperCommandStep.run(AbstractCliWrapperCommandStep.java:33)
at liquibase.command.CommandScope.execute(CommandScope.java:173)
… 20 more
Caused by: liquibase.exception.UnexpectedLiquibaseException: liquibase.exception.DatabaseException: com.ibm.db2.jcc.am.SqlException: DB2 SQL Error: SQLCODE=-2439, SQLSTATE= , SQLERRMC=null, DRIVER=4.31.10
at liquibase.changelog.StandardChangeLogHistoryService.init(StandardChangeLogHistoryService.java:112)
at liquibase.Liquibase.checkLiquibaseTables(Liquibase.java:1922)
at liquibase.Liquibase.lambda$update$1(Liquibase.java:224)
at liquibase.Scope.lambda$child$0(Scope.java:180)
at liquibase.Scope.child(Scope.java:189)
at liquibase.Scope.child(Scope.java:179)
at liquibase.Scope.child(Scope.java:158)
at liquibase.Liquibase.runInScope(Liquibase.java:2414)
… 35 more
Caused by: liquibase.exception.DatabaseException: com.ibm.db2.jcc.am.SqlException: DB2 SQL Error: SQLCODE=-2439, SQLSTATE= , SQLERRMC=null, DRIVER=4.31.10
at liquibase.snapshot.ResultSetCache.get(ResultSetCache.java:105)
at liquibase.snapshot.JdbcDatabaseSnapshot$CachingDatabaseMetaData.getTables(JdbcDatabaseSnapshot.java:1061)
at liquibase.snapshot.jvm.TableSnapshotGenerator.snapshotObject(TableSnapshotGenerator.java:34)
at liquibase.snapshot.jvm.JdbcSnapshotGenerator.snapshot(JdbcSnapshotGenerator.java:66)
at liquibase.snapshot.SnapshotGeneratorChain.snapshot(SnapshotGeneratorChain.java:49)
at liquibase.snapshot.jvm.JdbcSnapshotGenerator.snapshot(JdbcSnapshotGenerator.java:69)
at liquibase.snapshot.SnapshotGeneratorChain.snapshot(SnapshotGeneratorChain.java:49)
at liquibase.snapshot.jvm.JdbcSnapshotGenerator.snapshot(JdbcSnapshotGenerator.java:69)
at liquibase.snapshot.SnapshotGeneratorChain.snapshot(SnapshotGeneratorChain.java:49)
at liquibase.snapshot.jvm.JdbcSnapshotGenerator.snapshot(JdbcSnapshotGenerator.java:69)
at liquibase.snapshot.SnapshotGeneratorChain.snapshot(SnapshotGeneratorChain.java:49)
at liquibase.snapshot.jvm.JdbcSnapshotGenerator.snapshot(JdbcSnapshotGenerator.java:69)
at liquibase.snapshot.SnapshotGeneratorChain.snapshot(SnapshotGeneratorChain.java:49)
at liquibase.snapshot.jvm.JdbcSnapshotGenerator.snapshot(JdbcSnapshotGenerator.java:69)
at liquibase.snapshot.SnapshotGeneratorChain.snapshot(SnapshotGeneratorChain.java:49)
at liquibase.snapshot.jvm.JdbcSnapshotGenerator.snapshot(JdbcSnapshotGenerator.java:69)
at liquibase.snapshot.SnapshotGeneratorChain.snapshot(SnapshotGeneratorChain.java:49)
at liquibase.snapshot.DatabaseSnapshot.include(DatabaseSnapshot.java:312)
at liquibase.snapshot.DatabaseSnapshot.init(DatabaseSnapshot.java:105)
at liquibase.snapshot.DatabaseSnapshot.(DatabaseSnapshot.java:58)
at liquibase.snapshot.JdbcDatabaseSnapshot.(JdbcDatabaseSnapshot.java:34)
at liquibase.snapshot.SnapshotGeneratorFactory.createSnapshot(SnapshotGeneratorFactory.java:215)
at liquibase.snapshot.SnapshotGeneratorFactory.createSnapshot(SnapshotGeneratorFactory.java:244)
at liquibase.snapshot.SnapshotGeneratorFactory.getDatabaseChangeLogTable(SnapshotGeneratorFactory.java:252)
at liquibase.changelog.StandardChangeLogHistoryService.init(StandardChangeLogHistoryService.java:109)
… 42 more
Caused by: com.ibm.db2.jcc.am.SqlException: DB2 SQL Error: SQLCODE=-2439, SQLSTATE= , SQLERRMC=null, DRIVER=4.31.10
at com.ibm.db2.jcc.am.b7.a(b7.java:815)
at com.ibm.db2.jcc.am.b7.a(b7.java:66)
at com.ibm.db2.jcc.am.b7.a(b7.java:140)
at com.ibm.db2.jcc.am.k_.b(k_.java:2491)
at com.ibm.db2.jcc.am.k_.c(k_.java:2472)
at com.ibm.db2.jcc.t4.ab.n(ab.java:917)
at com.ibm.db2.jcc.t4.ab.f(ab.java:154)
at com.ibm.db2.jcc.t4.p.e(p.java:81)
at com.ibm.db2.jcc.t4.av.k(av.java:175)
at com.ibm.db2.jcc.am.k_.ao(k_.java:2433)
at com.ibm.db2.jcc.am.la.a(la.java:4719)
at com.ibm.db2.jcc.am.la.b(la.java:4215)
at com.ibm.db2.jcc.am.CallableStatement.bd(CallableStatement.java:177)
at com.ibm.db2.jcc.am.DatabaseMetaData.executeCatalogQuery(DatabaseMetaData.java:7905)
at com.ibm.db2.jcc.am.DatabaseMetaData.getTablesX(DatabaseMetaData.java:6383)
at com.ibm.db2.jcc.am.DatabaseMetaData.getTables(DatabaseMetaData.java:6289)
at liquibase.snapshot.JdbcDatabaseSnapshot$CachingDatabaseMetaData$2.fastFetchQuery(JdbcDatabaseSnapshot.java:1104)
at liquibase.snapshot.ResultSetCache$SingleResultSetExtractor.fastFetch(ResultSetCache.java:367)
at liquibase.snapshot.ResultSetCache.get(ResultSetCache.java:72)
… 66 more