You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to migrate Micronaut to use use Kotlin 2 and KSP2.
I see the files are generated but classes cannot be loaded by Class.forName.
Do you have any idea what can be wrong?
Reading the class as file getClass().getClassLoader().getResource(className.replace('.', '/').concat(".class")) doesn't work. It looks like classes are not included on the classpath but the resources are added.
The text was updated successfully, but these errors were encountered:
Can you share more details on how / when the classes are generated and how / when they are loaded? E.g., are you loading the classes generated in a previous round, different Gradle tasks or different Gradle modules, etc.
And we expect those classes to be present on the runtime classpath at the same module.
Micronaut annotation processor processes beans definitions etc. and generates metadata bean definitions classes that are loaded at the runtime using the service loader feature to create the bean context. Currently the service loader META-INF definitions are present at the classpath but not the generated classes.
I'm trying to migrate Micronaut to use use Kotlin 2 and KSP2.
I see the files are generated but classes cannot be loaded by
Class.forName
.Do you have any idea what can be wrong?
Reading the class as file
getClass().getClassLoader().getResource(className.replace('.', '/').concat(".class"))
doesn't work. It looks like classes are not included on the classpath but the resources are added.The text was updated successfully, but these errors were encountered: