Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8235594

SA javascript support has been broken since 9

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • P3
    • Resolution: Won't Fix
    • 9, 10, 11, 12, 13, 14
    • tbd
    • hotspot
    • 9

    Description

      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

      Attachments

        Issue Links

          Activity

            People

              cjplummer Chris Plummer
              cjplummer Chris Plummer
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: