nifi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oleg Zhurakousky (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (NIFI-1049) ExecuteSQL generates NPE on any null valued column
Date Tue, 17 Nov 2015 16:14:11 GMT

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

Oleg Zhurakousky commented on NIFI-1049:
----------------------------------------

LGTM

> ExecuteSQL generates NPE on any null valued column
> --------------------------------------------------
>
>                 Key: NIFI-1049
>                 URL: https://issues.apache.org/jira/browse/NIFI-1049
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Extensions
>    Affects Versions: 0.3.0
>            Reporter: Randy Gelhausen
>            Assignee: Mark Payne
>         Attachments: 0001-NIFI-1049-Added-unit-test-to-verify-that-reported-bu.patch
>
>
> I have a table defined as:
> create table test (id integer not null, val1 integer, val2 integer, constraint my_pk
primary key (id));
> I have two rows in the table:
> 0, null, 1
> 1, 1, 1
> When ExecuteSQL runs 'select * from test' I get an NPE:
> 2015-10-20 22:37:19,887 ERROR [Timer-Driven Process Thread-5] o.a.nifi.processors.standard.ExecuteSQL
ExecuteSQL[id=540ec717-f092-4c45-b9f5-1f60a15c15be] ExecuteSQL[id=540ec717-f092-4c45-b9f5-1f60a15c15be]
failed to process session due to org.apache.avro.file.DataFileWriter$AppendWriteException:
java.lang.NullPointerException: null of int in field VAL1 of any.data.TEST: org.apache.avro.file.DataFileWriter$AppendWriteException:
java.lang.NullPointerException: null of int in field VAL1 of any.data.TEST
> 2015-10-20 22:37:19,887 WARN [Timer-Driven Process Thread-5] o.a.nifi.processors.standard.ExecuteSQL
ExecuteSQL[id=540ec717-f092-4c45-b9f5-1f60a15c15be] Processor Administratively Yielded for
1 sec due to processing failure
> 2015-10-20 22:37:19,888 WARN [Timer-Driven Process Thread-5] o.a.n.c.t.ContinuallyRunProcessorTask
Administratively Yielding ExecuteSQL[id=540ec717-f092-4c45-b9f5-1f60a15c15be] due to uncaught
Exception: org.apache.avro.file.DataFileWriter$AppendWriteException: java.lang.NullPointerException:
null of int in field VAL1 of any.data.TEST
> 2015-10-20 22:37:19,889 WARN [Timer-Driven Process Thread-5] o.a.n.c.t.ContinuallyRunProcessorTask

> org.apache.avro.file.DataFileWriter$AppendWriteException: java.lang.NullPointerException:
null of int in field VAL1 of any.data.TEST
> 	at org.apache.avro.file.DataFileWriter.append(DataFileWriter.java:296) ~[na:na]
> 	at org.apache.nifi.processors.standard.util.JdbcCommon.convertToAvroStream(JdbcCommon.java:87)
~[na:na]
> 	at org.apache.nifi.processors.standard.ExecuteSQL$1.process(ExecuteSQL.java:149) ~[na:na]
> 	at org.apache.nifi.controller.repository.StandardProcessSession.write(StandardProcessSession.java:1937)
~[nifi-framework-core-0.3.1-SNAPSHOT.jar:0.3.1-SNAPSHOT]
> 	at org.apache.nifi.processors.standard.ExecuteSQL.onTrigger(ExecuteSQL.java:143) ~[na:na]
> 	at org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)
~[nifi-api-0.3.1-SNAPSHOT.jar:0.3.1-SNAPSHOT]
> 	at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1077)
~[nifi-framework-core-0.3.1-SNAPSHOT.jar:0.3.1-SNAPSHOT]
> 	at org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:127)
[nifi-framework-core-0.3.1-SNAPSHOT.jar:0.3.1-SNAPSHOT]
> 	at org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:49)
[nifi-framework-core-0.3.1-SNAPSHOT.jar:0.3.1-SNAPSHOT]
> 	at org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:119)
[nifi-framework-core-0.3.1-SNAPSHOT.jar:0.3.1-SNAPSHOT]
> 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [na:1.7.0_79]
> 	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304) [na:1.7.0_79]
> 	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
[na:1.7.0_79]
> 	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
[na:1.7.0_79]
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_79]
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_79]
> 	at java.lang.Thread.run(Thread.java:745) [na:1.7.0_79]
> Caused by: java.lang.NullPointerException: null of int in field VAL1 of any.data.TEST
> 	at org.apache.avro.generic.GenericDatumWriter.npe(GenericDatumWriter.java:93) ~[na:na]
> 	at org.apache.avro.generic.GenericDatumWriter.write(GenericDatumWriter.java:87) ~[na:na]
> 	at org.apache.avro.generic.GenericDatumWriter.write(GenericDatumWriter.java:58) ~[na:na]
> 	at org.apache.avro.file.DataFileWriter.append(DataFileWriter.java:290) ~[na:na]
> 	... 16 common frames omitted
> Caused by: java.lang.NullPointerException: null
> 	at org.apache.avro.generic.GenericDatumWriter.write(GenericDatumWriter.java:78) ~[na:na]
> 	at org.apache.avro.generic.GenericDatumWriter.writeField(GenericDatumWriter.java:114)
~[na:na]
> 	at org.apache.avro.generic.GenericDatumWriter.writeRecord(GenericDatumWriter.java:104)
~[na:na]
> 	at org.apache.avro.generic.GenericDatumWriter.write(GenericDatumWriter.java:66) ~[na:na]
> 	... 18 common frames omitted



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

Mime
View raw message