-
Notifications
You must be signed in to change notification settings - Fork 41.2k
Springboot 3.4.5 gives CGLIB errors failing existing applications which worked under version 3.4.4 #45391
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
Please provide a sample application that fails with 3.4.5 but works with 3.4.4 |
The project I am working on is proprietary.
The Bean class is similar to this public class MyIdStore {
} The issue happens when this bean gets created. I was able to do a workaround like this. In my pom.xml As a result it added --add-opens=java.base/java.lang=ALL-UNNAMED to the JVM options when it ran integration test. Then the integration tests did not fail. And also when I run the application I have to add --add-opens=java.base/java.lang=ALL-UNNAMED to run the microservice. But having to do this is not clean. Isn't it. I did not have to do that in version 3.4.4 and prior versions. Unfortunately, I cannot load proprietary code projects to report the bug. But I am sure if you add above bean creation to any application and use spring boot 3.4.5 and run integration tests or try to start the application it will fail. |
We are not asking for the exact project running in production but a minimal sample that reproduces the problem.
Then please do so and share it as a sample with us. If you want this to be looked at and fixed, it is way more efficient to help us reproduce the problem. |
I believe this is a duplicate of spring-projects/spring-framework#34824. @dulshand, please try 6.2.7-SNAPSHOT of Spring Framework that is available from https://repo.spring.io/snapshot. If that does not help, please provide the requested sample and we can re-open the issue and take another look. |
Thank you for the feedback. I am using spring boot 3.4.5. Current version 3.4.5 of spring boot does not use spring framework 6.2.7-SNAPSHOT. Could you please update spring framework to 6.2.7-SNAPSHOT for spring boot 3.4.5 to use it or could you ensure that the next version of spring boot which is 3.4.6 will have spring framework 6.2.7-SNAPSHOT . |
I checked the current code base for spring boot. The project properties are like this version=3.4.6-SNAPSHOT org.gradle.caching=true assertjVersion=3.26.3 kotlin.stdlib.default.dependency=false Could you kindly update springFrameworkVersion=6.2.6 to have 6.2.7 in release 3.4.6 ? |
That will happen in due course. In the meantime, you can trying out 6.2.7-SNAPSHOT of Spring Framework yourself by setting the |
Adding <spring-framework.version>6.2.7-SNAPSHOT</spring-framework.version> to the pom.xml resolved the issue. But appreciate if it is updated properly in the springboot release in the future. |
I am trying to upgrade a spring boot application from spring boot version 3.4.4 to 3.4.5.
Java version used is
java version "17.0.8" 2023-07-18 LTS
Java(TM) SE Runtime Environment (build 17.0.8+9-LTS-211)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.8+9-LTS-211, mixed mode, sharing)
The applications have beans with generated getters , setters and constructors using lombok version 1.18.22.
These beans are supposed to initialize with application context.
The application initialization fails with this error.
placing --add-opens=java.base/java.lang=ALL-UNNAMED in MAVEN_OPTS or JAVA_OPTS does not fix the issue.
This issue did not occur prior to spring boot 3.4.5
The text was updated successfully, but these errors were encountered: