jdk.nashorn.api.scripting.ScriptObjectMirror is a restricted class. Please see the Google App Engine developer's guide for more details.

121 views
Skip to first unread message

Daniel Florey

unread,
Nov 28, 2017, 4:55:32 AM11/28/17
to Google App Engine
We are using Java8 on GAE Standard.
It works really great.
When using Nashorn we get the error 

jdk.nashorn.api.scripting.ScriptObjectMirror is a restricted class. Please see the Google App Engine developer's guide for more details.

in the dev server. It works fine in prod though.
Is there a workaround to turn of the restricted class check completely so that we can test in dev mode?

George (Cloud Platform Support)

unread,
Nov 28, 2017, 4:06:57 PM11/28/17
to Google App Engine
Hello Daniel, 

What is the output of the gcloud info command, and gcloud components list? 

What version of Java is actually used by your local development server, 7 or 8? In case of Java 8, there is no longer a java.lang.SecurityManager installed at startup, which means all Java standard classes are now available and there is no longer a whitelist.

Daniel Florey

unread,
Dec 2, 2017, 7:55:43 AM12/2/17
to Google App Engine
We are using gwt 2.8.2 on the client side so the startup uses something like:

... -server com.google.appengine.tools.development.gwt.AppEngineLauncher
... -javaagent:appengine-java-sdk-1.9.59\lib\agent\appengine-agent.jar

My guess is that the tools in the new Java8 App Engine SDK are not yet ready for Java8?
Looks like the SecurityManager is still used when using the AppEngineLauncher / appengine-agent

George (Cloud Platform Support)

unread,
Dec 4, 2017, 4:38:06 PM12/4/17
to Google App Engine
Hi Daniel, 

We need a representative sample of your code, to deploy here on the development server and reproduce the issue. To avoid loss of confidential information, it is better to send these details by private mail, using the drop-down menu of the edit button, at the top-right of the editing screen. 
Reply all
Reply to author
Forward
0 new messages