NoClassDefFoundError on first deploy of EAR, goes away after restart

148 views
Skip to first unread message

JD

unread,
Jul 24, 2023, 3:52:21 PM7/24/23
to WildFly
Linux server deployment, does not occur on Windows
Since upgrading to Wildlfy 27 (same occurs with 28) when deploying a new EAR, the first time it runs we see: Caused by: java.lang.NoClassDefFoundError: Could not initialize class (custom class).  The class exists in the EAR file.  After shutting down and restarting the server (usually once, but sometimes 2-3X times) the error goes away. 

Any idea what could be causing this?  Permissions are correct (default, same limited owner/group for all files executing the .sh file)

Greg Jewell

unread,
Jul 27, 2023, 8:25:35 AM7/27/23
to WildFly
The NoClassDefFoundError can be a bit misleading.  This is thrown by the JVM when a class has a static initializer block, and something in the block throws an unhandled exception.  Check the class that the error is indicating, and you can narrow down what in the initializer block is failing.
Reply all
Reply to author
Forward
0 new messages