You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2017/11/08 14:15:00 UTC
[Bug 61696] Initialize Nashorn ScriptEngine with SecurityManager
cause a "Security Violation, attempt to use Restricted Class:
jdk.internal.dynalink.support.messages".
https://bz.apache.org/bugzilla/show_bug.cgi?id=61696
Mark Thomas <ma...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |INVALID
OS| |All
Status|NEW |RESOLVED
--- Comment #1 from Mark Thomas <ma...@apache.org> ---
Thanks for the test case. It really helped make progress on this one quickly.
I as sure as I can be that this is a Nashorn bug. The creation of the static
Logger in jdk.internal.dynalink.support.Guards needs to be in a privileged
block.
Everything in the Nashorn environment runs in a sandbox with limited
privileges. Stepping through the code I see that, at the point the code tries
to create the logger, a ProtectionDomain in place with very minimal privileges.
As a work-around, try pre-loading the Guards class. You can use the memory leak
prevention listener to do this:
<Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener"
classesToInitialize="jdk.internal.dynalink.support.Guards" />
I'm marking this as invalid as I believe the root cause lies outside of Tomcat
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org