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: [email protected]
ReportedBy: [email protected]
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: [email protected]
For additional commands, e-mail: [email protected]