Calling Kotlin suspend functions in non-reactive application crashes due to unresolvable class #32599
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
theme: kotlin
An issue related to Kotlin support
type: regression
A bug that is also a regression
Milestone
Affects:
6.1.1+
(Spring Boot 3.2.x)Reproducer: reproducer.zip
Problem
Calling any suspend function in a service that is proxied by SpringCGLIB might throw an exception due to missing classes in the classpath (
java.lang.ClassNotFoundException: org.reactivestreams.Publisher
). For some reason this only occurs when another function in the specified class is getting changed too. E.g. if there is an@Transactional
method, only then this bug occurs.Expected Behavior
When calling a suspend function, the call should not be re-written on a non-reactive stack regardeless of other functions in the , similar to how it worked in
6.0.x
.Actual Behavior
When another function in the service forces some new behavior to be introduced by the SpringCGLIB proxy, then the suspend function should be left untouched in a non-reactive application.
Reproducer
reproducer.zip
Crashes with SB 3.2.X, works with SB 3.1.X:
The text was updated successfully, but these errors were encountered: