JDK-8169559 : Add class loader names to relevant VM messages
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 11
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2016-11-10
  • Updated: 2018-07-06
  • Resolved: 2018-06-25
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 12
11 b20Fixed 12Fixed
Related Reports
Blocks :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
Expand class loader names to be used in class loading messages, logging, and other places where they would be useful
Comments
A new preliminary proposal is posted in JDK-8166633 for a consistent format to improve error messages, where relevant, to include module and class loader name information. This RFE is being reopened to specifically address LinkageError, IllegalAccessError, ClassCastException, IncompatibleClassChangeError
08-06-2018

JDK 9 has updated IllegalAccessError exception message to the following when it denies access to a class. IllegalAccessException thrown by core reflection is also consistent with IllegalAccessError. class $FROM_CLASS (in $FROM_MODULE) cannot access class $TO_CLASS (in $TO_MODULE) because $TO_MODULE does not export $PACKAGE_OF_TO_CLASS to $FROM_MODULE The format of the module is: if it's a named module, it will print as "module $MODULE" if it's an unnamed module, it will print as "unnamed module @0xnnnnnnnn" where 0xnnnnnnnn is the identity hash code of the module. JDK-8199940 shows several other IllegalAccessError (e.g. illegal member access) whose message should be updated to include "in $MODULE" similar to the above consistently. For example, class test.IAE1_B (in unnamed module @0x3d04a311) cannot access its superinterface test.IAE1_A (in module test)
28-03-2018

A patch of first steps, plus notes for potential changes. Changes to logging messages should be checked against test/runtime/logging/ tests. Both loader name and module name may not be relevant to every logging message, but they're probably helpful to most. In particular, -Xlog:class+load and -Xlog:class+unload are prime candidates for this upgrade.
15-06-2017

Like in JDK-8165550, we want to use the class_loader_and_module_name() function to print out the new format of class loader names. "Expand" refers to "expanding the occasions of using the function". The class loader names are also in an expanded format, but I really just meant the use cases.
09-01-2017

Can you clarify what you mean by expanding the classloader names?
09-01-2017