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
Spring Boot and Spring Data Rest - java.lang.IllegalAccessError #9911
Comments
I have prepared additional sample project that demonstrates that issue doesn't occur while using traditional xml configuration (without Spring Boot): |
Do you have a complete stack trace from the "cannot access its superclass" error that you can attach? |
I've seen this happen in the past, but only when there are two class loaders. When a package is defined it's associated with a particular class loader. If two class loaders define the same package they're not actually the same and anything that's package-private in a class loaded by one class loader won't be visible to a class loaded by another class loader even though the classes appear to be in the same package. |
@wilkinsona you are absolutely right. I have found a root cause of this issue. AbstractApplicationContext:655
... SimpleMetadataReaderFactory:98
AnnotationMetadataReadingVisitor:134
AnnotationReadingVisitorUtils:78
...
|
I think SimpleMetadataReaderFactory has to be refactored to use tempClassLoader from BeanFactory (if it is not null) and a resource class loader in other case. |
I have found an open bug (may the same) under Spring Framework Jira: |
Let's reuse SPR-10206 for our purposes here. It does indeed hint at the same issue. We actually intentionally use the standard |
Thanks for the analysis, @EugenMaysyuk. I'll close this one as a duplicate of SPR-10206 which I'm now watching. |
I met this issue and resolve it by removing
|
Under WildFly 10.1.0.Final I am getting:
This issue started to happen when I added Spring Data Rest configuration with all the necessary dependencies into the project.
I noticed that issue cannot be reproduced when I comment
<context:load-time-weaver />
tag inside theapplicationContext.xml
.This is a sample app that reproduces the problem:
https://github.com/emaysyuk/spring-boot-data-rest
The text was updated successfully, but these errors were encountered: