RFR: 8048190: NoClassDefFoundError omits original ExceptionInInitializerError [v4]

Athijegannathan Sundararajan sundar at openjdk.java.net
Mon Aug 9 08:42:34 UTC 2021


On Fri, 6 Aug 2021 18:42:12 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> This is a change to save the class initialization error stack trace in a hashtable and return it as the cause when NoClassDefFoundError is thrown.  The first commit is a more limited version of this that just changes the message, by adding to the message string.  The second commit is getting and saving the stack trace for the original exception, and using the thread in the message.  See CR for more details about how the message looks.
>> 
>> Tested with tier1-3 tests on 3 platforms.  Tier 4-6 in progress (all but two done and passed).
>
> Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Create new exception during initialization saving, so only need to save an oop. (Could potentially move to Doug's secret Class location.  If the exception is not bootstrap exception, throw EIIE instead with message of original exception.

src/hotspot/share/classfile/javaClasses.cpp line 2685:

> 2683:   assert(stack_trace->is_objArray(), "Should be an array");
> 2684: 
> 2685:   // If the original exception was in java.base, then use that otherwise use

comment is about one specific bootstrap module (java.base) but the check is for bootstrap loader.

-------------

PR: https://git.openjdk.java.net/jdk/pull/4996


More information about the hotspot-dev mailing list