[
https://issues.apache.org/jira/browse/NIFI-1898?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15291146#comment-15291146
]
ASF GitHub Bot commented on NIFI-1898:
--------------------------------------
GitHub user olegz opened a pull request:
https://github.com/apache/nifi/pull/455
NIFI-1898 fixed @OnSchedule methods to accept ProcessContext
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/olegz/nifi NIFI-1898
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/nifi/pull/455.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #455
----
commit fda6d338dfe1c18b537d30fcd406676293b1a3cc
Author: Oleg Zhurakousky <[email protected]>
Date: 2016-05-19T14:10:21Z
NIFI-1898 fixed @OnSchedule methods to accept ProcessContext
----
> Flume Processors can not be started
> -----------------------------------
>
> Key: NIFI-1898
> URL: https://issues.apache.org/jira/browse/NIFI-1898
> Project: Apache NiFi
> Issue Type: Bug
> Affects Versions: 0.6.1
> Reporter: Bryan Bende
> Assignee: Oleg Zhurakousky
> Fix For: 1.0.0, 0.7.0
>
>
> When trying to use ExecuteFlumeSource, the following error was encountered:
> {code}
> 2016-05-18 14:06:14,338 ERROR [StandardProcessScheduler Thread-5]
> org.apache.nifi.util.ReflectionUtils Can not invoke method 'public void
> org.apache.nifi.processors.flume.ExecuteFlumeSource.onScheduled(org.apache.nifi.processor.SchedulingContext)'
> with provided arguments since argument 0 of type 'interface
> org.apache.nifi.processor.SchedulingContext' is not assignable from provided
> value of type 'class org.apache.nifi.processor.StandardProcessContext'.
> 2016-05-18 14:06:14,338 ERROR [StandardProcessScheduler Thread-2]
> o.a.n.p.flume.ExecuteFlumeSource
> ExecuteFlumeSource[id=df4a6e2d-be59-448a-857b-5e88df88052e]
> ExecuteFlumeSource[id=df4a6e2d-be59-448a-857b-5e88df88052e] failed to invoke
> @OnScheduled method due to java.lang.RuntimeException: Failed while executing
> one of processor's OnScheduled task.; processor will not be scheduled to run
> for 30000 milliseconds: java.lang.RuntimeException: Failed while executing
> one of processor's OnScheduled task.
> 2016-05-18 14:06:14,340 ERROR [StandardProcessScheduler Thread-5]
> org.apache.nifi.engine.FlowEngine A flow controller task execution stopped
> abnormally
> java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException:
> argument type mismatch
> at java.util.concurrent.FutureTask.report(FutureTask.java:122)
> ~[na:1.8.0_74]
> at java.util.concurrent.FutureTask.get(FutureTask.java:192)
> ~[na:1.8.0_74]
> at org.apache.nifi.engine.FlowEngine.afterExecute(FlowEngine.java:100)
> ~[na:na]
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1150)
> [na:1.8.0_74]
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> [na:1.8.0_74]
> at java.lang.Thread.run(Thread.java:745) [na:1.8.0_74]
> Caused by: java.lang.IllegalArgumentException: argument type mismatch
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> ~[na:1.8.0_74]
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> ~[na:1.8.0_74]
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> ~[na:1.8.0_74]
> at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_74]
> at
> org.apache.nifi.util.ReflectionUtils.invokeMethodsWithAnnotations(ReflectionUtils.java:137)
> ~[na:na]
> at
> org.apache.nifi.util.ReflectionUtils.invokeMethodsWithAnnotations(ReflectionUtils.java:125)
> ~[na:na]
> at
> org.apache.nifi.util.ReflectionUtils.invokeMethodsWithAnnotations(ReflectionUtils.java:70)
> ~[na:na]
> at
> org.apache.nifi.controller.StandardProcessorNode$1$1.call(StandardProcessorNode.java:1247)
> ~[na:na]
> at
> org.apache.nifi.controller.StandardProcessorNode$1$1.call(StandardProcessorNode.java:1243)
> ~[na:na]
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> ~[na:1.8.0_74]
> at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
> ~[na:1.8.0_74]
> at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
> ~[na:1.8.0_74]
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> [na:1.8.0_74]
> ... 2 common frames omitted
> {code}
> It looks like at some point we switched from using SchedulingContext to
> ProcessContext for methods annotated with @OnScheduled but somehow these
> processors were never updated.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)