JDK-8209348 : [AOT] Issue with static initializer - java.lang.NoClassDefFoundError: Could not initialize class
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 10,11,12
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2018-08-10
  • Updated: 2023-07-21
  • Resolved: 2023-07-21
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 12
12Resolved
Related Reports
Duplicate :  
Relates :  
Description
Test Suite : JCK
Test Case: lang/EXCP/excp013/excp01304/excp01304_rt 
(Added standalone test in comment section)

Expected Behavior : Test should pass and print nothing
Actual Behavior: Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class ClassStatVar
	at excp01304.run(excp01304.java:31)
	at excp01304.main(excp01304.java:21)


Comments
Looks like the ExceptionInInitializerError due to the RuntimeException that is thrown is not propagated correctly. ILW = Incorrect execution of compiled code, single test with AOT'ed code, don't use AOT = HLM = P3
10-08-2018

RULE "lang/EXCP/excp013/excp01304/excp01304_rt" Exception java.lang.NoClassDefFoundError: Could not initialize class javasoft.sqe.tests.lang.excp013.excp01304.ClassStatVar RULE "lang/EXCP/excp013/excp01304/excp01304_rt" ExitCode 1
10-08-2018