Closed fedinskiy closed 1 year ago
/cc @EricWittmann (openapi), @Ladicek (smallrye), @MikeEdgar (openapi), @jmartisk (smallrye), @phillip-kruger (openapi,smallrye), @radcortez (smallrye)
@zakkak @galderz any idea what this error actually means?
@fedinskiy I tried reproducing the issue with no luck.
Note that mvn clean verify -Dnative -Dquarkus.platform.version=2.16.1.Final -Pfail
fails before the native image generation with:
2023-02-06 13:44:00,186 INFO [🐳 .3.4]] (build-42) Container testcontainers/ryuk:0.3.4 is starting: e1e6479a765b408826058df5e9be5ed9a20ca9723ab382e6488099fe1e1d54c7
2023-02-06 13:44:00,969 ERROR [🐳 .3.4]] (build-42) Could not start container: com.github.dockerjava.api.exception.NotFoundException: Status 404: {"message":"No such container: e1e6479a765b408826058df5e9be5ed9a20ca9723ab382e6488099fe1e1d54c7"}
at org.testcontainers.shaded.com.github.dockerjava.core.DefaultInvocationBuilder.execute(DefaultInvocationBuilder.java:241)
at org.testcontainers.shaded.com.github.dockerjava.core.DefaultInvocationBuilder.get(DefaultInvocationBuilder.java:202)
at org.testcontainers.shaded.com.github.dockerjava.core.DefaultInvocationBuilder.get(DefaultInvocationBuilder.java:74)
at org.testcontainers.shaded.com.github.dockerjava.core.exec.InspectContainerCmdExec.execute(InspectContainerCmdExec.java:31)
at org.testcontainers.shaded.com.github.dockerjava.core.exec.InspectContainerCmdExec.execute(InspectContainerCmdExec.java:13)
at org.testcontainers.shaded.com.github.dockerjava.core.exec.AbstrSyncDockerCmdExec.exec(AbstrSyncDockerCmdExec.java:21)
at org.testcontainers.shaded.com.github.dockerjava.core.command.AbstrDockerCmd.exec(AbstrDockerCmd.java:35)
at org.testcontainers.shaded.com.github.dockerjava.core.command.InspectContainerCmdImpl.exec(InspectContainerCmdImpl.java:52)
at org.testcontainers.containers.GenericContainer.lambda$tryStart$1(GenericContainer.java:456)
at org.testcontainers.shaded.org.awaitility.core.AbstractHamcrestCondition.lambda$new$0(AbstractHamcrestCondition.java:48)
at org.testcontainers.shaded.org.awaitility.core.ConditionAwaiter$ConditionPoller.call(ConditionAwaiter.java:248)
at org.testcontainers.shaded.org.awaitility.core.ConditionAwaiter$ConditionPoller.call(ConditionAwaiter.java:235)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at org.testcontainers.shaded.org.awaitility.core.SameThreadExecutorService.execute(SameThreadExecutorService.java:79)
at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:145)
at org.testcontainers.shaded.org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:101)
at org.testcontainers.shaded.org.awaitility.core.AbstractHamcrestCondition.await(AbstractHamcrestCondition.java:86)
at org.testcontainers.shaded.org.awaitility.core.ConditionFactory.until(ConditionFactory.java:985)
at org.testcontainers.shaded.org.awaitility.core.ConditionFactory.until(ConditionFactory.java:691)
at org.testcontainers.shaded.org.awaitility.core.ConditionFactory.until(ConditionFactory.java:708)
at org.testcontainers.containers.GenericContainer.tryStart(GenericContainer.java:455)
at org.testcontainers.containers.GenericContainer.lambda$doStart$0(GenericContainer.java:344)
at org.rnorth.ducttape.unreliables.Unreliables.retryUntilSuccess(Unreliables.java:81)
at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:334)
at org.testcontainers.containers.GenericContainer.start(GenericContainer.java:322)
at org.testcontainers.utility.RyukResourceReaper.maybeStart(RyukResourceReaper.java:78)
at org.testcontainers.utility.RyukResourceReaper.register(RyukResourceReaper.java:68)
at org.testcontainers.containers.GenericContainer.tryStart(GenericContainer.java:423)
at org.testcontainers.containers.GenericContainer.lambda$doStart$0(GenericContainer.java:344)
at org.rnorth.ducttape.unreliables.Unreliables.retryUntilSuccess(Unreliables.java:81)
at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:334)
at org.testcontainers.containers.GenericContainer.start(GenericContainer.java:322)
at io.quarkus.devservices.postgresql.deployment.PostgresqlDevServicesProcessor$1.startDatabase(PostgresqlDevServicesProcessor.java:64)
at io.quarkus.datasource.deployment.devservices.DevServicesDatasourceProcessor.startDevDb(DevServicesDatasourceProcessor.java:281)
at io.quarkus.datasource.deployment.devservices.DevServicesDatasourceProcessor.launchDatabases(DevServicesDatasourceProcessor.java:136)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:909)
at io.quarkus.builder.BuildContext.run(BuildContext.java:281)
at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
at java.base/java.lang.Thread.run(Thread.java:833)
at org.jboss.threads.JBossThread.run(JBossThread.java:501)
2023-02-06 13:44:00,975 ERROR [🐳 .3.4]] (build-42) There are no stdout/stderr logs available for the failed container
2023-02-06 13:44:00,975 ERROR [🐳 .io/postgres:14]] (build-42) Could not start container: org.testcontainers.containers.ContainerLaunchException: Container startup failed
at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:349)
at org.testcontainers.containers.GenericContainer.start(GenericContainer.java:322)
at org.testcontainers.utility.RyukResourceReaper.maybeStart(RyukResourceReaper.java:78)
at org.testcontainers.utility.RyukResourceReaper.register(RyukResourceReaper.java:68)
at org.testcontainers.containers.GenericContainer.tryStart(GenericContainer.java:423)
at org.testcontainers.containers.GenericContainer.lambda$doStart$0(GenericContainer.java:344)
at org.rnorth.ducttape.unreliables.Unreliables.retryUntilSuccess(Unreliables.java:81)
at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:334)
at org.testcontainers.containers.GenericContainer.start(GenericContainer.java:322)
at io.quarkus.devservices.postgresql.deployment.PostgresqlDevServicesProcessor$1.startDatabase(PostgresqlDevServicesProcessor.java:64)
at io.quarkus.datasource.deployment.devservices.DevServicesDatasourceProcessor.startDevDb(DevServicesDatasourceProcessor.java:281)
at io.quarkus.datasource.deployment.devservices.DevServicesDatasourceProcessor.launchDatabases(DevServicesDatasourceProcessor.java:136)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:909)
at io.quarkus.builder.BuildContext.run(BuildContext.java:281)
at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
at java.base/java.lang.Thread.run(Thread.java:833)
at org.jboss.threads.JBossThread.run(JBossThread.java:501)
Caused by: org.rnorth.ducttape.RetryCountExceededException: Retry limit hit with exception
at org.rnorth.ducttape.unreliables.Unreliables.retryUntilSuccess(Unreliables.java:88)
at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:334)
... 22 more
Caused by: org.testcontainers.containers.ContainerLaunchException: Could not create/start container
at org.testcontainers.containers.GenericContainer.tryStart(GenericContainer.java:542)
at org.testcontainers.containers.GenericContainer.lambda$doStart$0(GenericContainer.java:344)
at org.rnorth.ducttape.unreliables.Unreliables.retryUntilSuccess(Unreliables.java:81)
... 23 more
Caused by: com.github.dockerjava.api.exception.NotFoundException: Status 404: {"message":"No such container: e1e6479a765b408826058df5e9be5ed9a20ca9723ab382e6488099fe1e1d54c7"}
at org.testcontainers.shaded.com.github.dockerjava.core.DefaultInvocationBuilder.execute(DefaultInvocationBuilder.java:241)
at org.testcontainers.shaded.com.github.dockerjava.core.DefaultInvocationBuilder.get(DefaultInvocationBuilder.java:202)
at org.testcontainers.shaded.com.github.dockerjava.core.DefaultInvocationBuilder.get(DefaultInvocationBuilder.java:74)
at org.testcontainers.shaded.com.github.dockerjava.core.exec.InspectContainerCmdExec.execute(InspectContainerCmdExec.java:31)
at org.testcontainers.shaded.com.github.dockerjava.core.exec.InspectContainerCmdExec.execute(InspectContainerCmdExec.java:13)
at org.testcontainers.shaded.com.github.dockerjava.core.exec.AbstrSyncDockerCmdExec.exec(AbstrSyncDockerCmdExec.java:21)
at org.testcontainers.shaded.com.github.dockerjava.core.command.AbstrDockerCmd.exec(AbstrDockerCmd.java:35)
at org.testcontainers.shaded.com.github.dockerjava.core.command.InspectContainerCmdImpl.exec(InspectContainerCmdImpl.java:52)
at org.testcontainers.containers.GenericContainer.lambda$tryStart$1(GenericContainer.java:456)
at org.testcontainers.shaded.org.awaitility.core.AbstractHamcrestCondition.lambda$new$0(AbstractHamcrestCondition.java:48)
at org.testcontainers.shaded.org.awaitility.core.ConditionAwaiter$ConditionPoller.call(ConditionAwaiter.java:248)
at org.testcontainers.shaded.org.awaitility.core.ConditionAwaiter$ConditionPoller.call(ConditionAwaiter.java:235)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at org.testcontainers.shaded.org.awaitility.core.SameThreadExecutorService.execute(SameThreadExecutorService.java:79)
at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:145)
at org.testcontainers.shaded.org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:101)
at org.testcontainers.shaded.org.awaitility.core.AbstractHamcrestCondition.await(AbstractHamcrestCondition.java:86)
at org.testcontainers.shaded.org.awaitility.core.ConditionFactory.until(ConditionFactory.java:985)
at org.testcontainers.shaded.org.awaitility.core.ConditionFactory.until(ConditionFactory.java:691)
at org.testcontainers.shaded.org.awaitility.core.ConditionFactory.until(ConditionFactory.java:708)
at org.testcontainers.containers.GenericContainer.tryStart(GenericContainer.java:455)
... 25 more
[ERROR] Tests run: 31, Failures: 0, Errors: 1, Skipped: 30, Time elapsed: 2.925 s <<< FAILURE! - in io.quarkus.ts.spring.data.di.SpringDiTest
[ERROR] beanExists{Class}[1] Time elapsed: 0.004 s <<< ERROR!
So I used mvn clean verify -DskipTests -Dnative -Dquarkus.platform.version=2.16.1.Final -Pfail
instead which successfully built the native image.
Could you please include the logs before the "Performing analysis" part as well?
e.g.:
[INFO] [io.quarkus.deployment.pkg.steps.JarResultBuildStep] Building native image source jar: /home/zakkak/code/tmp/quarkus-test-suite/spring/spring-data/target/spring-data-1.0.0-SNAPSHOT-native-image-source-jar/spring-data-1.0.0-SNAPSHOT-runner.jar
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] Building native image from /home/zakkak/code/tmp/quarkus-test-suite/spring/spring-data/target/spring-data-1.0.0-SNAPSHOT-native-image-source-jar/spring-data-1.0.0-SNAPSHOT-runner.jar
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildContainerRunner] Using docker to run the native image builder
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildContainerRunner] Checking image status quay.io/quarkus/ubi-quarkus-mandrel-builder-image:22.3-java17
22.3-java17: Pulling from quarkus/ubi-quarkus-mandrel-builder-image
Digest: sha256:e7734de2f82fc5c8fc8f26ef5b4e311f8f6e7a922ad614c0c6aaa5a4baa63d77
Status: Image is up to date for quay.io/quarkus/ubi-quarkus-mandrel-builder-image:22.3-java17
quay.io/quarkus/ubi-quarkus-mandrel-builder-image:22.3-java17
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] Running Quarkus native-image plugin on native-image 22.3.1.0-Final Mandrel Distribution (Java Version 17.0.6+10)
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildRunner] docker run --env LANG=C --rm --user 1000:1000 -v /home/zakkak/code/tmp/quarkus-test-suite/spring/spring-data/target/spring-data-1.0.0-SNAPSHOT-native-image-source-jar:/project:z --name build-native-WPuTQ quay.io/quarkus/ubi-quarkus-mandrel-builder-image:22.3-java17 -J-Djava.util.logging.manager=org.jboss.logmanager.LogManager -J-Dsun.nio.ch.maxUpdateArraySize=100 -J-DCoordinatorEnvironmentBean.transactionStatusManagerEnable=false -J-Dlogging.initial-configurator.min-level=500 -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=3 -J-Duser.language=en -J-Duser.country=IE -J-Dfile.encoding=UTF-8 --features=org.hibernate.graalvm.internal.QueryParsingSupport,io.quarkus.runner.Feature,io.quarkus.runtime.graal.ResourcesFeature,org.hibernate.graalvm.internal.GraalVMStaticFeature,io.quarkus.caffeine.runtime.graal.CacheConstructorsFeature,io.quarkus.runtime.graal.DisableLoggingFeature,io.quarkus.hibernate.validator.runtime.DisableLoggingFeature,io.quarkus.jdbc.postgresql.runtime.graal.SQLXMLFeature,io.quarkus.hibernate.orm.runtime.graal.DisableLoggingFeature -J--add-exports=java.security.jgss/sun.security.krb5=ALL-UNNAMED -J--add-opens=java.base/java.text=ALL-UNNAMED -J--add-opens=java.base/java.io=ALL-UNNAMED -J--add-opens=java.base/java.lang.invoke=ALL-UNNAMED -J--add-opens=java.base/java.util=ALL-UNNAMED -H:+CollectImageBuildStatistics -H:ImageBuildStatisticsFile=spring-data-1.0.0-SNAPSHOT-runner-timing-stats.json -H:BuildOutputJSONFile=spring-data-1.0.0-SNAPSHOT-runner-build-output-stats.json -H:+AllowFoldMethods -J-Djava.awt.headless=true --no-fallback --link-at-build-time -H:+ReportExceptionStackTraces -J-Xmx4g -H:-AddAllCharsets --enable-url-protocols=http,https -H:-UseServiceLoaderFeature -H:+StackTrace -J--add-exports=org.graalvm.sdk/org.graalvm.nativeimage.impl=ALL-UNNAMED -J--add-exports=org.graalvm.nativeimage.builder/com.oracle.svm.core.jdk=ALL-UNNAMED --exclude-config io\.netty\.netty-codec /META-INF/native-image/io\.netty/netty-codec/generated/handlers/reflect-config\.json --exclude-config io\.netty\.netty-handler /META-INF/native-image/io\.netty/netty-handler/generated/handlers/reflect-config\.json spring-data-1.0.0-SNAPSHOT-runner -jar spring-data-1.0.0-SNAPSHOT-runner.jar
========================================================================================================================
GraalVM Native Image: Generating 'spring-data-1.0.0-SNAPSHOT-runner' (executable)...
========================================================================================================================
[1/7] Initializing... (5.3s @ 0.40GB)
Version info: 'GraalVM 22.3.1.0-Final Java 17 Mandrel Distribution'
Java version info: '17.0.6+10'
C compiler: gcc (redhat, x86_64, 8.5.0)
Garbage collector: Serial GC
9 user-specific feature(s)
- io.quarkus.caffeine.runtime.graal.CacheConstructorsFeature
- io.quarkus.hibernate.orm.runtime.graal.DisableLoggingFeature: Disables INFO logging during the analysis phase for the [org.hibernate.Version, org.hibernate.annotations.common.Version, org.hibernate.dialect.Dialect] categories
- io.quarkus.hibernate.validator.runtime.DisableLoggingFeature: Disables INFO logging during the analysis phase for the [org.hibernate.validator.internal.util.Version] categories
- io.quarkus.jdbc.postgresql.runtime.graal.SQLXMLFeature
- io.quarkus.runner.Feature: Auto-generated class by Quarkus from the existing extensions
- io.quarkus.runtime.graal.DisableLoggingFeature: Disables INFO logging during the analysis phase for the [org.jboss.threads] categories
- io.quarkus.runtime.graal.ResourcesFeature: Register each line in META-INF/quarkus-native-resources.txt as a resource on Substrate VM
- org.hibernate.graalvm.internal.GraalVMStaticFeature: Hibernate ORM's static reflection registrations for GraalVM
- org.hibernate.graalvm.internal.QueryParsingSupport: Hibernate ORM's support for HQL Parser in GraalVM
Thanks
mvn clean verify -DskipTests -Dnative -Dquarkus.platform.version=2.16.1.Final -Pfail
fails for me as well
FO] --- quarkus-maven-plugin:2.16.1.Final:build (build) @ spring-data ---
[INFO] [io.quarkus.elytron.security.properties.deployment.ElytronPropertiesProcessor] Configuring from MPRealmConfig
[INFO] [org.hibernate.Version] HHH000412: Hibernate ORM core version 5.6.14.Final
[INFO] [io.quarkus.deployment.pkg.steps.JarResultBuildStep] Building native image source jar: /home/fedinskiy/code/quarkus/tests/spring/spring-data/target/spring-data-1.0.0-SNAPSHOT-native-image-source-jar/spring-data-1.0.0-SNAPSHOT-runner.jar
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] Building native image from /home/fedinskiy/code/quarkus/tests/spring/spring-data/target/spring-data-1.0.0-SNAPSHOT-native-image-source-jar/spring-data-1.0.0-SNAPSHOT-runner.jar
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildContainerRunner] Using docker to run the native image builder
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildContainerRunner] Checking image status quay.io/quarkus/ubi-quarkus-mandrel-builder-image:22.3-java17
22.3-java17: Pulling from quarkus/ubi-quarkus-mandrel-builder-image
Digest: sha256:e7734de2f82fc5c8fc8f26ef5b4e311f8f6e7a922ad614c0c6aaa5a4baa63d77
Status: Image is up to date for quay.io/quarkus/ubi-quarkus-mandrel-builder-image:22.3-java17
quay.io/quarkus/ubi-quarkus-mandrel-builder-image:22.3-java17
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] Running Quarkus native-image plugin on native-image 22.3.1.0-Final Mandrel Distribution (Java Version 17.0.6+10)
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildRunner] docker run --env LANG=C --rm --user 1000:1000 -v /home/fedinskiy/code/quarkus/tests/spring/spring-data/target/spring-data-1.0.0-SNAPSHOT-native-image-source-jar:/project:z --name build-native-pNVDt quay.io/quarkus/ubi-quarkus-mandrel-builder-image:22.3-java17 -J-Dlogging.initial-configurator.min-level=500 -J-Dsun.nio.ch.maxUpdateArraySize=100 -J-Djava.util.logging.manager=org.jboss.logmanager.LogManager -J-DCoordinatorEnvironmentBean.transactionStatusManagerEnable=false -J-Dio.netty.leakDetection.level=DISABLED -J-Dio.netty.allocator.maxOrder=3 -J-Dvertx.logger-delegate-factory-class-name=io.quarkus.vertx.core.runtime.VertxLogDelegateFactory -J-Dvertx.disableDnsResolver=true -J-Duser.language=en -J-Duser.country=GB -J-Dfile.encoding=UTF-8 --features=io.quarkus.hibernate.validator.runtime.DisableLoggingFeature,io.quarkus.caffeine.runtime.graal.CacheConstructorsFeature,org.hibernate.graalvm.internal.QueryParsingSupport,io.quarkus.runner.Feature,io.quarkus.runtime.graal.ResourcesFeature,io.quarkus.runtime.graal.DisableLoggingFeature,io.quarkus.hibernate.orm.runtime.graal.DisableLoggingFeature,io.quarkus.jdbc.postgresql.runtime.graal.SQLXMLFeature,org.hibernate.graalvm.internal.GraalVMStaticFeature -J--add-exports=java.security.jgss/sun.security.krb5=ALL-UNNAMED -J--add-opens=java.base/java.text=ALL-UNNAMED -J--add-opens=java.base/java.io=ALL-UNNAMED -J--add-opens=java.base/java.lang.invoke=ALL-UNNAMED -J--add-opens=java.base/java.util=ALL-UNNAMED -H:+CollectImageBuildStatistics -H:ImageBuildStatisticsFile=spring-data-1.0.0-SNAPSHOT-runner-timing-stats.json -H:BuildOutputJSONFile=spring-data-1.0.0-SNAPSHOT-runner-build-output-stats.json -H:+AllowFoldMethods -J-Djava.awt.headless=true --no-fallback --link-at-build-time -H:+ReportExceptionStackTraces -J-Xmx4g -H:-AddAllCharsets --enable-url-protocols=http,https -H:-UseServiceLoaderFeature -H:+StackTrace -J--add-exports=org.graalvm.sdk/org.graalvm.nativeimage.impl=ALL-UNNAMED -J--add-exports=org.graalvm.nativeimage.builder/com.oracle.svm.core.jdk=ALL-UNNAMED --exclude-config io\.netty\.netty-codec /META-INF/native-image/io\.netty/netty-codec/generated/handlers/reflect-config\.json --exclude-config io\.netty\.netty-handler /META-INF/native-image/io\.netty/netty-handler/generated/handlers/reflect-config\.json spring-data-1.0.0-SNAPSHOT-runner -jar spring-data-1.0.0-SNAPSHOT-runner.jar
========================================================================================================================
GraalVM Native Image: Generating 'spring-data-1.0.0-SNAPSHOT-runner' (executable)...
========================================================================================================================
[1/7] Initializing... (12.3s @ 0.41GB)
Version info: 'GraalVM 22.3.1.0-Final Java 17 Mandrel Distribution'
Java version info: '17.0.6+10'
C compiler: gcc (redhat, x86_64, 8.5.0)
Garbage collector: Serial GC
9 user-specific feature(s)
- io.quarkus.caffeine.runtime.graal.CacheConstructorsFeature
- io.quarkus.hibernate.orm.runtime.graal.DisableLoggingFeature: Disables INFO logging during the analysis phase for the [org.hibernate.Version, org.hibernate.annotations.common.Version, org.hibernate.dialect.Dialect] categories
- io.quarkus.hibernate.validator.runtime.DisableLoggingFeature: Disables INFO logging during the analysis phase for the [org.hibernate.validator.internal.util.Version] categories
- io.quarkus.jdbc.postgresql.runtime.graal.SQLXMLFeature
- io.quarkus.runner.Feature: Auto-generated class by Quarkus from the existing extensions
- io.quarkus.runtime.graal.DisableLoggingFeature: Disables INFO logging during the analysis phase for the [org.jboss.threads] categories
- io.quarkus.runtime.graal.ResourcesFeature: Register each line in META-INF/quarkus-native-resources.txt as a resource on Substrate VM
- org.hibernate.graalvm.internal.GraalVMStaticFeature: Hibernate ORM's static reflection registrations for GraalVM
- org.hibernate.graalvm.internal.QueryParsingSupport: Hibernate ORM's support for HQL Parser in GraalVM
Also it looks like I mistyped version of GraalVM, and it is actually 17.0.6
I finally managed to reproduce this using mvnw
.
mvn clean verify -DskipTests -Dnative -Dquarkus.platform.version=2.16.1.Final -Pfail
works
../../mvnw clean verify -DskipTests -Dnative -Dquarkus.platform.version=2.16.1.Final -Pfail
fails
Still not clear to me why though...
Also FTR, I was able to run without -DskipTests
using export TESTCONTAINERS_RYUK_DISABLED=true
as suggested in https://bugzilla.redhat.com/show_bug.cgi?id=1758227#c4
If I get this right, the issue is caused by https://github.com/quarkusio/quarkus/pull/28811/files#diff-da0096dd9784cf26970e40b6ca83158411a9c990e3e687184dd00c3590bf10b0R189
Which instead of defining the type as type = SchemaType.ARRAY
it defines it as type = "ARRAY"
, e.g:
@GET
@Path("")
@Produces({"application/json"})
@LinkResource(
entityClassName = "io.quarkus.ts.spring.data.primitivetypes.model.Cat",
rel = "list"
)
@APIResponse(
responseCode = "200",
content = {@Content(
mediaType = "application/json",
schema = @Schema(
implementation = Cat.class,
type = "ARRAY" // <============================
)
)}
)
public Response list(@QueryParam("sort") List sort, @QueryParam("namedQuery") String namedQuery) {
which should be:
@GET
@Path("")
@Produces({"application/json"})
@LinkResource(
entityClassName = "io.quarkus.ts.spring.data.primitivetypes.model.Cat",
rel = "list"
)
@APIResponse(
responseCode = "200",
content = {@Content(
mediaType = "application/json",
schema = @Schema(
implementation = Cat.class,
type = SchemaType.ARRAY // <======================================
)
)}
)
public Response list(@QueryParam("sort") List sort, @QueryParam("namedQuery") String namedQuery) {
This results in Quarkus generating methods wrongfully annotated that then fail native image compilation with the above error. Not sure why this is not happening in JVM-mode though, it doesn't seem like a native issue.
ping @Sgitario
This resource is autogenerated and as far as I remember, we could not use SchemaType.ARRAY directly, though I can try again.
However, why this is working fine in JVM and not in Native?
Is there some kind of constant folding going on?
On Mon, Feb 6, 2023, 17:58 Jose Carvajal @.***> wrote:
This resource is autogenerated and as far as I remember, we could not use SchemaType.ARRAY directly, though I can try again.
However, why this is working fine in JVM and not in Native?
— Reply to this email directly, view it on GitHub https://github.com/quarkusio/quarkus/issues/30919#issuecomment-1419318771, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABBMDP5SIIVDFKO3O6P2MW3WWENTTANCNFSM6AAAAAAUSQLMSQ . You are receiving this because you commented.Message ID: @.***>
My understanding is that this doesn't have to do with constant folding or similar optimizations, native-image
seems to trigger a check (when parsing the bytecode) that the JVM for some reason doesn't. I can have a deeper look if necessary (just let me know), but the use of a String there seems wrong to me, no matter if it's being caught or not in JVM-mode.
https://github.com/quarkusio/quarkus/pull/30940 should address this issue. I verified that now the native compilation works using the reproducer (I had to migrate the javax packages to jakarta but that's expected for 999-SNAPSHOT).
Describe the bug
I have an application, which uses
quarkus-smallrye-openapi
dependency. The application works flawlessly in JVM mode, but fails duringPerforming analysis
phase in Native mode. Experimenting shows, that the app fails simply when that dependency is included in pom.Expected behavior
App should work in both JVM and Native modes
Actual behavior
How to Reproduce?
git clone git@github.com:fedinskiy/quarkus-test-suite.git -b reproducer/openapi-failure
cd quarkus-test-suite/spring/spring-data
mvn clean verify -Dnative -Dquarkus.platform.version=2.16.1.Final -Pfail
mvn clean verify -Dnative -Dquarkus.platform.version=2.16.1.Final
— this compiles, but expectedly fails during test phase due to lack ofq/openapi
endpointOutput of
uname -a
orver
6.0.18-300.fc37.x86_64
Output of
java -version
17.0.6, vendor: GraalVM Community
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.16.1.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.8.6 (84538c9988a25aec085021c365c560670ad80f63)
Additional information
No response