You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Sergei Zhirikov (JIRA)" <ji...@apache.org> on 2019/03/12 11:31:00 UTC
[jira] [Created] (NIFIREG-235) Using MS SQL Server for the metadata
database does not work.
Sergei Zhirikov created NIFIREG-235:
---------------------------------------
Summary: Using MS SQL Server for the metadata database does not work.
Key: NIFIREG-235
URL: https://issues.apache.org/jira/browse/NIFIREG-235
Project: NiFi Registry
Issue Type: Bug
Affects Versions: 0.3.0
Reporter: Sergei Zhirikov
When NiFi registry is configured to store metadata in a MS SQL Server database, attempts to start it fail with the following exception:
{noformat}
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]{noformat}
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.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)