[
https://issues.apache.org/jira/browse/SLING-13207?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Roy Teeuwen reassigned SLING-13207:
-----------------------------------
Assignee: Roy Teeuwen
> RhinoJavaScriptEngineFactory has a stale NativeJavaPackage permanently cached
> even when a bundle restarts
> ---------------------------------------------------------------------------------------------------------
>
> Key: SLING-13207
> URL: https://issues.apache.org/jira/browse/SLING-13207
> Project: Sling
> Issue Type: Bug
> Affects Versions: Scripting JavaScript 3.1.4
> Reporter: Roy Teeuwen
> Assignee: Roy Teeuwen
> Priority: Major
>
> Rhino scripting permanently fails to resolve Java classes (e.g.
> org.apache.sling.api.resource.ValueMap) even when the class becomes available
> again.
> This happens because there is a single shared rootScope that is reused by
> every ScriptEngine instance. If at creation of that rootScope, the
> DynamicClassLoader that is used does not have access to the class, it will
> wrongly cache the class as a NativeJavaPackage
> org.apache.sling.api.resource.ValueMap instead of NativeJavaClass causing a
> ClassNotFoundException when the ValueMap is used (e.g. in
> /libs/sling/sightly/js/internal/resource.js)
--
This message was sent by Atlassian Jira
(v8.20.10#820010)