https://kotlinlang.org logo
#spring
Title
# spring
e

Emil Kantis

11/30/2023, 11:23 AM
Upgrading from Spring Boot 3.1.5 to 3.2.0 seems to cause issues with suspending functions. Anyone else having issues?
t

Thomas

11/30/2023, 11:25 AM
Only thing I noticed is that you need to use kotlin 1.9.21 with java 21
c

Chris Lee

11/30/2023, 9:56 PM
Yes, Kotlin suspend functions w/ SB 3.2.0 fail, I ended up rolling back (was Kotlin 1.9.21 or 1.9.20, Java 17).
This is the exception (class names abbreviated):
Copy code
j.l.IllegalArgumentException: object is not an instance of declaring class
	at j.i.r.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java)
	at j.i.r.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at j.i.r.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at j.l.reflect.Method.invoke(Method.java:568)
	at k.r.j.i.c.ValueClassAwareCaller.call(ValueClassAwareCaller.kt:190)
	at k.r.j.i.KCallableImpl.callDefaultMethod$kotlin_reflection(KCallableImpl.kt:207)
	at k.r.full.KCallables.callSuspendBy(KCallables.kt:74)
	at o.s.c.CoroutinesUtils.lambda$invokeSuspendingFunction$2(CoroutinesUtils.java:124)
	at k.c.i.IntrinsicsKt__IntrinsicsJvmKt$createCoroutineUnintercepted$$inlined$createCoroutineFromSuspendFunction$IntrinsicsKt__IntrinsicsJvmKt$4.invokeSuspend(IntrinsicsJvm.kt:270)
	at k.c.j.i.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at k.c.DispatchedTask.run(DispatchedTask.kt:108)
	at k.c.s.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
	at k.c.s.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
	at k.c.s.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
	at k.c.s.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
e

Emil Kantis

11/30/2023, 10:02 PM
Thanks for chiming in, same as we saw.
👍 1
s

sdeleuze

12/04/2023, 7:56 PM
Please create a reproducer and create an issue on https://github.com/spring-projects/spring-framework
👍 1
e

Emil Kantis

12/08/2023, 2:36 PM
Thanks @sdeleuze ☺️ have a great weekend!
64 Views