You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Jeff Storck (JIRA)" <ji...@apache.org> on 2017/01/17 18:12:26 UTC

[jira] [Resolved] (NIFI-3330) HandleHttpRequest intermittently throwing NullPointerException

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

Jeff Storck resolved NIFI-3330.
-------------------------------
    Resolution: Fixed

> HandleHttpRequest intermittently throwing NullPointerException
> --------------------------------------------------------------
>
>                 Key: NIFI-3330
>                 URL: https://issues.apache.org/jira/browse/NIFI-3330
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Extensions
>    Affects Versions: 1.1.0
>            Reporter: Jeff Storck
>            Assignee: Jeff Storck
>            Priority: Minor
>             Fix For: 1.2.0
>
>
> HandleHttpRequest intermittently throws a NullPointerException, specifically seen while starting up a node that is part of a cluster in which the processors are in a started state.  The exception is occurring on a line which appears to have a null check before it, but it's a null check on the result of a method, not a variable.
> {code}2017-01-11 14:34:13,708 ERROR [Timer-Driven Process Thread-220] o.a.n.p.standard.HandleHttpRequest HandleHttpRequest[id=e00f0d3b-0158-1000-1e3f-81d710d3d7c9] HandleHttpRequest[id=e00f0d3b-0158-1000-1e3f-81d710d3d7c9] failed to process due to j
> ava.lang.NullPointerException; rolling back session: java.lang.NullPointerException
> 2017-01-11 14:34:13,996 ERROR [Timer-Driven Process Thread-220] o.a.n.p.standard.HandleHttpRequest
> java.lang.NullPointerException: null
>         at org.apache.nifi.processors.standard.HandleHttpRequest.onTrigger(HandleHttpRequest.java:527) ~[nifi-standard-processors-1.1.0.jar:1.1.0]
>         at org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27) ~[nifi-api-1.1.0.jar:1.1.0]
>         at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1099) [nifi-framework-core-1.1.0.jar:1.1.0]
>         at org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:136) [nifi-framework-core-1.1.0.jar:1.1.0]
>         at org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:47) [nifi-framework-core-1.1.0.jar:1.1.0]
>         at org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:132) [nifi-framework-core-1.1.0.jar:1.1.0]
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_111]
>         at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [na:1.8.0_111]
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [na:1.8.0_111]
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [na:1.8.0_111]
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_111]
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_111]
>         at java.lang.Thread.run(Thread.java:745) [na:1.8.0_111]{code}
> The following section (and other sections similar to it) in the onTrigger method:
> {code}            if (request.getDispatcherType() != null) {
>                 putAttribute(attributes, "http.dispatcher.type", request.getDispatcherType().name());
>             }{code}
> should be updated to save the result of the method and then check for null before operating on that value.
> For example:
> {code}String dispatcherType = request.getDispatcherType();
> if (dispatcherType != null) {
>         putAttribute(attributes, "http.dispatcher.type", dispatcherType.name());
> }{code}



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