|
java.lang.LinkageError instances - especially NoClassDefFoundError - are sometimes thrown instead of ClassNotFoundException in modular environments (especially if there's something wrong in the module structure).
Currently the org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl doesn't catch this kind of errors, as they don't extend Exception; if we could catch these as well, we get:
-
better / nicer error messages to help understand the issue
-
some cases actually work fine, as the AggregatedClassLoader won't abort early on but then try the next classloader which might be correct for a certain type.
|