mirror of https://github.com/apache/nifi.git
NIFI-4279 PutDatabaseRecord and ConvertJSONToSQL stream has already been closed error on Oracle
Signed-off-by: Matthew Burgess <mattyb149@apache.org> This closes #2874
This commit is contained in:
parent
bef91008bb
commit
e13602f752
|
@ -907,14 +907,15 @@ public class ConvertJSONToSQL extends AbstractProcessor {
|
|||
for (int i = 1; i < md.getColumnCount() + 1; i++) {
|
||||
columns.add(md.getColumnName(i));
|
||||
}
|
||||
|
||||
// COLUMN_DEF must be read first to work around Oracle bug
|
||||
final String defaultValue = resultSet.getString("COLUMN_DEF");
|
||||
final String columnName = resultSet.getString("COLUMN_NAME");
|
||||
final int dataType = resultSet.getInt("DATA_TYPE");
|
||||
final int colSize = resultSet.getInt("COLUMN_SIZE");
|
||||
|
||||
final String nullableValue = resultSet.getString("IS_NULLABLE");
|
||||
final boolean isNullable = "YES".equalsIgnoreCase(nullableValue) || nullableValue.isEmpty();
|
||||
final String defaultValue = resultSet.getString("COLUMN_DEF");
|
||||
|
||||
String autoIncrementValue = "NO";
|
||||
|
||||
if(columns.contains("IS_AUTOINCREMENT")){
|
||||
|
|
|
@ -1080,14 +1080,14 @@ public class PutDatabaseRecord extends AbstractSessionFactoryProcessor {
|
|||
for (int i = 1; i < md.getColumnCount() + 1; i++) {
|
||||
columns.add(md.getColumnName(i));
|
||||
}
|
||||
|
||||
// COLUMN_DEF must be read first to work around Oracle bug
|
||||
final String defaultValue = resultSet.getString("COLUMN_DEF");
|
||||
final String columnName = resultSet.getString("COLUMN_NAME");
|
||||
final int dataType = resultSet.getInt("DATA_TYPE");
|
||||
final int colSize = resultSet.getInt("COLUMN_SIZE");
|
||||
|
||||
final String nullableValue = resultSet.getString("IS_NULLABLE");
|
||||
final boolean isNullable = "YES".equalsIgnoreCase(nullableValue) || nullableValue.isEmpty();
|
||||
final String defaultValue = resultSet.getString("COLUMN_DEF");
|
||||
String autoIncrementValue = "NO";
|
||||
|
||||
if (columns.contains("IS_AUTOINCREMENT")) {
|
||||
|
|
Loading…
Reference in New Issue