You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xmlgraphics.apache.org by bu...@apache.org on 2010/11/11 14:24:34 UTC

DO NOT REPLY [Bug 50253] New: PSGraphics2D throws HeadlessException

https://issues.apache.org/bugzilla/show_bug.cgi?id=50253

           Summary: PSGraphics2D throws HeadlessException
           Product: XMLGraphicsCommons
           Version: Trunk
          Platform: All
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Java2D
        AssignedTo: general@xmlgraphics.apache.org
        ReportedBy: spepping@apache.org


In FOP's junit-transcoder tests in headless mode a HeadlessException is thrown
with this stack trace:

    [junit] No X11 DISPLAY variable was set, but this program performed an
operation which requires it.
    [junit] java.awt.HeadlessException: 
    [junit] No X11 DISPLAY variable was set, but this program performed an
operation which requires it.
    [junit]     at
sun.java2d.HeadlessGraphicsEnvironment.getDefaultScreenDevice(HeadlessGraphicsEnvironment.java:82)
    [junit]     at
org.apache.xmlgraphics.java2d.ps.PSGraphics2D.getDeviceConfiguration(PSGraphics2D.java:824)
    [junit]     at
org.apache.batik.ext.awt.image.GraphicsUtil.getDestination(Unknown Source)

...

    [junit]     at
org.apache.batik.gvt.CompositeGraphicsNode.primitivePaint(Unknown Source)
    [junit]     at org.apache.batik.gvt.AbstractGraphicsNode.paint(Unknown
Source)
    [junit]     at
org.apache.fop.render.ps.AbstractPSTranscoder.transcode(AbstractPSTranscoder.java:154)

The exception is due to the method PSGraphics2D.getDeviceConfiguration, which
calls GraphicsEnvironment.getDefaultScreenDevice. A solution would be to
construct (in headless mode) a new PSGraphicsConfiguration object similar to
PDFGraphics2D.getDeviceConfiguration.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: general-help@xmlgraphics.apache.org


DO NOT REPLY [Bug 50253] PSGraphics2D throws HeadlessException

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50253

Jeremias Maerki <je...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #1 from Jeremias Maerki <je...@apache.org> 2010-11-12 08:08:10 EST ---
Should be fixed with http://svn.apache.org/viewvc?rev=1034385&view=rev but I
haven't actually tested if the HeadlessException went away, only that the PS
output still works in general.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: general-help@xmlgraphics.apache.org


DO NOT REPLY [Bug 50253] PSGraphics2D throws HeadlessException

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50253

--- Comment #2 from Simon Pepping <sp...@apache.org> 2010-11-17 07:26:15 EST ---
Tested that the change does remove the HeadlessException. I will add
xmlgraphics-commons-1.5svn.jar to fop.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: general-help@xmlgraphics.apache.org