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

ClassFinder.findClass cannot find class in linked jar when running from webstart

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Duplicate
    • Affects Version/s: 7u25
    • Fix Version/s: 7u40
    • Component/s: deploy
    • Labels:

      Description

      FULL PRODUCT VERSION :
      java version " 1.7.0_25 "
      Java(TM) SE Runtime Environment (build 1.7.0_25-b17)
      Java HotSpot(TM) Client VM (build 23.25-b01, mixed mode, sharing)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows [Version 6.1.7601]

      A DESCRIPTION OF THE PROBLEM :
      If the application is run from java webstart, ClassFinder.findClass on the EventQueue thread can not find classes in jars linked in the JNLP file. This is causing a crash in XMLDecoder.readObject because parsing xml containing a class from a linked jar file fails.

      Note: calls to ClassFinder.findClass work fine on the main thread, but not on the EventQueue thread.

      This appears to be related to the fact that Thread.currentThread().getContextClassLoader() in the EventQueue thread has changed behavior in 7u25.

      In 7u21, this returned a loader of type com.sun.jnlp.JNLPClassLoader, which can load the required class.
      In 7u25, this returns a loader of type sun.misc.Launcher$AppClassLoader, which cannot load the required class.


      REPRODUCIBILITY :
      This bug can be reproduced always.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dmarkov Dmitry Markov
              Reporter:
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: