[
https://issues.apache.org/jira/browse/NIFI-895?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Bryan Bende updated NIFI-895:
-----------------------------
Attachment: NIFI-895.patch
It appears that in the onTrigger method, if the runnerRef is not null it calls
stopped() which ends up clearing the sessionFactoryRef which results in the NPE
later on.
This patch just sets the sessionFactory again after the call to stopped() to
ensure it is populated correctly.
> ExecuteFlumeSource producing a NullPointerException
> ---------------------------------------------------
>
> Key: NIFI-895
> URL: https://issues.apache.org/jira/browse/NIFI-895
> Project: Apache NiFi
> Issue Type: Bug
> Reporter: Bryan Bende
> Assignee: Bryan Bende
> Priority: Minor
> Fix For: 0.4.0
>
> Attachments: NIFI-895.patch
>
>
> When using ExecuteFlumeSource to wrap SyslogUDPSource, the following
> exception was repeatedly encountered after a few successful runs:
> {code}
> java.lang.NullPointerException: null
> at
> org.apache.nifi.processors.flume.NifiSessionFactoryChannel.createTransaction(NifiSessionFactoryChannel.java:43)
> ~[na:na]
> at
> org.apache.flume.channel.BasicChannelSemantics.getTransaction(BasicChannelSemantics.java:122)
> ~[na:na]
> at
> org.apache.flume.channel.ChannelProcessor.processEvent(ChannelProcessor.java:260)
> ~[na:na]
> at
> org.apache.flume.source.SyslogUDPSource$syslogHandler.messageReceived(SyslogUDPSource.java:82)
> ~[na:na]
> at
> org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268)
> ~[na:na]
> at
> org.jboss.netty.channel.socket.oio.OioDatagramWorker.process(OioDatagramWorker.java:52)
> ~[na:na]
> at
> org.jboss.netty.channel.socket.oio.AbstractOioWorker.run(AbstractOioWorker.java:73)
> ~[na:na]
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> [na:1.8.0_45]
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> [na:1.8.0_45]
> at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45]
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)