-
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
Quarkus static image building with AWT #36026
Comments
cc @Karm |
Ok, i managed to get my backend service working with AWT and static image building without relying on quarkus AWT extension, as this was messing with the static image. I am not using visual awt features as i need awt only for pdfbox. Thats what i did:
Thats it, now PDFbox and awt work for me in the backend service to generate pdf files without relying on quarkus-awt. |
Hello @antonwiens, the problem with not doing things in https://github.com/quarkusio/quarkus/blob/main/extensions/awt/deployment/src/main/java/io/quarkus/awt/deployment/AwtProcessor.java is that it could blow up at runtime if you deal with unexpected data that, e.g. trigger an exception that is instantiated from JNI. So while your workaround might work, it could be dangerous. Ad files: As per GraalVM's decision, graphics related libs are not statically linked any more. Quarkus deals with that by packing them next to the created executable for you. The result is that where you copied 1 file, you have to copy libs as well now, e.g. |
Closing it as this is a proverbial "feature, not a bug". I will try to find a place where to note the fact about the libs better. |
Hi, i have a lot of integrationtests for everything, and in the statically linked native image everything works fine, without copying any libs to the application image. But thanks for your explanation. |
Description
Hello Quarkus Team,
i just migrated from Quarkus 2 to Quarkus 3 and have problems regarding AWT, as you may have seen from other issues i reported on the Quarkus AWT extension. But now i am a bit lost on the topic of static image building regarding AWT.
On Quarkus 2 a statically linked native image was easily built even using AWT and our service runs fine with it. But with the upgrade to Quarkus 3 and the new GRAALVM version, it seems that the static image is not statically linked against AWT anymore.
My statically linked native image with AWT Extension is building fine, but during runtime i get the following error:
Since i dont know if this is a bug, my fault in doing something wrong or i have to do something else, i would really appreciate if you could add some documentation on the AWT extension regarding required .so or .dll files i have to put into the runtime container if i have an statically linked native image. Usually i have a scratch docker container where i put my application and it runs standalone with some config files. But now i don`t know what to exactly put in, to get it running again.
Could you please help me / add more documentation to it?
Implementation ideas
No response
The text was updated successfully, but these errors were encountered: