java.lang.NoClassDefFoundError: Could not initialize class XXX
My best bet is there is an issue here:
static {
//code for loading properties from file
}
It would appear some uncaught exception occurred and propagated up to the actual ClassLoader attempting to load the class. We would need a stacktrace to confirm this though.
Either that or it occurred when creating PropHolder.prop
static variable.
Exception in thread main java.lang.NoClassDefFoundError: Could not initialize class sun.util.calendar.ZoneInfoFile
I figured out the problem. The TimeZone dependency was missing from the OpenJDK installation: The symbolic link $JAVA_HOME/jre/lib/tzdb.dat -> /usr/share/javazi-1.8/tzdb.dat
was pointing to an empty directory. I downloaded the rpm file tzdata-java-2021c-1.el8.noarch.rpm and installed using the command:rpm -ivh tzdata-java-2021c-1.el8.noarch.rpm
All works fine now.
Related Topics
What's the Correct Way to Send a File from Rest Web Service to Client
How to Match "Any Character" in Regular Expression
No Exception While Type Casting with a Null in Java
Differences Between Java 8 Date Time API (Java.Time) and Joda-Time
Does Java Have a Int.Tryparse That Doesn't Throw an Exception for Bad Data
Sorting an Array of Int Using Bubblesort
Finding Number of Cores in Java
Implementation Difference Between Aggregation and Composition in Java
How I Save and Retrieve an Image on My Server in a Java Webapp
How to Specify Correctly Codebase and Archive in Java Applet
Collections.Emptylist() VS. New Instance
Java Xml Parser for Huge Files