Anyone upgrade to Koltin 2.3 and Java 25 here? I ...
# spring
h
Anyone upgrade to Koltin 2.3 and Java 25 here? I worked on a backed project which used Spring Reactive stack with Kotlin/Kotlin coroutines and used Gradle 9.2, originally we used Java 21 and Kotlin 2.2. When Kotlin 2.3 was released(Kotlin 2.3 and Java 21 build worked well), we tried to upgrade to Java 25, we got several
Caused by: java.lang.OutOfMemoryError: Java heap space
when running tests in the Github actions.
r
We've been desperately waiting for Kotlin 2.3, so we can upgrade to Java 25. Did it yesterday for a bunch of services on GitHub, no issues whatsoever.
h
OK, it could be specific to our project. We have hundreds of tests to run via GitHub Actions, and they also work well on my local machine when I run them standalone with the same env (Kotlin 2.3 and Java 25).
Today, we kept the Spring Boot version at 3.5.9, upgraded Kotlin to 2.3 and Java 25, and the GitHub Actions build is successful. I don't know why upgrading SB 4 causes
Out of Memory
errors in the GitHub Actions build. We have hundreds of tests and have tried increasing memory and adjusting
Xmx
in the
org.gradle.jvmargs
, and did not change the result. Do you know if there is any change in the Spring TestContext/DirtyContext cleanup?
h
I think spring boot 4 has been made more granular, so more specifics with the dependencies. So upgrading to Spring Boot 4 you need to review your dependencies very carefully.
h
We have upgraded SB 4/Kotlin 2.3 successfully with Java 21, but when changing to 25, it failed due to a lot of out-of-memory errors in the tests.
I only know Spring 7 introduced class-file API metadata reader instead of the legacy cglig/asm for the newest Java runtime.