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

[jira] [Commented] (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:comment-tabpanel&focusedCommentId=18093113#comment-18093113 ] 

ASF subversion and git services commented on PDFBOX-6214:
---------------------------------------------------------

Commit 1935789 from Tilman Hausherr in branch 'pdfbox/trunk'
[ https://svn.apache.org/r1935789 ]

PDFBOX-6214: catch UnsatisfiedLinkError as suggested by Wanling Fu

> 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 Fu in the users 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