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

Plugin2 returns sun.plugin2.liveconnect.JavaNameSpace instead of the correct JavaClass specified

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Fix
    • Icon: P3 P3
    • None
    • 6u10
    • deploy
    • None
    • x86
    • windows

      test.html:
      <html>
      <body>
      <script language="javascript" type="text/javascript">

      function FuncAxel() {
      var jarURL = new java.net.URL('http://javaweb.sfbay/~dp144265/miscs/test.jar&#39;);
      var urlArray = java.lang.reflect.Array.newInstance(java.net.URL, 1);
      urlArray[0] = jarURL;
      alert("Hello: " + urlArray[0].toString());
      }
      </script>
      <button onclick="FuncAxel()">Axel's testcase</button>
      </body>
      </html>

      --
      Load the above test.html on FF3 and run with new plugin.
      Click on "Axel's testcase". Will see the following exception in Java Console:

      java.lang.IllegalArgumentException: No method found matching name newInstance
      and arguments [sun.plugin2.liveconnect.JavaNameSpace, java.lang.Integer]
              at sun.plugin2.liveconnect.JavaClass$MemberBundle.invoke(Unknown
      Source)
              at sun.plugin2.liveconnect.JavaClass.invoke(Unknown Source)
              at
      sun.plugin2.main.client.LiveConnectSupport$PerAppletInfo$JavaNameSpaceProxy.invoke(Unknown
      Source)
              at
      sun.plugin2.main.client.LiveConnectSupport$PerAppletInfo$1.run(Unknown Source)
              at java.security.AccessController.doPrivileged(Native Method)
              at
      sun.plugin2.main.client.LiveConnectSupport$PerAppletInfo.doObjectOp(Unknown
      Source)
              at
      sun.plugin2.main.client.LiveConnectSupport$PerAppletInfo$LiveConnectWorker.run(Unknown
      Source)
              at java.lang.Thread.run(Unknown Source)

      This testcase works fine with OJI Plugin and FF3.
      NPRuntime plugin returns sun.plugin2.liveconnect.JavaNameSpace
      JavaClass for the 'java.net.URL' argument for the following JS line:

      var urlArray = java.lang.reflect.Array.newInstance(java.net.URL, 1);

      and causes the above exception.

      Tested with 6u10 nightly build dated April/27.

      (This CR references Bugzilla: https://bugzilla.mozilla.org/show_bug.cgi?id=424067)

            kbr Kenneth Russell (Inactive)
            dphamsunw Danielle Pham (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: