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

Bryan Bende commented on NIFI-3673:
-----------------------------------

[~combine] Thanks for trying out the patch. Can you confirm that you applied 
the patch to master, ran a full build of master, and then started the 
application from that full build?

The reason I am asking is because the fix for this specific problem was 
actually in the framework NAR, so I wanted to make sure that you didn't just 
take the patched Hadoop NARs and run them in a previous install of NiFi because 
that wouldn't fix the problem.

The code in master that causes this problem is here:
https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/FlowController.java#L1164-L1165

On line 1165 it should be using the ClassLoader from line 1164 to get the class 
for the processor, but instead it is using the ClassLoader from the bundle (the 
NAR ClassLoader). 

> Loads the different class in classloader when Bumping NAR plugin
> ----------------------------------------------------------------
>
>                 Key: NIFI-3673
>                 URL: https://issues.apache.org/jira/browse/NIFI-3673
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Core Framework
>            Reporter: Byunghwa Yun
>            Assignee: Bryan Bende
>             Fix For: 1.2.0
>
>
> When I use master branch, Hadoop processor throws the exception related 
> ClassLoader.
> 2017-04-05 17:58:47,391 ERROR [StandardProcessScheduler Thread-1] 
> o.a.n.controller.StandardProcessorNode Failed to invoke @OnScheduled method 
> due to java.lang.RuntimeException: Failed while executing one of processor's 
> OnScheduled task.
> java.lang.RuntimeException: Failed while executing one of processor's 
> OnScheduled task.
>         at 
> org.apache.nifi.controller.StandardProcessorNode.invokeTaskAsCancelableFuture(StandardProcessorNode.java:1466)
>  ~[na:na]
>         at 
> org.apache.nifi.controller.StandardProcessorNode.access$000(StandardProcessorNode.java:98)
>  ~[na:na]
>         at 
> org.apache.nifi.controller.StandardProcessorNode$1.run(StandardProcessorNode.java:1287)
>  ~[na:na]
>         at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 
> [na:1.8.0_101]
>         at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
> [na:1.8.0_101]
>         at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
>  [na:1.8.0_101]
>         at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
>  [na:1.8.0_101]
>         at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>  [na:1.8.0_101]
>         at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>  [na:1.8.0_101]
>         at java.lang.Thread.run(Thread.java:745) [na:1.8.0_101]
> Caused by: java.util.concurrent.ExecutionException: 
> java.lang.reflect.InvocationTargetException
>         at java.util.concurrent.FutureTask.report(FutureTask.java:122) 
> [na:1.8.0_101]
>         at java.util.concurrent.FutureTask.get(FutureTask.java:206) 
> [na:1.8.0_101]
>         at 
> org.apache.nifi.controller.StandardProcessorNode.invokeTaskAsCancelableFuture(StandardProcessorNode.java:1449)
>  ~[na:na]
>         ... 9 common frames omitted
> Caused by: java.lang.reflect.InvocationTargetException: null
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
> ~[na:1.8.0_101]
>         at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
> ~[na:1.8.0_101]
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>  ~[na:1.8.0_101]
>         at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_101]
>         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.util.ReflectionUtils.invokeMethodsWithAnnotation(ReflectionUtils.java:47)
>  ~[na:na]
>         at 
> org.apache.nifi.controller.StandardProcessorNode$1$1.call(StandardProcessorNode.java:1291)
>  ~[na:na]
>         at 
> org.apache.nifi.controller.StandardProcessorNode$1$1.call(StandardProcessorNode.java:1287)
>  ~[na:na]
>         ... 6 common frames omitted
> Caused by: java.lang.RuntimeException: java.lang.RuntimeException: class 
> org.apache.hadoop.security.JniBasedUnixGroupsMappingWithFallback not 
> org.apache.hadoop.security.GroupMappingServiceProvider
>         at 
> org.apache.hadoop.conf.Configuration.getClass(Configuration.java:2231) 
> ~[na:na]
>         at org.apache.hadoop.security.Groups.<init>(Groups.java:78) ~[na:na]
>         at org.apache.hadoop.security.Groups.<init>(Groups.java:74) ~[na:na]
>         at 
> org.apache.hadoop.security.Groups.getUserToGroupsMappingService(Groups.java:303)
>  ~[na:na]
>         at 
> org.apache.hadoop.security.UserGroupInformation.initialize(UserGroupInformation.java:283)
>  ~[na:na]
>         at 
> org.apache.hadoop.security.UserGroupInformation.setConfiguration(UserGroupInformation.java:311)
>  ~[na:na]
>         at 
> org.apache.nifi.hadoop.SecurityUtil.loginSimple(SecurityUtil.java:70) ~[na:na]
>         at 
> org.apache.nifi.processors.hadoop.AbstractHadoopProcessor.resetHDFSResources(AbstractHadoopProcessor.java:300)
>  ~[na:na]
>         at 
> org.apache.nifi.processors.hadoop.AbstractHadoopProcessor.abstractOnScheduled(AbstractHadoopProcessor.java:228)
>  ~[na:na]
>         at 
> org.apache.nifi.processors.hadoop.GetHDFS.onScheduled(GetHDFS.java:236) 
> ~[na:na]
>         ... 16 common frames omitted
> Caused by: java.lang.RuntimeException: class 
> org.apache.hadoop.security.JniBasedUnixGroupsMappingWithFallback not 
> org.apache.hadoop.security.GroupMappingServiceProvider
>         at 
> org.apache.hadoop.conf.Configuration.getClass(Configuration.java:2225) 
> ~[na:na]
>         ... 25 common frames omitted



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to