We're updating the issue view to help you get more done. 

Unable to generate Change Log for our smallest database

Description

We have 5 databases that we'd like to change control. I tried to generateChangeLog on the smallest one, and it fails:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 liquibase --url="jdbc:informix-sqli:INFORMIXSERVER=informix01_tcp;SQLH_TYPE=FILE;SQLH_FILE=/opt/informix/informix/etc/sqlhosts;DATABASE=wallet" --logLevel=severe --logFile=./lb.log --classpath=/opt/informix/informix/jdbc/lib/ifxjdbc.jar --changeLogFile ./test1ChangeLog.xml --includeTablespace=true generateChangeLog Starting Liquibase at Thu, 07 Mar 2019 13:27:07 GMT (version 3.6.3 built at 2019-01-29 11:34:48) Unexpected error running Liquibase: liquibase.exception.DatabaseException: liquibase.exception.DatabaseException: java.sql.SQLException: The cursor has been previously released and is unavailable. liquibase.exception.LiquibaseException: liquibase.command.CommandExecutionException: liquibase.exception.DatabaseException: liquibase.exception.DatabaseException: java.sql.SQLException: The cursor has been previously released and is unavailable. at liquibase.integration.commandline.CommandLineUtils.doGenerateChangeLog(CommandLineUtils.java:279) at liquibase.integration.commandline.Main.doMigration(Main.java:1058) at liquibase.integration.commandline.Main.run(Main.java:199) at liquibase.integration.commandline.Main.main(Main.java:137) Caused by: liquibase.command.CommandExecutionException: liquibase.exception.DatabaseException: liquibase.exception.DatabaseException: java.sql.SQLException: The cursor has been previously released and is unavailable. at liquibase.command.AbstractCommand.execute(AbstractCommand.java:24) at liquibase.integration.commandline.CommandLineUtils.doGenerateChangeLog(CommandLineUtils.java:277) ... 3 common frames omitted Caused by: liquibase.exception.DatabaseException: liquibase.exception.DatabaseException: java.sql.SQLException: The cursor has been previously released and is unavailable. at liquibase.snapshot.jvm.ForeignKeySnapshotGenerator.snapshotObject(ForeignKeySnapshotGenerator.java:223) 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.DatabaseSnapshot.include(DatabaseSnapshot.java:286) at liquibase.snapshot.DatabaseSnapshot.replaceObject(DatabaseSnapshot.java:407) at liquibase.snapshot.DatabaseSnapshot.includeNestedObjects(DatabaseSnapshot.java:334) at liquibase.snapshot.DatabaseSnapshot.include(DatabaseSnapshot.java:309) at liquibase.snapshot.DatabaseSnapshot.replaceObject(DatabaseSnapshot.java:407) at liquibase.snapshot.DatabaseSnapshot.replaceObject(DatabaseSnapshot.java:429) at liquibase.snapshot.DatabaseSnapshot.includeNestedObjects(DatabaseSnapshot.java:334) at liquibase.snapshot.DatabaseSnapshot.include(DatabaseSnapshot.java:309) at liquibase.snapshot.DatabaseSnapshot.init(DatabaseSnapshot.java:102) at liquibase.snapshot.DatabaseSnapshot.<init>(DatabaseSnapshot.java:59) at liquibase.snapshot.JdbcDatabaseSnapshot.<init>(JdbcDatabaseSnapshot.java:38) at liquibase.snapshot.SnapshotGeneratorFactory.createSnapshot(SnapshotGeneratorFactory.java:217) at liquibase.snapshot.SnapshotGeneratorFactory.createSnapshot(SnapshotGeneratorFactory.java:190) at liquibase.command.core.DiffCommand.createReferenceSnapshot(DiffCommand.java:221) at liquibase.command.core.DiffCommand.createDiffResult(DiffCommand.java:143) at liquibase.command.core.GenerateChangeLogCommand.run(GenerateChangeLogCommand.java:46) at liquibase.command.AbstractCommand.execute(AbstractCommand.java:19) ... 4 common frames omitted Caused by: liquibase.exception.DatabaseException: java.sql.SQLException: The cursor has been previously released and is unavailable. at liquibase.snapshot.ResultSetCache.get(ResultSetCache.java:101) at liquibase.snapshot.JdbcDatabaseSnapshot$CachingDatabaseMetaData.getForeignKeys(JdbcDatabaseSnapshot.java:74) at liquibase.snapshot.jvm.ForeignKeySnapshotGenerator.snapshotObject(ForeignKeySnapshotGenerator.java:127) ... 27 common frames omitted Caused by: java.sql.SQLException: The cursor has been previously released and is unavailable. at com.informix.util.IfxErrMsg.buildException(IfxErrMsg.java:474) at com.informix.util.IfxErrMsg.getSQLException(IfxErrMsg.java:443) at com.informix.util.IfxErrMsg.getSQLException(IfxErrMsg.java:394) at com.informix.jdbc.IfxSqli.addException(IfxSqli.java:3191) at com.informix.jdbc.IfxSqli.receiveError(IfxSqli.java:3472) at com.informix.jdbc.IfxSqli.dispatchMsg(IfxSqli.java:2379) at com.informix.jdbc.IfxSqli.receiveMessage(IfxSqli.java:2304) at com.informix.jdbc.IfxSqli.executeFetch(IfxSqli.java:2038) at com.informix.jdbc.IfxSqli.getaRow(IfxSqli.java:4082) at com.informix.jdbc.IfxResultSet.next(IfxResultSet.java:494) at com.informix.jdbc.IfxDatabaseMetaData.getImportedKeys(IfxDatabaseMetaData.java:5389) at liquibase.snapshot.JdbcDatabaseSnapshot$CachingDatabaseMetaData$1.fastFetch(JdbcDatabaseSnapshot.java:126) at liquibase.snapshot.ResultSetCache.get(ResultSetCache.java:70) ... 29 common frames omitted Caused by: java.sql.SQLException: null at com.informix.util.IfxErrMsg.buildException(IfxErrMsg.java:474) at com.informix.util.IfxErrMsg.getSQLException(IfxErrMsg.java:443) at com.informix.util.IfxErrMsg.getSQLException(IfxErrMsg.java:394) at com.informix.jdbc.IfxSqli.receiveError(IfxSqli.java:3477) ... 37 common frames omitted For more information, please use the --logLevel flag

I can't get --logLevel to do anything either, I must be missing something, so I had to try about 100 lines of the schema at a time until it fell over. I then approached the failing object one change at a time.

The error occurs if you have more than 2 foreign keys.

I didn't test for more than 2 of any other kind of constraint.

Environment

Informix 12.10.FC9DE on MacOSX

Status

Assignee

Unassigned

Reporter

William Wheeler

Labels

None

Components

Affects versions

3.6.3

Priority

Blocker