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

sa.js: TypeError: [object JSAdapter] has no such function "__has__"

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: hs25, 8
    • Fix Version/s: 8
    • Component/s: hotspot
    • Labels:
    • Environment:

      java version "1.8.0-ea"
      Java(TM) SE Runtime Environment (build 1.8.0-ea-b84)
      Java HotSpot(TM) Server VM (build 25.0-b25, mixed mode)

    • Subcomponent:
      svc
    • Resolved In Build:
      b106

      Backports

        Description

        sa intermittently throw 'javax.script.ScriptException: TypeError: [object JSAdapter] has no such function "__has__" in sa.js at line number 150' during attaching to core

        way to reproduce:
        0. generate core-file, e.g.:
          java -XX:ErrorHandlerTest=1'
        1. try to attach:
           ${JAVA_HOME}/bin/java -cp ${JAVA_HOME}/lib/sa-jdi.jar sun.jvm.hotspot.CLHSDB ${JAVA_HOME}/bin/java ${CORE}

        output:
        Opening core file, please wait...
        javax.script.ScriptException: SyntaxError: sa.js#752<eval>:1:23 Expected ( but found :
        function readHeapBlock_:Header(addr) { return readVMType('HeapBlock_:Header', addr);}
                               ^ in sa.js at line number 752
        javax.script.ScriptException: SyntaxError: sa.js#752<eval>:1:23 Expected ( but found :
        function readHeapBlock_:Header(addr) { return readVMType('HeapBlock_:Header', addr);}
                               ^ in sa.js at line number 752
        Exception in thread "main" java.lang.RuntimeException: javax.script.ScriptException: TypeError: [object JSAdapter] has no such function "__has__" in sa.js at line number 150
                at sun.jvm.hotspot.utilities.soql.JSJavaScriptEngine.call(JSJavaScriptEngine.java:82)
                at sun.jvm.hotspot.utilities.soql.JSJavaScriptEngine.start(JSJavaScriptEngine.java:434)
                at sun.jvm.hotspot.utilities.soql.JSJavaScriptEngine.start(JSJavaScriptEngine.java:61)
                at sun.jvm.hotspot.CommandProcessor.postAttach(CommandProcessor.java:1739)
                at sun.jvm.hotspot.CommandProcessor.<init>(CommandProcessor.java:1777)
                at sun.jvm.hotspot.CLHSDB.run(CLHSDB.java:90)
                at sun.jvm.hotspot.CLHSDB.main(CLHSDB.java:35)
        Caused by: javax.script.ScriptException: TypeError: [object JSAdapter] has no such function "__has__" in sa.js at line number 150
                at jdk.nashorn.api.scripting.NashornScriptEngine.throwAsScriptException(NashornScriptEngine.java:421)
                at jdk.nashorn.api.scripting.NashornScriptEngine.invokeImpl(NashornScriptEngine.java:369)
                at jdk.nashorn.api.scripting.NashornScriptEngine.invokeFunction(NashornScriptEngine.java:170)
                at sun.jvm.hotspot.utilities.soql.JSJavaScriptEngine.call(JSJavaScriptEngine.java:78)
                ... 6 more
        Caused by: sa.js:150 TypeError: [object JSAdapter] has no such function "__has__"
                at jdk.nashorn.internal.runtime.ECMAErrors.error(ECMAErrors.java:66)
                at jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:222)
                at jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:194)
                at jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:181)
                at jdk.nashorn.internal.objects.NativeJSAdapter.findGetMethod(NativeJSAdapter.java:629)
                at jdk.nashorn.internal.runtime.ScriptObject.lookup(ScriptObject.java:1603)
                at jdk.nashorn.internal.runtime.linker.NashornLinker.getGuardedInvocation(NashornLinker.java:76)
                at jdk.internal.dynalink.support.CompositeTypeBasedGuardingDynamicLinker.getGuardedInvocation(CompositeTypeBasedGuardingDynamicLinker.java:176)
                at jdk.internal.dynalink.support.CompositeGuardingDynamicLinker.getGuardedInvocation(CompositeGuardingDynamicLinker.java:124)
                at jdk.internal.dynalink.support.LinkerServicesImpl.getGuardedInvocation(LinkerServicesImpl.java:138)
                at jdk.internal.dynalink.DynamicLinker.relink(DynamicLinker.java:229)
                at jdk.nashorn.internal.scripts.Script$sa.main$wrapScriptObject$_L149(sa.js:150)
                at jdk.nashorn.internal.scripts.Script$sa.main(sa.js:193)
                at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:514)
                at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:205)
                at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:345)
                at jdk.nashorn.internal.runtime.ScriptRuntime.checkAndApply(ScriptRuntime.java:330)
                at jdk.nashorn.api.scripting.NashornScriptEngine.invokeImpl(NashornScriptEngine.java:367)
                ... 8 more

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  allwin Peter Allwin (Inactive)
                  Reporter:
                  iignatyev Igor Ignatyev
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  8 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: