[
https://issues.apache.org/jira/browse/NIFI-6764?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Matt Burgess updated NIFI-6764:
-------------------------------
Summary: Recreate GroovyShell in ExecuteGroovyScript only when necessary
(was: Recreate GroovyShell in ExecuteGroovyScript when necessary)
> 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
> Priority: Major
>
> 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)