You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (Jira)" <ji...@apache.org> on 2026/07/02 03:38:00 UTC

[jira] [Updated] (PDFBOX-6214) PDDocument static AWT warm-up fails hard when AWT native libs are unavailable (GraalVM native-image)

     [ https://issues.apache.org/jira/browse/PDFBOX-6214?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tilman Hausherr updated PDFBOX-6214:
------------------------------------
    Description: 
From wanling in the mailing list:

===

Stack excerpt, using PDFBox 3.0.7, JDK 25, GraalVM/Liberica NIK native
image, macOS arm64:

java.lang.UnsatisfiedLinkError: Can't load library:
.../libawt_lwawt.dylib
at java.awt.image.ColorModel.loadLibraries(ColorModel.java:208)
at java.awt.image.ColorModel.<clinit>(ColorModel.java:215)
at java.awt.image.Raster.<clinit>(Raster.java:172)
at
org.apache.pdfbox.pdmodel.PDDocument.<clinit>(PDDocument.java:103)
at org.apache.pdfbox.Loader.loadPDF(Loader.java:...)
...

Note: this is not strictly macOS-specific. A similar failure also occurs on
Linux with GraalVM CE, where the AWT native libraries are not bundled. The
symptom is different there (NoClassDefFoundError:
java.awt.GraphicsEnvironment), but it comes from the same
PDDocument.<clinit> path. It works on Linux only when the toolchain bundles
AWT (e.g. Liberica NIK).


> PDDocument static AWT warm-up fails hard when AWT native libs are unavailable (GraalVM native-image)
> ----------------------------------------------------------------------------------------------------
>
>                 Key: PDFBOX-6214
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-6214
>             Project: PDFBox
>          Issue Type: Bug
>    Affects Versions: 2.0.36, 3.0.7 PDFBox
>            Reporter: Tilman Hausherr
>            Assignee: Tilman Hausherr
>            Priority: Minor
>             Fix For: 2.0.37, 3.0.8 PDFBox
>
>
> From wanling in the mailing list:
> ===
> Stack excerpt, using PDFBox 3.0.7, JDK 25, GraalVM/Liberica NIK native
> image, macOS arm64:
> java.lang.UnsatisfiedLinkError: Can't load library:
> .../libawt_lwawt.dylib
> at java.awt.image.ColorModel.loadLibraries(ColorModel.java:208)
> at java.awt.image.ColorModel.<clinit>(ColorModel.java:215)
> at java.awt.image.Raster.<clinit>(Raster.java:172)
> at
> org.apache.pdfbox.pdmodel.PDDocument.<clinit>(PDDocument.java:103)
> at org.apache.pdfbox.Loader.loadPDF(Loader.java:...)
> ...
> Note: this is not strictly macOS-specific. A similar failure also occurs on
> Linux with GraalVM CE, where the AWT native libraries are not bundled. The
> symptom is different there (NoClassDefFoundError:
> java.awt.GraphicsEnvironment), but it comes from the same
> PDDocument.<clinit> path. It works on Linux only when the toolchain bundles
> AWT (e.g. Liberica NIK).



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org