Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.21.0
-
None
Description
When NiFi registry is configured to store metadata in a MS SQL Server database, attempts to start it fail with the following exception:
2019-03-12 11:22:00,234 ERROR [main] o.a.n.r.db.CustomFlywayMigrationStrategy The result set is closed. com.microsoft.sqlserver.jdbc.SQLServerException: The result set is closed. at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:226) ~[mssql-jdbc-7.0.0.jre8.jar:na] at com.microsoft.sqlserver.jdbc.SQLServerResultSet.checkClosed(SQLServerResultSet.java:444) ~[mssql-jdbc-7.0.0.jre8.jar:na] at com.microsoft.sqlserver.jdbc.SQLServerResultSet.next(SQLServerResultSet.java:981) ~[mssql-jdbc-7.0.0.jre8.jar:na] at org.apache.nifi.registry.db.CustomFlywayMigrationStrategy.isNewDatabase(CustomFlywayMigrationStrategy.java:109) [nifi-registry-framework-0.3.0.jar:0.3.0] at org.apache.nifi.registry.db.CustomFlywayMigrationStrategy.migrate(CustomFlywayMigrationStrategy.java:64) [nifi-registry-framework-0.3.0.jar:0.3.0]
The problem here is that CustomFlywayMigrationStrategy.isNewDatabase() tries to use two ResultSet instances at the same time. That does not work, because when connection.getMetaData().getTables(...) is called for the second time, the first result set is automatically closed.
Note: The issue has been discovered in version 0.3.0, but the relevant code in the current master branch is not changed.
Attachments
Issue Links
- is blocked by
-
NIFI-12059 Refactor Registry Database Integration Strategy
- Open
- links to