You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Colin Dean (JIRA)" <ji...@apache.org> on 2018/03/14 17:39:00 UTC

[jira] [Updated] (NIFI-4974) Uncaught AbstractMethodError when converting SQL results to Avro with JTDS driver

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

Colin Dean updated NIFI-4974:
-----------------------------
    Description: 
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.



  was:
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.




> 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
>    Affects Versions: 1.5.0
>         Environment: Windows Server 2018, MS SQL Server
>            Reporter: Colin Dean
>            Priority: Major
>
> 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
(v7.6.3#76005)