NoClassDefFoundError for classes in dependency library when using ServiceLoader in Spring Boot
I’ve been trying to implement a plugin(extension) feature for my Spring Boot application. Problem is I’m getting NoClassDefFoundError
for fat JAR classes I’m loading.
I successfully loaded Plugin using ServiceLoader, but I get NoClassDefFoundError
for classes in dependency library in the plugin.
ServiceConfigurationError: Class not a subtype error with ServiceLoader in deployment
I’m facing an issue with my Java Spring Boot application where I dynamically load plugins using ServiceLoader. The application works perfectly in my local development environment (IntelliJ IDE), but when I build the JAR files and run them, I encounter the following error: