-
Notifications
You must be signed in to change notification settings - Fork 40.2k
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
Likely issues of incorrect classloader being used #27134
Comments
Thanks for this. While a number of these look similar to #27133, there are others where someone may be relying on the current behaviour. Until someone reports a concrete problem we'd prefer to leave things as they are and avoid the risk of introducing a subtle regression. |
Hello, not sure if related, but today, we got a problem related to autowiring features only occuring when using devtools. Here is what I found so far (sorry for the hidden information, as this is a company application, i cannot show you some parts of the code). Backstory of the code is : But in the process, when the DefaultListableBeanFactory tries to find matching bean corresponding to the property interface, it fails to do so : This will find both the same classes but loaded in a distinct classloader (and thus the call org.springframework.util.ClassUtils#isAssignable return false) |
@ArthurEnglebert That’s unrelated to the changes proposed in this issue. Your problem sounds like it’s related to Devtools’ split class loader which will load frequently-changing application classes in its restart class loader and the application’s dependencies in the system class loader. I can’t say more about what may be causing your problem from what you’ve shared this far. If you’d like us to take another look, please open a new issue and provide a minimal sample (it doesn’t have to be your actual application) that reproduces the problem. |
@wilkinsona well, it's probably linked to some shady underlying system IntelliJ is using as it was the very first time we had the error, and it's working well & as intented for other apps (using the same autoconfig). |
I found additional places in the code that look like they likely could cause issues when an alternate classloader is used for a SpringApplication, but I have not actually experienced an issue yet.
spring-boot/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/env/SpringApplicationJsonEnvironmentPostProcessor.java
Line 161 in f06b784
spring-boot/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/json/JsonParserFactory.java
Line 39 in f06b784
spring-boot/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/reactor/DebugAgentEnvironmentPostProcessor.java
Line 44 in f06b784
spring-boot/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/jetty/SslServerCustomizer.java
Line 131 in f06b784
spring-boot/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/BeanDefinitionLoader.java
Line 227 in f06b784
spring-boot/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/WebApplicationType.java
Line 67 in f06b784
spring-boot/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/WebApplicationType.java
Line 86 in f06b784
spring-boot/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/jdbc/DataSourceBuilder.java
Line 487 in f06b784
spring-boot/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/validation/MessageInterpolatorFactory.java
Line 77 in f06b784
spring-boot/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/config/DelegatingApplicationContextInitializer.java
Line 73 in f06b784
spring-boot/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/config/DelegatingApplicationListener.java
Line 82 in f06b784
spring-boot/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/ConfigurationPropertiesScanRegistrar.java
Line 103 in f06b784
spring-boot/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/jetty/JasperInitializer.java
Line 57 in f06b784
spring-boot/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/support/ErrorPageFilter.java
Line 306 in f06b784
spring-boot/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/BeanDefinitionLoader.java
Line 195 in f06b784
The text was updated successfully, but these errors were encountered: