Tanzu GemFire
This issue is caused by improper error handling within the custom implementation of the AsyncEventListener.
When the listener initializes (specifically during the first call to processEvents), it attempts to establish a database connection. If this connection fails (e.g., due to a network timeout), the static initializer for the Hibernate configuration class fails. Per the Java Language Specification, if a class initialization fails, subsequent attempts to access that class within the same ClassLoader will result in a NoClassDefFoundError without re-attempting initialization. The JVM remains in this broken state even if database connectivity is restored.
To resolve this issue, the custom listener code should be able to handle transient connectivity failures during initialization.
Implement Robust Error Handling: Wrap Hibernate/Database initialization in a try-catch block within the listener. Do not allow initialization failures to propagate as unhandled exceptions that break the class loader.