[ 
https://issues.apache.org/jira/browse/NIFI-1841?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15270859#comment-15270859
 ] 

Bryan Bende commented on NIFI-1841:
-----------------------------------

In JdbcCommon we have this code:

{code}
else if (javaSqlType == BINARY || javaSqlType == VARBINARY || javaSqlType == 
LONGVARBINARY || javaSqlType == ARRAY || javaSqlType == BLOB || javaSqlType == 
CLOB) {
       // bytes requires little bit different handling
       byte[] bytes = rs.getBytes(i);
       ByteBuffer bb = ByteBuffer.wrap(bytes);
       rec.put(i - 1, bb);
} 
{code}

I think we have to consider breaking out some of these cases, at least blob and 
clob, so that they use rs.getBlob() and rs.getClob().

> SQLFeatureNotSupportedException with ExecuteSQL and Oracle Driver
> -----------------------------------------------------------------
>
>                 Key: NIFI-1841
>                 URL: https://issues.apache.org/jira/browse/NIFI-1841
>             Project: Apache NiFi
>          Issue Type: Bug
>            Reporter: Bryan Bende
>            Priority: Minor
>
> Using ExecuteSQL with the Oracle ojdbc7.jar, the following exception is 
> produced:
> {code}
> java.sql.SQLFeatureNotSupportedException: Unsupported feature 
> at oracle.jdbc.driver.ClobAccessor.getBytes(ClobAccessor.java:534) ~[na:na] 
> at 
> oracle.jdbc.driver.GeneratedStatement.getBytes(GeneratedStatement.java:151) 
> ~[na:na] 
> at 
> oracle.jdbc.driver.GeneratedScrollableResultSet.getBytes(GeneratedScrollableResultSet.java:326)
>  ~[na:na] 
> at 
> org.apache.commons.dbcp.DelegatingResultSet.getBytes(DelegatingResultSet.java:241)
>  ~[na:na] 
> at 
> org.apache.commons.dbcp.DelegatingResultSet.getBytes(DelegatingResultSet.java:241)
>  ~[na:na] 
> at 
> org.apache.nifi.processors.standard.util.JdbcCommon.convertToAvroStream(JdbcCommon.java:105)
>  ~[nifi-standard-processors-0.6.1.jar:0.6.1] 
> at 
> org.apache.nifi.processors.standard.util.JdbcCommon.convertToAvroStream(JdbcCommon.java:72)
>  ~[nifi-standard-processors-0.6.1.jar:0.6.1] 
> at 
> org.apache.nifi.processors.standard.ExecuteSQL$1.process(ExecuteSQL.java:158) 
> ~[nifi-standard-processors-0.6.1.jar:0.6.1] 
> {code}
> The issue appears to be related to calling ResultSet getBytes().



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to