Alexandre Brown
08/23/2021, 5:14 PMException in thread "DefaultDispatcher-worker-2" kotlin.reflect.jvm.internal.KotlinReflectionInternalError: Unresolved class: class applications.web.routes.roadclassification.MyLocation
import <http://io.ktor.locations.post|io.ktor.locations.post>
...
fun Routing.myFun() {
route("/my-route") {
post<MyLocation> {
call.respondText { "hello" }
}
}
}
import io.ktor.locations.Location
@Location("/mylocation")
class MyLocation
The app works when not running the native image (regular jar) or when running the native image without using the Location feature.
Thanksrocketraman
08/23/2021, 5:28 PMAlexandre Brown
08/23/2021, 5:29 PMrocketraman
08/23/2021, 5:30 PMrocketraman
08/23/2021, 5:31 PMrocketraman
08/23/2021, 5:33 PMAlexandre Brown
08/23/2021, 6:10 PMkotlin.reflect.jvm.internal.KotlinReflectionInternalError: Could not compute caller for function: public constructor MyLocation() defined in applications.web.routes.MyLocation[DeserializedClassConstructorDescriptor@64e2d0d] (member = null)
Alexandre Brown
08/23/2021, 6:26 PM$JAVA_HOME/bin/java -agentlib:native-image-agent=config-output-dir=META-INF/native-image -jar mdAI-inference-1.0-all.jar
but now nothing is generated.rocketraman
08/23/2021, 6:26 PMAlexandre Brown
08/23/2021, 6:27 PMAlexandre Brown
08/23/2021, 6:31 PMAlexandre Brown
08/23/2021, 6:32 PMreflect-config.json
in my reflection.json file or add what is generated to what I currently have?rocketraman
08/23/2021, 6:33 PMAlexandre Brown
08/23/2021, 6:34 PMreflection.json
file and copy pasted the content from the generated reflect-config.json
file from the agent and now it works. Thanks a lot!