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

Misleading exception message says context classloader when it isn't

XMLWordPrintable

    • b43
    • generic
    • generic
    • Verified

      If you call createMBean with a loaderName parameter that is null, it means to use the MBeanServer's own ClassLoader. But if this ClassLoader fails to find the named MBean class, the exception thrown is an MBeanException whose cause is a ReflectException with the message "The MBean class could not be loaded by the context classloader". The ClassLoader that has been used is *not* the context ClassLoader, it is the ClassLoader that loaded the MBeanServer (usually the bootstrap loader).

            emcmanus Eamonn McManus
            emcmanus Eamonn McManus
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: