I am using spring boot to start a RMI server application using java8. In very rare cases:
- the application fails to initialize classes, throwing "java.lang.NoClassDefFoundError: Could not initialize class X".
- X is not always the same Class, but so far, all these classes have initialization of static members in common. (not always directly, so the stacktrace does not always point to a static variable...)
- The java process still has a valid read filehandle to the jar.
- The jar file didn't change after start of the process.
- memory is not an issue.
As the problem is very, very rare, i am not able to reproduce it.
How would you continue to find the problem?
Is it possible to get more information about the real cause of the NoClassDefFoundError?