Hi, has anybody seen this error when building nati...
# ktor
s
Hi, has anybody seen this error when building native image containing ktor client ? I have tried different options by specific the offending class at build and runtime, but still having the same error.
Copy code
Fatal error: com.oracle.graal.pointsto.util.AnalysisError$ParsingError: Error encountered while parsing io.ktor.client.engine.cio.CIOEngine.<init>(io.ktor.client.engine.cio.CIOEngineConfig)
Parsing context:
   at io.ktor.client.engine.cio.CIOEngine.<init>(CIOEngine.kt)
   at io.ktor.client.engine.cio.CIO.create(CIOCommon.kt:35)
   at io.ktor.client.HttpClientKt.HttpClient(HttpClient.kt:41)
The client is being pulled as a transitive dependency for rsocket-kotlin
Copy code
Caused by: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: Discovered a type for which getDeclaringClass0 cannot be called: io.ktor.util.CoroutinesUtilsKt$SilentSupervisor$$inlined$CoroutineExceptionHandler$1. This error is reported at image build time because class io.ktor.util.CoroutinesUtilsKt$SilentSupervisor$$inlined$CoroutineExceptionHandler$1 is registered for linking at image build time by command line
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.SVMHost.handleLinkageError(SVMHost.java:426)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.SVMHost.getDeclaringClass(SVMHost.java:412)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.SVMHost.createHub(SVMHost.java:400)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.SVMHost.registerType(SVMHost.java:246)
	at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.meta.AnalysisUniverse.createType(AnalysisUniverse.java:303)
	at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.meta.AnalysisUniverse.lookupAllowUnresolved(AnalysisUniverse.java:213)
	at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.infrastructure.WrappedConstantPool.lookupType(WrappedConstantPool.java:255)
	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.lookupType(BytecodeParser.java:4199)
	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.genNewInstance(BytecodeParser.java:4493)
	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.processBytecode(BytecodeParser.java:5291)
	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.iterateBytecodesForBlock(BytecodeParser.java:3385)
	... 38 more
Caused by: java.lang.IncompatibleClassChangeError: io.ktor.util.CoroutinesUtilsKt and io.ktor.util.CoroutinesUtilsKt$SilentSupervisor$$inlined$CoroutineExceptionHandler$1 disagree on InnerClasses attribute
	at java.base/java.lang.Class.getDeclaringClass0(Native Method)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor$NativeAccessor.invoke0(Native Method)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor$NativeAccessor.invoke(DirectMethodHandleAccessor.java:230)
	at java.base/java.lang.reflect.Method.invoke(Method.java:578)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.SVMHost.getDeclaringClass(SVMHost.java:409)
	... 47 more
nm.. the issued is fixed now by updating the latest GraalVMCE dev build and few other reflection configs.