quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.8k stars 2.68k forks source link

Kafka Avro integration test fails to generate native-image, Discovered unresolved type during parsing: com.google.common.collect.ImmutableMap #12695

Closed Karm closed 1 month ago

Karm commented 4 years ago

Describe the bug Kafka Avro integration test fails to generate native-image due to: Discovered unresolved type during parsing: com.google.common.collect.ImmutableMap.

Expected behavior Kafka Avro integration test generates native-image and carries on with the test.

Actual behavior

[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] Checking image status registry.redhat.io/quarkus/mandrel-20-rhel8:20.1-12
20.1-12: Pulling from quarkus/mandrel-20-rhel8
Digest: sha256:8d7893b808daba83225309d074e52a90a4087590fcd1667482c375592fbf133b
Status: Image is up to date for registry.redhat.io/quarkus/mandrel-20-rhel8:20.1-12
registry.redhat.io/quarkus/mandrel-20-rhel8:20.1-12
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] Running Quarkus native-image plugin on GraalVM Version 20.1.0.2_0-21 (Mandrel Distribution) (Java Version 11.0.8+10-LTS)
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] docker run -v /tmp/smallrye/quarkus/integration-tests/kafka-avro/target/quarkus-integration-test-kafka-avro-1.9.0.CR1-native-image-source-jar:/project:z --env LANG=C --user 1000:1000 --rm registry.redhat.io/quarkus/mandrel-20-rhel8:20.1-12 -J-Dsun.nio.ch.maxUpdateArraySize=100 -J-Djava.util.logging.manager=org.jboss.logmanager.LogManager -J-Davro.disable.unsafe=true -J-Dvertx.logger-delegate-factory-class-name=io.quarkus.vertx.core.runtime.VertxLogDelegateFactory -J-Dvertx.disableDnsResolver=true -J-Dio.netty.leakDetection.level=DISABLED -J-Dio.netty.allocator.maxOrder=1 -J-Duser.language=en -J-Dfile.encoding=UTF-8 --initialize-at-build-time= -H:InitialCollectionPolicy=com.oracle.svm.core.genscavenge.CollectionPolicy\$BySpaceAndTime -H:+JNI -jar quarkus-integration-test-kafka-avro-1.9.0.CR1-runner.jar -H:FallbackThreshold=0 -H:+ReportExceptionStackTraces -H:-AddAllCharsets -H:EnableURLProtocols=http,https --enable-all-security-services -H:-UseServiceLoaderFeature -H:+StackTrace quarkus-integration-test-kafka-avro-1.9.0.CR1-runner
[quarkus-integration-test-kafka-avro-1.9.0.CR1-runner:60]    classlist:   8,534.64 ms,  0.94 GB
[quarkus-integration-test-kafka-avro-1.9.0.CR1-runner:60]        (cap):     780.20 ms,  0.94 GB
[quarkus-integration-test-kafka-avro-1.9.0.CR1-runner:60]        setup:   2,319.46 ms,  0.94 GB
20:36:27,813 INFO  [org.jbo.threads] JBoss Threads version 3.1.1.Final
WARNING GR-10238: VarHandle for static field is currently not fully supported. Static field private static volatile java.lang.System$Logger jdk.internal.event.EventHelper.securityLogger is not properly marked for Unsafe access!
[quarkus-integration-test-kafka-avro-1.9.0.CR1-runner:60]     (clinit):   1,191.60 ms,  5.00 GB
[quarkus-integration-test-kafka-avro-1.9.0.CR1-runner:60]   (typeflow):  31,116.81 ms,  5.00 GB
[quarkus-integration-test-kafka-avro-1.9.0.CR1-runner:60]    (objects):  46,180.44 ms,  5.00 GB
[quarkus-integration-test-kafka-avro-1.9.0.CR1-runner:60]   (features):   1,558.81 ms,  5.00 GB
[quarkus-integration-test-kafka-avro-1.9.0.CR1-runner:60]     analysis:  84,892.52 ms,  5.00 GB
Error: Unsupported features in 2 methods
Detailed message:
Error: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved type during parsing: com.google.common.collect.ImmutableMap. To diagnose the issue you can use the --allow-incomplete-classpath option. The missing type is then reported at run time when it is accessed the first time.
Trace: 
    at parsing io.confluent.kafka.schemaregistry.client.rest.entities.ServerClusterId.<init>(ServerClusterId.java:36)
Call path from entry point to io.confluent.kafka.schemaregistry.client.rest.entities.ServerClusterId.<init>(Map): 
    at io.confluent.kafka.schemaregistry.client.rest.entities.ServerClusterId.<init>(ServerClusterId.java:35)
    at com.oracle.svm.reflect.ServerClusterId_constructor_a5bbab140ace69ca26886dee01d66bfd5e2eebc5_1061.newInstance(Unknown Source)
    at java.base@11.0.8/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
    at io.quarkus.avro.graal.Target_org_apache_avro_reflect_ReflectionUtil$1.apply(AvroSubstitutions.java:30)
    at platform/jdk.crypto.ec@11.0.8/sun.security.ec.XECParameters$1.get(XECParameters.java:183)
    at app//com.oracle.svm.core.jdk.SystemPropertiesSupport.initializeLazyValue(SystemPropertiesSupport.java:190)
    at app//com.oracle.svm.core.jdk.SystemPropertiesSupport.getProperty(SystemPropertiesSupport.java:143)
    at app//com.oracle.svm.core.jdk.Target_java_lang_System.getProperty(JavaLangSubstitutions.java:347)
    at com.oracle.svm.jni.JNIJavaCallWrappers.jniInvoke_VARARGS:Ljava_lang_System_2_0002egetProperty_00028Ljava_lang_String_2_00029Ljava_lang_String_2(generated:0)
Error: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved type during parsing: com.google.common.collect.ImmutableMap. To diagnose the issue you can use the --allow-incomplete-classpath option. The missing type is then reported at run time when it is accessed the first time.
Trace: 
    at parsing io.confluent.kafka.schemaregistry.client.rest.entities.ServerClusterId.of(ServerClusterId.java:50)
Call path from entry point to io.confluent.kafka.schemaregistry.client.rest.entities.ServerClusterId.of(String, String): 
    at io.confluent.kafka.schemaregistry.client.rest.entities.ServerClusterId.of(ServerClusterId.java:48)
    at com.oracle.svm.reflect.ServerClusterId_of_a56ede952818d2acc44798a31b504a0a499ac22b_1057.invoke(Unknown Source)
    at java.base@11.0.8/java.lang.reflect.Method.invoke(Method.java:566)
    at org.jboss.resteasy.core.ContextParameterInjector$GenericDelegatingProxy.invoke(ContextParameterInjector.java:122)
    at com.sun.proxy.$Proxy257.toString(Unknown Source)
    at java.base@11.0.8/java.lang.String.valueOf(String.java:2951)
    at java.base@11.0.8/java.io.PrintStream.print(PrintStream.java:745)
    at java.base@11.0.8/java.io.PrintStream.println(PrintStream.java:882)
    at app//com.oracle.svm.jni.functions.JNIFunctions.ExceptionDescribe(JNIFunctions.java:759)
    at com.oracle.svm.core.code.IsolateEnterStub.JNIFunctions_ExceptionDescribe_b5412f7570bccae90b000bc37855f00408b2ad73(generated:0)

com.oracle.svm.core.util.UserError$UserException: Unsupported features in 2 methods
Detailed message:
Error: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved type during parsing: com.google.common.collect.ImmutableMap. To diagnose the issue you can use the --allow-incomplete-classpath option. The missing type is then reported at run time when it is accessed the first time.
Trace: 
    at parsing io.confluent.kafka.schemaregistry.client.rest.entities.ServerClusterId.<init>(ServerClusterId.java:36)
Call path from entry point to io.confluent.kafka.schemaregistry.client.rest.entities.ServerClusterId.<init>(Map): 
    at io.confluent.kafka.schemaregistry.client.rest.entities.ServerClusterId.<init>(ServerClusterId.java:35)
    at com.oracle.svm.reflect.ServerClusterId_constructor_a5bbab140ace69ca26886dee01d66bfd5e2eebc5_1061.newInstance(Unknown Source)
    at java.base@11.0.8/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
    at io.quarkus.avro.graal.Target_org_apache_avro_reflect_ReflectionUtil$1.apply(AvroSubstitutions.java:30)
    at platform/jdk.crypto.ec@11.0.8/sun.security.ec.XECParameters$1.get(XECParameters.java:183)
    at app//com.oracle.svm.core.jdk.SystemPropertiesSupport.initializeLazyValue(SystemPropertiesSupport.java:190)
    at app//com.oracle.svm.core.jdk.SystemPropertiesSupport.getProperty(SystemPropertiesSupport.java:143)
    at app//com.oracle.svm.core.jdk.Target_java_lang_System.getProperty(JavaLangSubstitutions.java:347)
    at com.oracle.svm.jni.JNIJavaCallWrappers.jniInvoke_VARARGS:Ljava_lang_System_2_0002egetProperty_00028Ljava_lang_String_2_00029Ljava_lang_String_2(generated:0)
Error: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved type during parsing: com.google.common.collect.ImmutableMap. To diagnose the issue you can use the --allow-incomplete-classpath option. The missing type is then reported at run time when it is accessed the first time.
Trace: 
    at parsing io.confluent.kafka.schemaregistry.client.rest.entities.ServerClusterId.of(ServerClusterId.java:50)
Call path from entry point to io.confluent.kafka.schemaregistry.client.rest.entities.ServerClusterId.of(String, String): 
    at io.confluent.kafka.schemaregistry.client.rest.entities.ServerClusterId.of(ServerClusterId.java:48)
    at com.oracle.svm.reflect.ServerClusterId_of_a56ede952818d2acc44798a31b504a0a499ac22b_1057.invoke(Unknown Source)
    at java.base@11.0.8/java.lang.reflect.Method.invoke(Method.java:566)
    at org.jboss.resteasy.core.ContextParameterInjector$GenericDelegatingProxy.invoke(ContextParameterInjector.java:122)
    at com.sun.proxy.$Proxy257.toString(Unknown Source)
    at java.base@11.0.8/java.lang.String.valueOf(String.java:2951)
    at java.base@11.0.8/java.io.PrintStream.print(PrintStream.java:745)
    at java.base@11.0.8/java.io.PrintStream.println(PrintStream.java:882)
    at app//com.oracle.svm.jni.functions.JNIFunctions.ExceptionDescribe(JNIFunctions.java:759)
    at com.oracle.svm.core.code.IsolateEnterStub.JNIFunctions_ExceptionDescribe_b5412f7570bccae90b000bc37855f00408b2ad73(generated:0)

    at com.oracle.svm.core.util.UserError.abort(UserError.java:79)
    at com.oracle.svm.hosted.FallbackFeature.reportAsFallback(FallbackFeature.java:217)
    at com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:753)
    at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:538)
    at com.oracle.svm.hosted.NativeImageGenerator.lambda$run$0(NativeImageGenerator.java:451)
    at java.base/java.util.concurrent.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1407)
    at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
    at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
    at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
    at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
    at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
Caused by: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: Unsupported features in 2 methods
Detailed message:
Error: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved type during parsing: com.google.common.collect.ImmutableMap. To diagnose the issue you can use the --allow-incomplete-classpath option. The missing type is then reported at run time when it is accessed the first time.
Trace: 
    at parsing io.confluent.kafka.schemaregistry.client.rest.entities.ServerClusterId.<init>(ServerClusterId.java:36)
Call path from entry point to io.confluent.kafka.schemaregistry.client.rest.entities.ServerClusterId.<init>(Map): 
    at io.confluent.kafka.schemaregistry.client.rest.entities.ServerClusterId.<init>(ServerClusterId.java:35)
    at com.oracle.svm.reflect.ServerClusterId_constructor_a5bbab140ace69ca26886dee01d66bfd5e2eebc5_1061.newInstance(Unknown Source)
    at java.base@11.0.8/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
    at io.quarkus.avro.graal.Target_org_apache_avro_reflect_ReflectionUtil$1.apply(AvroSubstitutions.java:30)
    at platform/jdk.crypto.ec@11.0.8/sun.security.ec.XECParameters$1.get(XECParameters.java:183)
    at app//com.oracle.svm.core.jdk.SystemPropertiesSupport.initializeLazyValue(SystemPropertiesSupport.java:190)
    at app//com.oracle.svm.core.jdk.SystemPropertiesSupport.getProperty(SystemPropertiesSupport.java:143)
    at app//com.oracle.svm.core.jdk.Target_java_lang_System.getProperty(JavaLangSubstitutions.java:347)
    at com.oracle.svm.jni.JNIJavaCallWrappers.jniInvoke_VARARGS:Ljava_lang_System_2_0002egetProperty_00028Ljava_lang_String_2_00029Ljava_lang_String_2(generated:0)
Error: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved type during parsing: com.google.common.collect.ImmutableMap. To diagnose the issue you can use the --allow-incomplete-classpath option. The missing type is then reported at run time when it is accessed the first time.
Trace: 
    at parsing io.confluent.kafka.schemaregistry.client.rest.entities.ServerClusterId.of(ServerClusterId.java:50)
Call path from entry point to io.confluent.kafka.schemaregistry.client.rest.entities.ServerClusterId.of(String, String): 
    at io.confluent.kafka.schemaregistry.client.rest.entities.ServerClusterId.of(ServerClusterId.java:48)
    at com.oracle.svm.reflect.ServerClusterId_of_a56ede952818d2acc44798a31b504a0a499ac22b_1057.invoke(Unknown Source)
    at java.base@11.0.8/java.lang.reflect.Method.invoke(Method.java:566)
    at org.jboss.resteasy.core.ContextParameterInjector$GenericDelegatingProxy.invoke(ContextParameterInjector.java:122)
    at com.sun.proxy.$Proxy257.toString(Unknown Source)
    at java.base@11.0.8/java.lang.String.valueOf(String.java:2951)
    at java.base@11.0.8/java.io.PrintStream.print(PrintStream.java:745)
    at java.base@11.0.8/java.io.PrintStream.println(PrintStream.java:882)
    at app//com.oracle.svm.jni.functions.JNIFunctions.ExceptionDescribe(JNIFunctions.java:759)
    at com.oracle.svm.core.code.IsolateEnterStub.JNIFunctions_ExceptionDescribe_b5412f7570bccae90b000bc37855f00408b2ad73(generated:0)

    at com.oracle.graal.pointsto.constraints.UnsupportedFeatures.report(UnsupportedFeatures.java:129)
    at com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:750)
    ... 8 more
Error: Image build request failed with exit status 1

To Reproduce

git clone https://github.com/quarkusio/quarkus.git
cd quarkus/
git fetch --tags
git checkout 1.9.0.CR1
./mvnw clean install -DskipTests && ./mvnw verify -f integration-tests/pom.xml --fail-at-end \
-pl 'kafka-avro' -Dno-format -Ddocker -Dnative -Dquarkus.native.container-build=true \
-Dquarkus.native.builder-image=registry.redhat.io/quarkus/mandrel-20-rhel8:20.1-12

Environment (please complete the following information):

geoand commented 1 month ago

Is this still an issue?

geoand commented 1 month ago

Closing for lack of feedback