Revise ClassUtils.isPresent for exposing resolution exceptions in jlinked modules [SPR-17018] #21556
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: enhancement
A general enhancement
Milestone
J. Pablo Fernández opened SPR-17018 and commented
I know this is not a bug in 5.0.7 because it's modular Java is not supported, but I think this will be a bug once it is. I'm using the ModiTect maven plugin to inject many of the Spring jars with a definition of their module (module-info.java). I'm happy to share the results as it might help speed things up for others.
One of the issues I run into is this exception:
I don't think this is an access problem because I already defined the module this way (being on the side of making it work at all costs):
and of course spring.core requires spring.aspects.
I think the problem is that the actual code won't work with the ClassLoader when jlinked. This wouldn't be the first time I found class loaders behaving differently on Java 9 or 10:
https://stackoverflow.com/questions/49702287/getresourceasstream-returning-null-in-java-10
One of the issues is that I cannot replicate this problem while I can attach a debugger, so, I can't figure exactly what's going on. I'm reporting this here in case someone that's much more familiar with the code can point me in the right direction on how to figure out what's happening here and maybe coming up with a fix.
Affects: 5.0.7
Reference URL: https://stackoverflow.com/questions/51207237/class-not-found-in-spring-when-using-java-modules-and-jlink
Issue Links:
Referenced from: commits 833343f
The text was updated successfully, but these errors were encountered: