-
Notifications
You must be signed in to change notification settings - Fork 118
Unable to create native app with Easy RAG on MacOs (and Windows?) #1490
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@edeandrea have you seen this recently? |
To be honest I haven't, but I also don't think I've tried this exact same thing. Is there a reproducer? If so, I can try it. |
@edeandrea if it helps I can create an project to reproduce the issue. |
That would be helpful. |
@edeandrea here is the reproducer: https://github.com/philippart-s/quarkus-easy-rag-issue/tree/main
|
Thanks @philippart-s! @geoand I see the same issue on my mac. |
Thanks for checking. @zakkak is this a known issue? |
@geoand I can even reproduce in some of my other projects that use OpenAI, so its unrelated to mistral... It's also unrelated to Quarkus langchain4j - using Quarkus Langchain4j 0.26.2 is ok. Seems to have broken starting with Quarkus 3.21.3. It works fine with Quarkus 3.21.2 |
@philippart-s if you downgrade the Quarkus version to |
@edeandrea if I downgrade to [WARNING] [io.quarkus.deployment.configuration] Configuration property 'quarkus.package.type' has been deprecated and replaced by: [quarkus.package.jar.enabled, quarkus.package.jar.type, quarkus.native.enabled, quarkus.native.sources-only]
[INFO] [io.quarkus.deployment.pkg.steps.JarResultBuildStep] Building native image source jar: /Users/sphilipp/Developments/quarkus-easy-rag-issue/target/easy-rag-issue-0.0.1-SNAPSHOT-native-image-source-jar/easy-rag-issue-0.0.1-SNAPSHOT-runner.jar
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] Building native image from /Users/sphilipp/Developments/quarkus-easy-rag-issue/target/easy-rag-issue-0.0.1-SNAPSHOT-native-image-source-jar/easy-rag-issue-0.0.1-SNAPSHOT-runner.jar
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] Running Quarkus native-image plugin on GRAALVM 23.1 JDK 21.0.6+8-LTS-jvmci-23.1-b55
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildRunner] /Users/sphilipp/.sdkman/candidates/java/21.0.6-graal/bin/native-image -J-Dsun.nio.ch.maxUpdateArraySize=100 -J-Dlogging.initial-configurator.min-level=500 -J-Djava.util.logging.manager=org.jboss.logmanager.LogManager -J-Duser.language=en -J-Duser.country=FR -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 -H:+UnlockExperimentalVMOptions -H:IncludeLocales=en-FR -H:-UnlockExperimentalVMOptions -J-Dfile.encoding=UTF-8 -J--add-exports=org.graalvm.nativeimage.builder/com.oracle.svm.core.jdk=ALL-UNNAMED --features=io.quarkus.awt.runtime.graal.DarwinAwtFeature,io.quarkus.awt.runtime.graal.AwtFeature,io.quarkus.runner.Feature,io.quarkus.runtime.graal.DisableLoggingFeature,io.quarkiverse.poi.runtime.graal.POIFeature,io.quarkus.runtime.graal.SkipConsoleServiceProvidersFeature -J--add-exports=java.security.jgss/sun.security.krb5=ALL-UNNAMED -J--add-exports=java.security.jgss/sun.security.jgss=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:+UnlockExperimentalVMOptions -H:BuildOutputJSONFile=easy-rag-issue-0.0.1-SNAPSHOT-runner-build-output-stats.json -H:-UnlockExperimentalVMOptions -H:+UnlockExperimentalVMOptions -H:+GenerateBuildArtifactsFile -H:-UnlockExperimentalVMOptions --strict-image-heap -H:+UnlockExperimentalVMOptions -H:+AllowFoldMethods -H:-UnlockExperimentalVMOptions -J-Djava.awt.headless=true --no-fallback --link-at-build-time -H:+UnlockExperimentalVMOptions -H:+ReportExceptionStackTraces -H:-UnlockExperimentalVMOptions -H:+AddAllCharsets --enable-url-protocols=http,https --enable-monitoring=heapdump -H:+UnlockExperimentalVMOptions -H:-UseServiceLoaderFeature -H:-UnlockExperimentalVMOptions -J--add-exports=org.graalvm.nativeimage/org.graalvm.nativeimage.impl=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 easy-rag-issue-0.0.1-SNAPSHOT-runner -jar easy-rag-issue-0.0.1-SNAPSHOT-runner.jar
Warning: The option '-H:ReflectionConfigurationResources=META-INF/native-image/ai/djl/api/reflect-config.json' is experimental and must be enabled via '-H:+UnlockExperimentalVMOptions' in the future.
Warning: The option '-H:ResourceConfigurationResources=META-INF/native-image/ai/djl/api/resource-config.json' is experimental and must be enabled via '-H:+UnlockExperimentalVMOptions' in the future.
Warning: Please re-evaluate whether any experimental option is required, and either remove or unlock it. The build output lists all active experimental options, including where they come from and possible alternatives. If you think an experimental option should be considered as stable, please file an issue.
Error: Class-path entry file:///Users/sphilipp/Developments/quarkus-easy-rag-issue/target/easy-rag-issue-0.0.1-SNAPSHOT-native-image-source-jar/lib/com.microsoft.onnxruntime.onnxruntime-1.20.0.jar contains class ai.onnxruntime.ValueInfo. This class is part of the image builder itself (in file:///Users/sphilipp/.sdkman/candidates/java/21.0.6-graal/lib/svm/builder/svm-enterprise.jar) and must not be passed via -cp. This can be caused by a fat-jar that illegally includes svm.jar (or graal-sdk.jar) due to its build-time dependency on it. As a workaround, -H:+AllowDeprecatedBuilderClassesOnImageClasspath allows turning this error into a warning. Note that this option is deprecated and will be removed in a future version.
com.oracle.svm.core.util.UserError$UserException: Class-path entry file:///Users/sphilipp/Developments/quarkus-easy-rag-issue/target/easy-rag-issue-0.0.1-SNAPSHOT-native-image-source-jar/lib/com.microsoft.onnxruntime.onnxruntime-1.20.0.jar contains class ai.onnxruntime.ValueInfo. This class is part of the image builder itself (in file:///Users/sphilipp/.sdkman/candidates/java/21.0.6-graal/lib/svm/builder/svm-enterprise.jar) and must not be passed via -cp. This can be caused by a fat-jar that illegally includes svm.jar (or graal-sdk.jar) due to its build-time dependency on it. As a workaround, -H:+AllowDeprecatedBuilderClassesOnImageClasspath allows turning this error into a warning. Note that this option is deprecated and will be removed in a future version.
at org.graalvm.nativeimage.builder/com.oracle.svm.core.util.UserError.abort(UserError.java:75)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageClassLoaderSupport.reportBuilderClassesInApplication(NativeImageClassLoaderSupport.java:858)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.ImageClassLoader.loadAllClasses(ImageClassLoader.java:105)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.buildImage(NativeImageGeneratorRunner.java:386)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.build(NativeImageGeneratorRunner.java:721)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.start(NativeImageGeneratorRunner.java:143)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.main(NativeImageGeneratorRunner.java:98)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.916 s
[INFO] Finished at: 2025-05-14T17:01:29+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.quarkus.platform:quarkus-maven-plugin:3.21.2:build (default) on project easy-rag-issue: Failed to build quarkus application: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[ERROR] [error]: Build step io.quarkus.deployment.pkg.steps.NativeImageBuildStep#build threw an exception: io.quarkus.deployment.pkg.steps.NativeImageBuildStep$ImageGenerationFailureException: Image generation failed. Exit code: 1
[ERROR] at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.imageGenerationFailed(NativeImageBuildStep.java:496)
[ERROR] at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.build(NativeImageBuildStep.java:287)
[ERROR] at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:733)
[ERROR] at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:856)
[ERROR] at io.quarkus.builder.BuildContext.run(BuildContext.java:255)
[ERROR] at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor$Task.doRunWith(EnhancedQueueExecutor.java:2675)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2654)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor.runThreadBody(EnhancedQueueExecutor.java:1627)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1594)
[ERROR] at java.base/java.lang.Thread.run(Thread.java:1583)
[ERROR] at org.jboss.threads.JBossThread.run(JBossThread.java:499)
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException |
Thats interesting because it builds fine on my machine :) |
Actually - update the version of |
Actually a minute or 2 after I get this:
|
If I set the version of
|
are you doing a Weird that we're both getting errors, but different ones. In any event, something is broken. |
AFAIK yes, see oracle/graal#4124 The fact that it only pops up on specific versions though is an indication that something is bringing AWT in some cases but not in others. |
👍🏽 |
Hi, I've created a version without the Easy RAG extension (the code is available here: https://github.com/philippart-s/quarkus-easy-rag-issue/tree/rag-without-easyrag). Error: Unsupported features in 2 methods
Detailed message:
Error: Discovered unresolved type during parsing: kotlinx.coroutines.CancellableContinuationImpl. This error is reported at image build time because class retrofit2.KotlinExtensions is registered for linking at image build time by command line and command line.
Error encountered while parsing retrofit2.HttpServiceMethod$SuspendForBody.adapt(HttpServiceMethod.java:215)
Parsing context:
at retrofit2.HttpServiceMethod.invoke(HttpServiceMethod.java:146)
at retrofit2.Retrofit$1.invoke(Retrofit.java:160)
at jdk.proxy4.$Proxy90.converter(Unknown Source)
at root method.(Unknown Source)
Error: Discovered unresolved type during parsing: kotlinx.coroutines.CancellableContinuationImpl. This error is reported at image build time because class retrofit2.KotlinExtensions is registered for linking at image build time by command line and command line.
Error encountered while parsing retrofit2.HttpServiceMethod$SuspendForResponse.adapt(HttpServiceMethod.java:183)
Parsing context:
at retrofit2.HttpServiceMethod.invoke(HttpServiceMethod.java:146)
at retrofit2.Retrofit$1.invoke(Retrofit.java:160)
at jdk.proxy4.$Proxy90.converter(Unknown Source)
at root method.(Unknown Source)
com.oracle.svm.core.util.UserError$UserException: Unsupported features in 2 methods
Detailed message:
Error: Discovered unresolved type during parsing: kotlinx.coroutines.CancellableContinuationImpl. This error is reported at image build time because class retrofit2.KotlinExtensions is registered for linking at image build time by command line and command line.
Error encountered while parsing retrofit2.HttpServiceMethod$SuspendForBody.adapt(HttpServiceMethod.java:215)
Parsing context:
at retrofit2.HttpServiceMethod.invoke(HttpServiceMethod.java:146)
at retrofit2.Retrofit$1.invoke(Retrofit.java:160)
at jdk.proxy4.$Proxy90.converter(Unknown Source)
at root method.(Unknown Source)
Error: Discovered unresolved type during parsing: kotlinx.coroutines.CancellableContinuationImpl. This error is reported at image build time because class retrofit2.KotlinExtensions is registered for linking at image build time by command line and command line.
Error encountered while parsing retrofit2.HttpServiceMethod$SuspendForResponse.adapt(HttpServiceMethod.java:183)
Parsing context:
at retrofit2.HttpServiceMethod.invoke(HttpServiceMethod.java:146)
at retrofit2.Retrofit$1.invoke(Retrofit.java:160)
at jdk.proxy4.$Proxy90.converter(Unknown Source)
at root method.(Unknown Source)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.util.UserError.abort(UserError.java:87)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.FallbackFeature.reportAsFallback(FallbackFeature.java:248)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:815)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:593)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.run(NativeImageGenerator.java:551)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.buildImage(NativeImageGeneratorRunner.java:539)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.build(NativeImageGeneratorRunner.java:721)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.start(NativeImageGeneratorRunner.java:143)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.main(NativeImageGeneratorRunner.java:98)
Caused by: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: Unsupported features in 2 methods
Detailed message:
Error: Discovered unresolved type during parsing: kotlinx.coroutines.CancellableContinuationImpl. This error is reported at image build time because class retrofit2.KotlinExtensions is registered for linking at image build time by command line and command line.
Error encountered while parsing retrofit2.HttpServiceMethod$SuspendForBody.adapt(HttpServiceMethod.java:215)
Parsing context:
at retrofit2.HttpServiceMethod.invoke(HttpServiceMethod.java:146)
at retrofit2.Retrofit$1.invoke(Retrofit.java:160)
at jdk.proxy4.$Proxy90.converter(Unknown Source)
at root method.(Unknown Source)
Error: Discovered unresolved type during parsing: kotlinx.coroutines.CancellableContinuationImpl. This error is reported at image build time because class retrofit2.KotlinExtensions is registered for linking at image build time by command line and command line.
Error encountered while parsing retrofit2.HttpServiceMethod$SuspendForResponse.adapt(HttpServiceMethod.java:183)
Parsing context:
at retrofit2.HttpServiceMethod.invoke(HttpServiceMethod.java:146)
at retrofit2.Retrofit$1.invoke(Retrofit.java:160)
at jdk.proxy4.$Proxy90.converter(Unknown Source)
at root method.(Unknown Source)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.constraints.UnsupportedFeatures.report(UnsupportedFeatures.java:129)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:810)
... 6 more
|
That error is almost certainly a result of |
yes you right, it was a wild goose chase. |
Hi,
I'm trying to create a native application with Easy RAG feature but I have the following error:
I have checked the closed issue #644 but I think it's not the same issue.
It sounds like a MacOs issue, but do you know a way to make it work?
Thanks
The text was updated successfully, but these errors were encountered: