ClassNotFoundException when using REST clients inside Kotlin coroutines after Quarkus version upgrade #45110
Closed
snitish2607
started this conversation in
Community
Replies: 2 comments
-
Refer to stackoverflow question here: https://stackoverflow.com/questions/79277576/classnotfoundexception-when-using-rest-clients-inside-kotlin-coroutines-after-qu |
Beta Was this translation helpful? Give feedback.
0 replies
-
Closing discussion due to similar observation: github.com/quarkusio/quarkus/issues/41349 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to upgrade from Quarkus version 3.8.4 -> 3.15.2 and I'm facing the below issue when using coroutines. Please refer to code examples below:
The below shows a method hello() being called which invokes a REST client call and prints the output as a string (This is done within an async Kotlin coroutine block):
This is how some of my functions were written when I was using Quarkus v3.8.4
I've now attempted to upgrade to 3.15.2 (Latest LTS version) and I'm getting this error on my code:
If I re-factor the same code, now without using suspend modifiers or Kotlin coroutines like below, then it works again:
Any insights as to why this is happening would be really helpful. The code which is initially displayed worked on the prior Quarkus version and on the updated code it isn't. Why does using Kotlin coroutines (suspend) with REST clients result in a ClassNotFoundException in Quarkus 3.15.2?
Here's some further information which you may require:
Note that quarkus had a dependency restructure for this version upgrade too (RESTEasy-Reactive being rebranded to REST) - [Reference: https://github.com/quarkusio/quarkus/wiki/Migration-Guide-3.9]
Detailed version upgrade information:
quarkus.platform.version 3.8.4 to 3.15.2,
kotlin.version 1.9.21 to 2.0.21,
compiler-plugin.version 3.11.0 to 3.12.1
Both versions of code use the same MyRemoteService.kt as described below:
Beta Was this translation helpful? Give feedback.
All reactions