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

ASF subversion and git services commented on NIFI-4974:
-------------------------------------------------------

Commit 29ebec071edc0a7384f84098e7128f7e1179aa6c in nifi's branch 
refs/heads/main from Matt Burgess
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=29ebec0 ]

NIFI-4974: Add try/catch around blob.free() to support JDBC spec

Signed-off-by: Pierre Villard <[email protected]>

This closes #4861.


> Uncaught AbstractMethodError when converting SQL results to Avro with JTDS 
> driver
> ---------------------------------------------------------------------------------
>
>                 Key: NIFI-4974
>                 URL: https://issues.apache.org/jira/browse/NIFI-4974
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Core Framework
>         Environment: Windows Server 2018, MS SQL Server
>            Reporter: Colin Dean
>            Assignee: Matt Burgess
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> I'm using the [jtds|https://jtds.sourceforge.net] driver to retrieve data 
> from a Microsoft SQL Server installation. This is the first time I've come 
> upon this kind of error while using JTDS so I'm not sure if it's a defect in 
> JTDS or in NiFi.
> {code:java}
> java.lang.AbstractMethodError: null
>     at net.sourceforge.jtds.jdbc.ClobImpl.free(ClobImpl.java:219)
>     at 
> org.apache.nifi.processors.standard.util.JdbcCommon.convertToAvroStream(JdbcCommon.java:288)
>     at 
> org.apache.nifi.processors.standard.ExecuteSQL$2.process(ExecuteSQL.java:230)
>     at 
> org.apache.nifi.controller.repository.StandardProcessSession.write(StandardProcessSession.java:2571)
>     at 
> org.apache.nifi.processors.standard.ExecuteSQL.onTrigger(ExecuteSQL.java:218)
>     at 
> org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)
>     at 
> org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1122)
>     at 
> org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:147)
>     at 
> org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:47)
>     at 
> org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:128)
>     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:1142)
>     at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>     at java.lang.Thread.run(Thread.java:745)
> {code}
> Looking at the JTDS source code, provided that the Github repo I'm looking at 
> it up to date with the SF repo, it appears that [this call to 
> {{free()}}|https://github.com/milesibastos/jTDS/blob/master/src/main/net/sourceforge/jtds/jdbc/ClobImpl.java#L219]
>  is intended to generate an error from JTDS:
> {code}
> /////// JDBC4 demarcation, do NOT put any JDBC3 code below this line ///////
>     public void free() throws SQLException {
>         // TODO Auto-generated method stub
>         throw new AbstractMethodError();
>     }
> {code}
> We're going to try to use the official MS SQL JDBC driver as a workaround. I 
> minimally want to document this in case someone else encounters this problem 
> or there's a way to workaround it within NiFi.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to