[ 
https://issues.apache.org/jira/browse/PDFBOX-5181?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17340344#comment-17340344
 ] 

Maruan Sahyoun commented on PDFBOX-5181:
----------------------------------------

[~tilman]

I can reproduce the issue when running all tests so get the same results as you 
do i.e. headless mode is not enabled in such case although is has been 
specified. The only way I (currently) found is by specifying 
{{<java.awt.headless>true</java.awt.headless>}} as a system property for 
maven-surefire-plugin. Then headless mode is set. What I could do is setting 
headless mode for the tests but also run the test only if that is effective 
i.e. on Windows these tests will not work when all tests run but on Linux (and 
maybe others) they will.
WDYT?  

 

> pdfbox-app doesn't run in a headless environment
> ------------------------------------------------
>
>                 Key: PDFBOX-5181
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-5181
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Utilities
>    Affects Versions: 3.0.0 PDFBox
>            Reporter: Tilman Hausherr
>            Assignee: Maruan Sahyoun
>            Priority: Major
>             Fix For: 3.0.0 PDFBox
>
>
> Follow-up to PDFBOX-2602
> {code}
> ...
> Caused by: java.awt.HeadlessException:
> No X11 DISPLAY variable was set, but this program performed an operation 
> which requires it.
>         at 
> java.desktop/java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:208)
>         at java.desktop/java.awt.Window.<init>(Window.java:548)
>         at java.desktop/java.awt.Frame.<init>(Frame.java:423)
>         at java.desktop/java.awt.Frame.<init>(Frame.java:388)
>         at java.desktop/javax.swing.JFrame.<init>(JFrame.java:180)
>         at org.apache.pdfbox.debugger.PDFDebugger.<init>(PDFDebugger.java:208)
>         ... 18 more
> {code}
> PDFDebugger it itself an awt object (a JFrame).
> We may also run into problems with tools that use awt, e.g. PDFToImage.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to