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

ClassNotFoundException when loading Applet from IDNA domain

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P3 P3
    • tbd
    • 6u10
    • deploy
    • x86
    • windows_xp

      FULL PRODUCT VERSION :
      java version "1.6.0_17"
      Java(TM) SE Runtime Environment (build 1.6.0_17-b04)
      Java HotSpot(TM) Client VM (build 14.3-b01, mixed mode, sharing)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows XP [Version 5.1.2600]

      A DESCRIPTION OF THE PROBLEM :
      The Java Plug-in and Internet Explorer 8 (version 8.0.6001.18702) fails to load Applets from a server with an IDNA (punycode) domain.
        A ClassNotFoundException caused by an UnknownHostException is thrown when the Plug-in tries to load the Applet.
        The HostUnknownException shows that the Plug-in tries to use the hostname in unicode form and not in punycode form. In unicode form, the hostname is not a valid hostname.


      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      load: class HelloWorld.class not found.
      java.lang.ClassNotFoundException: HelloWorld.class
      at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
      at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
      at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
      Caused by: java.net.UnknownHostException: www.åäö.net
      at java.net.PlainSocketImpl.connect(Unknown Source)
      at java.net.SocksSocketImpl.connect(Unknown Source)
      at java.net.Socket.connect(Unknown Source)
      at sun.net.NetworkClient.doConnect(Unknown Source)
      at sun.net.www.http.HttpClient.openServer(Unknown Source)
      at sun.net.www.http.HttpClient.openServer(Unknown Source)
      at sun.net.www.http.HttpClient.<init>(Unknown Source)
      at sun.net.www.http.HttpClient.New(Unknown Source)
      at sun.net.www.http.HttpClient.New(Unknown Source)
      at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
      at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
      at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
      at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
      at java.net.HttpURLConnection.getResponseCode(Unknown Source)
      at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
      at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
      at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      ... 7 more
      Exception: java.lang.ClassNotFoundException: HelloWorld.class

      [the host name has been edited]

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      Any applet should do, I used the one from the tutorial: http://java.sun.com/docs/books/tutorial/deployment/applet/examples/applet_HelloWorld/src/HelloWorld.java

      I used the following HTML but have also tried variants using the object tag and JNLP without success.

      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
      <html>
        <head>
          <title>Applet Test</title>
        </head>
        <body>
          <applet archive="applet.jar" code="HelloWorld.class" width="100" height="100"> </applet>
        </body>
      </html>


      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      1) Browse using the host's IP address.
      2) Use Firefox instead of Internet Explorer 8.

            Unassigned Unassigned
            ndcosta Nelson Dcosta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: