xmlgraphics-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 50253] New: PSGraphics2D throws HeadlessException
Date Thu, 11 Nov 2010 13:24:34 GMT
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


Mime
View raw message