[
https://issues.apache.org/jira/browse/NIFI-6764?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16951784#comment-16951784
]
ASF subversion and git services commented on NIFI-6764:
-------------------------------------------------------
Commit 77e9bda0fff8166e21d237f9f92e5ef6348799ac in nifi's branch
refs/heads/master from Matt Burgess
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=77e9bda ]
NIFI-6764: Recreate GroovyShell in ExecuteGroovyScript only when necessary
Signed-off-by: Pierre Villard <[email protected]>
This closes #3803.
> Recreate GroovyShell in ExecuteGroovyScript only when necessary
> ---------------------------------------------------------------
>
> Key: NIFI-6764
> URL: https://issues.apache.org/jira/browse/NIFI-6764
> Project: Apache NiFi
> Issue Type: Improvement
> Components: Extensions
> Reporter: Matt Burgess
> Assignee: Matt Burgess
> Priority: Major
> Time Spent: 10m
> Remaining Estimate: 0h
>
> Currently, if any property is modified in ExecuteGroovyScript, the shell is
> abandoned and a new one will be created. This can cause problems when using a
> third-party JAR that loads a native library, as the class that loads the
> library will be garbage-collected but will still exist in the JVM's native
> library registry. If the processor is stopped and a property modified, the
> native library will fail to be reloaded, with the error that it has already
> been loaded by another classloader.
> The shell need not be abandoned unless something changes in the classpath,
> which can happen if the "Additional classpath" property is changed. Otherwise
> the shell should remain intact, so it can be reused to evaluate scripts and
> thus allow access to the native library. Note that if the "Additional
> classpath" property is changed and a native library is to be loaded, the same
> error will occur, and NiFi needs to be restarted in this case. This Jira is
> to enable the user to change something like the Script Body (which ostensibly
> calls something to load the native library) without having to restart NiFi
> each time.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)