jamesnetherton opened a new issue, #8783:
URL: https://github.com/apache/camel-quarkus/issues/8783
### Bug description
In the absence of Kotlin, `SpringKotlinProcessor` has code to generate some
stub classes to satisfy the native compiler and enable the various Spring libs
to work properly.
Unfortunately, the `isKotlinStdlibAvailable` checked is flawed in that
matches `kotlin-stdlib` from transitives coming from `-deployment` artifacts.
For example, `quarkus-smallrye-openapi-deployment` has `kotlin-stdlib` as a
dependency.
```
└─ io.quarkus:quarkus-smallrye-openapi-deployment
├─ io.quarkus:quarkus-resteasy-server-common-spi
├─ io.quarkus:quarkus-resteasy-common-spi
├─ io.quarkus:quarkus-smallrye-openapi-common-deployment
├─ io.quarkus:quarkus-smallrye-openapi
├─ io.quarkus:quarkus-smallrye-openapi-dev
│ └─ io.quarkus:quarkus-assistant-dev
├─ io.smallrye:smallrye-open-api-jaxrs
├─ io.smallrye:smallrye-open-api-spring
├─ io.smallrye:smallrye-open-api-vertx
└─ org.jetbrains.kotlinx:kotlinx-metadata-jvm
└─ org.jetbrains.kotlin:kotlin-stdlib
```
`-deployment` artifacts are not present on the runtime classpath, so the app
will have incorrectly assumed that it did not need to generate the stub
classes. Thus the native build will fail with errors like:
```
Internal exception: com.oracle.svm.core.util.UserError$UserException: Cannot
find org.springframework.beans.BeanUtils$KotlinDelegate.findPrimaryConstructor,
org.springframework.beans.BeanUtils$KotlinDelegate can not be loaded, due to
kotlin/reflect/KCallable not being available in the classpath. Are you missing
a dependency in your classpath?
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]