Matt Burgess created NIFI-11691:
-----------------------------------

             Summary: PutDatabaseRecord does not supportVarBinary or 
LongVarBinary data types
                 Key: NIFI-11691
                 URL: https://issues.apache.org/jira/browse/NIFI-11691
             Project: Apache NiFi
          Issue Type: Bug
          Components: Extensions
            Reporter: Matt Burgess
             Fix For: 1.latest, 2.latest


When using PutDatabaseRecord with a target column of type VARBINARY or 
LONGVARBINARY, a database-specific error is issued, such as:

java.io.IOException: Unable to setObject() with value 
[Ljava.lang.Object;@787177ba at index 5 of type -3
        at 
org.apache.nifi.processors.standard.PutDatabaseRecord.setParameter(PutDatabaseRecord.java:887)
        at 
org.apache.nifi.processors.standard.PutDatabaseRecord.executeDML(PutDatabaseRecord.java:798)
        at 
org.apache.nifi.processors.standard.PutDatabaseRecord.putToDatabase(PutDatabaseRecord.java:969)
        at 
org.apache.nifi.processors.standard.PutDatabaseRecord.onTrigger(PutDatabaseRecord.java:492)
        at 
org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)
        at 
org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1360)
        at 
org.apache.nifi.controller.tasks.ConnectableTask.invoke(ConnectableTask.java:246)
        at 
org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:102)
        at org.apache.nifi.engine.FlowEngine$2.run(FlowEngine.java:110)
        at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
        at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
        at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The conversion from 
UNKNOWN to VARBINARY is unsupported.
        at 
com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:237)


As VARBINARY and LONGVARBINARY are supported java.sql.Types 
(https://docs.oracle.com/javase/8/docs/api/constant-values.html#java.sql.Types.ARRAY),
 they should be supported in PutDatabaseRecord



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to