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

ASF subversion and git services commented on NIFI-7404:
-------------------------------------------------------

Commit aa986e0bfb6b787fd16de82e4708def42ea0f6af in nifi's branch 
refs/heads/master from Matt Burgess
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=aa986e0 ]

NIFI-7404: Fixed invalid script processors upon thread termination

Signed-off-by: Pierre Villard <[email protected]>

This closes #4238.


> Scripted processors become invalid when thread terminated
> ---------------------------------------------------------
>
>                 Key: NIFI-7404
>                 URL: https://issues.apache.org/jira/browse/NIFI-7404
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Extensions
>            Reporter: Matt Burgess
>            Assignee: Matt Burgess
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> As reported on the NiFi users mailing list, when a processor thread is 
> terminated for ExecuteScript or InvokeScriptedProcessor, the processor 
> becomes invalid with the message "‘Script engine’ validated against ‘<script 
> engine name>’ is invalid because Given value not found in allowed set ‘ECMA 
> Script’".
> This is caused by the scriptingComponentHelper not being re-initialized 
> correctly. When createResources() is called, it is called from a thread whose 
> context classloader is not the processor's instance classloader, and thus 
> none of the additional script engines are found.
> This could be fixed by NIFI-6386, but specifically for these processors there 
> is another solution, namely to add an OnAdded method that calls 
> createResources() whether some other thread has already called it. The 
> OnAdded method is guaranteed to be called with the thread's context class 
> loader set to the processor's instance classloader, and will set the 
> initialized flag to true, preventing any future calls (of other methods) of 
> createResources() if not initialized.



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

Reply via email to