-
Notifications
You must be signed in to change notification settings - Fork 51
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
Quarkus 3.2.2 native compiler fails on AWS S3 library #857
Comments
@gquintana Did you exclude explicitely |
Repro with
|
Nope. But quarkus-amazon-s3 does not pull aws-crt (only crt-core)
I confirm your fix #858 works for us |
@scrocquesel Here is the reproducer quarkusio/quarkus-quickstarts@main...gquintana:quarkus-quickstarts:repro-gh-857 |
@gquintana 2.4.2 is available. |
@scrocquesel I have just integrated 2.4.2, and I have different problem now:
I am sorry |
Is it reproductible with the quick start ? |
I'll do some more testing but seems to be related to GraalVM:
|
Thanks for the info |
I can not reproduce it locally, it occurs only Gitlab CI runner, I need to find what the real difference is.
|
If you use The default mandrel flavor uses I tested both and it passed. |
Same problem here when i use quarkus 3.3.1 and a higher version then 2.3.2. With version 2.3.2 is working |
Should not make a difference but Quarkus 3.3.x should be aligned with 2.5.x. I just tested with those version (3.3.1/2.5.0) and it passed.
@argenstijn which version of |
Below my specs: docker of native image: quay.io/quarkus/ubi-quarkus-graalvmce-builder-image:22.3.3-java17 Ps. it works when i add the dependency below:
Below all my dependencies: `
|
I have the same problem with building a native image. But the error is now different with version 2.4.5:
I guess this happens because a CRT class I guess a fix would be removing the CRT_PAUSE_RESUME_TOKEN static field if CRT dependencies are not in the classpath. |
From my testing with quarkus amazon services 2.4.1-2.4.3 and native compilation, there are 2 solutions:
I don't have any problem since I upgraded to Mandrel 23 |
You should be using GraalVM 23.0.0 with Quarkus 3.2. With 3.2.5.Final / 2.4.5, if you do ./mvnw clean package -Dquarkus.package.type=native-sources -Dquarkus.native.container-build=true -DskipTests
cat target/native-sources/graalvm.version && echo
cat target/native-sources/native-builder.image && echo
echo --
docker run --rm $(cat target/native-sources/native-builder.image) native-image --version You'll get
I'll recommend reading https://quarkus.io/guides/building-native-image#separating-java-and-native-image-compilation if you want some tips to keep up to date with the recommended graalvm version and docker image. |
Closing as it should work with the correct version of graalvm. Reopen if you still have some issue. |
Hello, bringing back this issue.
And when creating a native image I'm still facing this error:
I track this to be related with this issue and the way I could solve it was by adding the |
@trico-tillster Please open a new issue with your |
@trico-tillster did you work out what caused this ? I'm seeing the exact same error message and haven't worked out what the underlying cause is. I can work around this by adding the same dependency but that's not ideal for me and I'd rather avoid that. |
@nigelspowage Could you provide a small repro ? |
@scrocquesel I think I'm going to struggle to create a small repo of this as I'm seeing this as part of a pretty large project. If it helps at all my pom.xml includes the following:
Noting on your prior comment that
I added the following dependency
and this removed the error. However, I'm now seeing the following error when building a graal native build.
I would be grateful if this gives you any clues or hints to what might be wrong. |
Do you have any AWS SDK artifact in your pom XML ? |
You should only use quarkus bom or quarkus platform bom but not both. See the main readme for when to use or the other. |
Thanks, I thought I'd read the main readme but I must have missed that bit. I'll check it again. Yes to AWS SDK artifacts.
|
A few questions. Why are you adding so many aws dependencies ? So in your case, regarding aws sdk, your pom should be as simple as <properties>
<quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
<quarkus.platform.group-id>io.quarkus.platform</quarkus.platform.group-id>
<quarkus.platform.version>3.17.2</quarkus.platform.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>${quarkus.platform.group-id}</groupId>
<artifactId>${quarkus.platform.artifact-id}</artifactId>
<version>${quarkus.platform.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>${quarkus.platform.group-id}</groupId>
<artifactId>quarkus-amazon-services-bom</artifactId>
<version>${quarkus.platform.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>io.quarkiverse.amazonservices</groupId>
<artifactId>quarkus-amazon-s3</artifactId>
</dependency>
<dependency>
<groupId>io.quarkiverse.amazonservices</groupId>
<artifactId>quarkus-amazon-secretsmanager</artifactId>
</dependency>
<dependency>
<groupId>io.quarkiverse.amazonservices</groupId>
<artifactId>quarkus-amazon-sqs</artifactId>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>url-connection-client</artifactId>
</dependency>
</dependencies> In such a case your are not importing Line 39 in 274b2b7
But it should be the case only, if you are injecting an AsyncClient and you are not using the CRT async http client implementation. In this case, netty client implementation is used and as it is not in the dependency list, build should fail earlier with "Missing 'software.amazon.awssdk:netty-nio-client' dependency on the classpath |
Hi, thanks for your response. In answer to your questions:
There are project rules in place that require all dependencies to be specified and not to use wildcards. It's not something I can change for this project so it makes the pom.xml files quite wordy.
Yes, I'm using url-connection-client.
I'm building using the container image build via maven, using the following settings:
The output when compiling is as follows:
I have removed the reference to the quarkus bom leaving the quarkus platform bom, and added the quarkiverse dependencies you've noted but the same netty dependency error still occurs on the native build. |
Attach the full native build log. |
build.log |
Unfortunately not. I suspect one of the other extension you use to instrospect every types. Nonetheless, I'm working on a big refactor that should help in this case. |
Discussed in quarkusio/quarkus#35004
Originally posted by gquintana July 25, 2023
After upgrading from Quarkus 3.1.3.Final to 3.2.2.Final
and quarkus-amazon-services-bom 2.3.2 (io.quarkiverse.amazonservices) to 3.2.2.Final (io.quarkus.platform)
and same aws sdk 2.20.90,
GraalVM native compilation fails on AWS S3 code
Can you tell me where I am wrong?
The text was updated successfully, but these errors were encountered: