-
Notifications
You must be signed in to change notification settings - Fork 41.1k
AspectJ proxy bean gives IllegalAccessException in Java 16 #26578
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Here's the full stacktrace:
|
I'm going to transfer this one to the Spring Framework team for assessment. Spring Boot isn't actually involved in the proxy creation, it's a framework concern. This looks similar to spring-projects/spring-framework#26440 but there's no |
@philwebb It looks like this is yet another case of a ClassLoader mismatch on proxy creation. This warning/exception will appear any time the target There is nothing we can do about it from the framework side anymore as far as we are aware. The only way out is either If any such issues come up, I'm happy to help analyzing the specific case. The most important input here is the two |
I'll transfer this back to the Boot issue tracker. Devtools isn't being used with this specific example so I'm not sure how we can fix this one. I don't think we have a good way to consistently change the application classloader being used. |
I'm not sure how we can fix this one either. In this case As far as I can tell, the failure is specific to proxying of methods defined in the JDK such as |
This is essentially the same problem as has just been reported in spring-projects/spring-framework#32671. Given that we don't believe there's anything we can do about it in Boot, I'm going to close this in favor of the Framework issue. I think it's likely that the outcome of that one will be a documentation update that describes the fundamental limitations of JPMS. |
Here is a sample project which demonstrates the issue with SB 2.4 and JDK 16 https://github.com/EvgeniGordeev/spring-boot-java-16-aspectj-proxy-error.
The application cannot start due to:
Valid for beans with
@Transactional
and whenSpringBootApplication
combines@EnableAspectJAutoProxy
and@EnableTransactionManagement
.The text was updated successfully, but these errors were encountered: