You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Michal Šunka (Jira)" <ji...@apache.org> on 2020/11/16 16:12:00 UTC

[jira] [Comment Edited] (NIFI-8014) ExecuteSQLRecord chrashes if no resultset

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

Michal Šunka edited comment on NIFI-8014 at 11/16/20, 4:11 PM:
---------------------------------------------------------------

That wasn´t point of that remark. This "look into logs" assumes that I have access to them which must not be true. But luckily I have it. Here it is:

2020-11-16 15:48:19,458 ERROR [Timer-Driven Process Thread-2] o.a.n.p.standard.ExecuteSQLRecord ExecuteSQLRecord[id=14833ad6-53f7-1943-ffff-ffffa03c7263] Unable to execute SQL select query DECLARE @a int2020-11-16 15:48:19,458 ERROR [Timer-Driven Process Thread-2] o.a.n.p.standard.ExecuteSQLRecord ExecuteSQLRecord[id=14833ad6-53f7-1943-ffff-ffffa03c7263] Unable to execute SQL select query DECLARE @a int
 SET @a = 1 due to org.apache.nifi.processor.exception.ProcessException: IOException thrown from ExecuteSQLRecord[id=14833ad6-53f7-1943-ffff-ffffa03c7263]: java.io.IOException: java.lang.NullPointerException. No FlowFile to route to failure: org.apache.nifi.processor.exception.ProcessException: IOException thrown from ExecuteSQLRecord[id=14833ad6-53f7-1943-ffff-ffffa03c7263]: java.io.IOException: java.lang.NullPointerExceptionorg.apache.nifi.processor.exception.ProcessException: IOException thrown from ExecuteSQLRecord[id=14833ad6-53f7-1943-ffff-ffffa03c7263]: java.io.IOException: java.lang.NullPointerException at org.apache.nifi.controller.repository.StandardProcessSession.write(StandardProcessSession.java:2770) at org.apache.nifi.processors.standard.AbstractExecuteSQL.onTrigger(AbstractExecuteSQL.java:420) at org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27) at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1174) at org.apache.nifi.controller.tasks.ConnectableTask.invoke(ConnectableTask.java:213) at org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:117) 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: java.io.IOException: java.lang.NullPointerException at org.apache.nifi.processors.standard.sql.RecordSqlWriter.writeEmptyResultSet(RecordSqlWriter.java:124) at org.apache.nifi.processors.standard.AbstractExecuteSQL.lambda$onTrigger$4(AbstractExecuteSQL.java:420) at org.apache.nifi.controller.repository.StandardProcessSession.write(StandardProcessSession.java:2751) ... 13 common frames omittedCaused by: java.lang.NullPointerException: null at org.apache.nifi.csv.WriteCSVResult.<init>(WriteCSVResult.java:68) at org.apache.nifi.csv.CSVRecordSetWriter.createWriter(CSVRecordSetWriter.java:96) at sun.reflect.GeneratedMethodAccessor1766.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.nifi.controller.service.StandardControllerServiceInvocationHandler.invoke(StandardControllerServiceInvocationHandler.java:254) at org.apache.nifi.controller.service.StandardControllerServiceInvocationHandler.invoke(StandardControllerServiceInvocationHandler.java:105) at com.sun.proxy.$Proxy195.createWriter(Unknown Source) at org.apache.nifi.processors.standard.sql.RecordSqlWriter.writeEmptyResultSet(RecordSqlWriter.java:119) ... 15 common frames omitted

 

I apologize if I seem somewhat rude, but this is getting on my nerves a bit. 


was (Author: raocz):
That wasn´t point of that remark. This "look into logs" assumes that I have access to them which must not be true. But luckily I have it. Here it is:



2020-11-16 15:48:19,458 ERROR [Timer-Driven Process Thread-2] o.a.n.p.standard.ExecuteSQLRecord ExecuteSQLRecord[id=14833ad6-53f7-1943-ffff-ffffa03c7263] Unable to execute SQL select query DECLARE @a int2020-11-16 15:48:19,458 ERROR [Timer-Driven Process Thread-2] o.a.n.p.standard.ExecuteSQLRecord ExecuteSQLRecord[id=14833ad6-53f7-1943-ffff-ffffa03c7263] Unable to execute SQL select query DECLARE @a int
SET @a = 1 due to org.apache.nifi.processor.exception.ProcessException: IOException thrown from ExecuteSQLRecord[id=14833ad6-53f7-1943-ffff-ffffa03c7263]: java.io.IOException: java.lang.NullPointerException. No FlowFile to route to failure: org.apache.nifi.processor.exception.ProcessException: IOException thrown from ExecuteSQLRecord[id=14833ad6-53f7-1943-ffff-ffffa03c7263]: java.io.IOException: java.lang.NullPointerExceptionorg.apache.nifi.processor.exception.ProcessException: IOException thrown from ExecuteSQLRecord[id=14833ad6-53f7-1943-ffff-ffffa03c7263]: java.io.IOException: java.lang.NullPointerException at org.apache.nifi.controller.repository.StandardProcessSession.write(StandardProcessSession.java:2770) at org.apache.nifi.processors.standard.AbstractExecuteSQL.onTrigger(AbstractExecuteSQL.java:420) at org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27) at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1174) at org.apache.nifi.controller.tasks.ConnectableTask.invoke(ConnectableTask.java:213) at org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:117) 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: java.io.IOException: java.lang.NullPointerException at org.apache.nifi.processors.standard.sql.RecordSqlWriter.writeEmptyResultSet(RecordSqlWriter.java:124) at org.apache.nifi.processors.standard.AbstractExecuteSQL.lambda$onTrigger$4(AbstractExecuteSQL.java:420) at org.apache.nifi.controller.repository.StandardProcessSession.write(StandardProcessSession.java:2751) ... 13 common frames omittedCaused by: java.lang.NullPointerException: null at org.apache.nifi.csv.WriteCSVResult.<init>(WriteCSVResult.java:68) at org.apache.nifi.csv.CSVRecordSetWriter.createWriter(CSVRecordSetWriter.java:96) at sun.reflect.GeneratedMethodAccessor1766.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.nifi.controller.service.StandardControllerServiceInvocationHandler.invoke(StandardControllerServiceInvocationHandler.java:254) at org.apache.nifi.controller.service.StandardControllerServiceInvocationHandler.invoke(StandardControllerServiceInvocationHandler.java:105) at com.sun.proxy.$Proxy195.createWriter(Unknown Source) at org.apache.nifi.processors.standard.sql.RecordSqlWriter.writeEmptyResultSet(RecordSqlWriter.java:119) ... 15 common frames omitted

 

I apologize i seem somewhat rude, but this is getting on my nerves a bit. 

> ExecuteSQLRecord chrashes if no resultset
> -----------------------------------------
>
>                 Key: NIFI-8014
>                 URL: https://issues.apache.org/jira/browse/NIFI-8014
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Core Framework
>    Affects Versions: 1.12.1
>            Reporter: Michal Šunka
>            Priority: Major
>
> If in ExecuteSQLRecord I has code which does not return a resultset e.g.
>  
> {code:java}
> DECLARE @a int
> SET @a = 1
> {code}
> It fails with NullPointerException.
>  
> I cannot give You exact error string since it is not selectable (handy, isn´t it?)...
> And picture-upload as attachment fails with "Jira could not attach the file as there was a missing token. Please try attaching the file again." Repeated attempts, drag'n'drop nor browse does not work... !NiFi_NullPointerException.jpg!



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