-
Bug
-
Resolution: Won't Fix
-
P3
-
None
-
9, 10, 11, 12, 13, 14
When you do an SA attach. You will see the following warning messages:
Warning! JS Engine can't start, some commands will not be available.
If before the attach you first do a "verbose true" command, you will see the reason for the failure:
java.lang.RuntimeException: javax.script.ScriptException: TypeError: so["has(java.lang.String)"] is not a function in sa.js at line number 133
This has been broken since 9 since because the Nashorn engine allows Java access only for public classes in exported packages of modules. SA does not export any API packages.
This also shows up when running SOQL and JSDB tools:
java --add-modules jdk.hotspot.agent sun.jvm.hotspot.tools.soql.SOQL <pid>
Warning: Nashorn engine is planned to be removed from a future JDK release
javax.script.ScriptException: TypeError: sapkg.runtime.VM.getVM is not a function in sa.js at line number 54
javax.script.ScriptException: TypeError: sapkg.runtime.VM.getVM is not a function in sa.js at line number 54
java.lang.RuntimeException: javax.script.ScriptException: TypeError: so.getIds is not a function in sa.js at line number 147
Warning! JS Engine can't start, some commands will not be available.
If before the attach you first do a "verbose true" command, you will see the reason for the failure:
java.lang.RuntimeException: javax.script.ScriptException: TypeError: so["has(java.lang.String)"] is not a function in sa.js at line number 133
This has been broken since 9 since because the Nashorn engine allows Java access only for public classes in exported packages of modules. SA does not export any API packages.
This also shows up when running SOQL and JSDB tools:
java --add-modules jdk.hotspot.agent sun.jvm.hotspot.tools.soql.SOQL <pid>
Warning: Nashorn engine is planned to be removed from a future JDK release
javax.script.ScriptException: TypeError: sapkg.runtime.VM.getVM is not a function in sa.js at line number 54
javax.script.ScriptException: TypeError: sapkg.runtime.VM.getVM is not a function in sa.js at line number 54
java.lang.RuntimeException: javax.script.ScriptException: TypeError: so.getIds is not a function in sa.js at line number 147
- duplicates
-
JDK-8157947 SA: Javascript engine can't access internal packages of jdk.hotspot.agent
- Closed
- relates to
-
JDK-8244668 Remove SA's javascript support
- Resolved
-
JDK-8240987 Implement lost clhsdb javascript commands by using java instead
- Resolved
-
JDK-8236062 Disable clhsdb initialization of SA javascript support since it will always fail, and will likely be removed soon
- Resolved