-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
[native] 1.13.0.Final Fails To Build Native Image #16139
Comments
/cc @evanchooly |
cc @cescoffier |
So first, it's a bad idea to follow the comment you pointed out. Can you give us the errors you have first? And then, are you using a Netty version that is not the one we have in Quarkus? Because it looks a lot like a dependency problem. Can you confirm you are using our BOM and Netty is version |
Yes, double-check your netty version. I got the same issue when we bumped Netty (in the 2.x branch), so there is a good chance you are not using the right version. Do not update the netty version - or you will see plenty of these. |
Thanks for the quick replies. Here is the error that I have if I don't add
It's indeed caused by Netty version. I have
I tried adding a simple hack to Gradle and it did compile successfully, but yet I still have to add the 2 dependencies above to solve the first issue.
|
You need to enforce our BOM. I don't remember how it's done in the Gradle world but if you generate a project using our tools, you'll see. |
And any chance you could prepare a small project reproducing the |
Enforcing the BOM did resolve the Netty version problem. Thanks for that. Here is the project that has missing Also i'm building using |
OK thanks I'll try to have a look. |
I was able to reproduce it with your sample project. @zakkak do you have any idea what's triggering this:
It looks like something is trying to delete |
TLDRThis is happening because
This essentially enables the IMO How I debugged thisFor the curious and for future reference I describe the process i followed to debug this. Examining the stack trace I visited line 512 in So it looks like
Running
As we can see there is no
We now see So inspecting the META-INF of the jar files we see that |
As described in oracle/graal#1725 (comment) this option is not meant to be used in production and under certain circumstances it may cause oracle/graal#1725 to appear as in quarkusio/quarkus#16139.
As described in oracle/graal#1725 (comment) this option is not meant to be used in production and under certain circumstances it may cause oracle/graal#1725 to appear as in quarkusio/quarkus#16139.
Thanks for the insights, I really appreciate that. I also have another problem that I don't actually know if it's related to the hack that I did or the argument in AWS SDK. So when I added the 2 dependencies I mentioned before, I can successfully build the native image, but I got this exception when running it in AWS Lambda
I use API Gateway to proxy the request to a AWS Lambda function, which is a quarkus application. |
Didn't @galderz mention somewhere that we can remove / disable GraalVM flags at will? |
@geoand yes that would be oracle/graal#3179. This will probably land in GraalVM 21.2.0 though (expected on Jul 20 2021). |
I see, thanks! |
hey @vu-bui, if your using REST APIs on your API Gateway, replace the following dependency: |
Thanks @florianRieb. This new package was introduced in |
From what I can see here, it'll already be available as part of 21.1. |
Describe the bug
I got into a problem building native image after upgrading to
1.13.0
saying that it could not find some classes. I fixed it by following this comment and got into another problem that I haven't found any solution. Here is the error log that I gotThis does not happen when I switch back to
1.11.6
and1.12.x
has this problem #15801.Environment (please complete the following information):
Output of
uname -a
orver
Output of
java -version
GraalVM version (if different from Java)
Quarkus version or git rev
Build tool (ie. output of
mvnw --version
orgradlew --version
)The text was updated successfully, but these errors were encountered: