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

Change to ProgressSource in JDK 7 causes NoSuchMethodError in new Java Plug-in

    XMLWordPrintable

Details

    • b08
    • b08
    • generic
    • generic
    • Verified

    Description

      If the new Java Plug-In is run and a JDK 7 build is named in deployment.properties, applets will fail to load with the following exception:

      java.lang.NoSuchMethodError: sun.net.ProgressSource.getProgress()I
      at sun.plugin.util.ProgressMonitor.registerSource(ProgressMonitor.java:129)
      at sun.net.ProgressSource.beginTracking(ProgressSource.java:148)
      at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1031)
      at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:397)
      at sun.plugin2.applet.Applet2ClassLoader.getBytes(Applet2ClassLoader.java:361)
      at sun.plugin2.applet.Applet2ClassLoader.access$100(Applet2ClassLoader.java:47)
      at sun.plugin2.applet.Applet2ClassLoader$1.run(Applet2ClassLoader.java:153)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.plugin2.applet.Applet2ClassLoader.findClass(Applet2ClassLoader.java:150)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:324)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:269)
      at sun.plugin2.applet.Applet2ClassLoader.loadCode(Applet2ClassLoader.java:695)
      at sun.plugin2.applet.Applet2Manager.createApplet(Applet2Manager.java:2246)
      at sun.plugin2.applet.Applet2Manager.access$1500(Applet2Manager.java:83)
      at sun.plugin2.applet.Applet2Manager$AppletExecutionRunnable.run(Applet2Manager.java:845)
      at java.lang.Thread.run(Thread.java:675)

      This is happening because ProgressSource.getProgress() was changed to return a long instead of an int in JDK 7 in 5052093. Since the new plug-in needs to run on multiple JRE versions, we need to change the code in sun.plugin.util.ProgressMonitor() to call ProgressSource.getProgress() and the ProgressEvent constructor reflectively, or find another solution.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: