[ 
https://issues.apache.org/jira/browse/NIFI-8831?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Pierre Villard resolved NIFI-8831.
----------------------------------
    Resolution: Feedback Received

Apache NiFi 1.x is no longer maintained and no new release is planned on the 
1.x release line. Marking as resolved as part of a cleanup operation. Please 
open a new one with an updated description if this is still relevant for NiFi 
2.x.

> Using MS SQL Server for the metadata database does not work.
> ------------------------------------------------------------
>
>                 Key: NIFI-8831
>                 URL: https://issues.apache.org/jira/browse/NIFI-8831
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: NiFi Registry
>    Affects Versions: 1.21.0
>            Reporter: Sergei Zhirikov
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> 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
(v8.20.10#820010)

Reply via email to