glassfish
glassfish copied to clipboard
Could not initialize class org.slf4j.MDC
Environment Details
- GlassFish Version (and build number): 7.0.3
- JDK version: Open JDK 17
- OS: windows10
- Database: postgresql
Problem Description
throw a classdeffounderror when use slf4j

Where did you place the slf4j-api class? Is it in your application, or is it in lib or lib/ext directory? If you placed libraries in lib/ext directory, you have to move them to the lib directory. The extension mechanism for lib/ext directory doesn't work in Java 17 (it was removed in Java 9).
I believe it duplicates #24138 . The problem is that GF uses SLF4J1 and it is mandatory because of xmlsec.
This issue has been marked as inactive and old and will be closed in 7 days if there is no further activity. If you want the issue to remain open please add a comment