You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by "MORIN Eric - NTR ( EMORIN@nanterre.sema.slb.com )" <EM...@nanterre.sema.slb.com> on 2003/10/09 11:10:41 UTC

Can't connect to X11

Hello,

I'am using FOP 0.20.4 to create PDF with svg graphics in a servlet context
on Unix or Linux. 
Generally it works fine, but sometimes I get the following exception :

java.lang.InternalError: Can't connect to X11 window server using ':0.0' as
the value of the DISPLAY variable.
	at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
	at
sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:54)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:115)
	at
java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment
.java:53)
	at
java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1006)
	at org.apache.fop.svg.PDFGraphics2D.<init>(Unknown Source)
	at org.apache.fop.render.pdf.PDFRenderer.renderSVGDocument(Unknown
Source)
	at org.apache.fop.render.pdf.PDFRenderer.renderSVGArea(Unknown
Source)
	at org.apache.fop.svg.SVGArea.render(Unknown Source)
	at
org.apache.fop.render.pdf.PDFRenderer.renderForeignObjectArea(Unknown
Source)
	...

Any idea ?

Thanks in advance

Eric

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: Can't connect to X11

Posted by tien hai nguyen <ti...@dental-on-line.fr>.
try this

$JAVACMD -Djava.awt.headless=true -classpath "$LOCALCLASSPATH" $FOP_OPTS 
org.apache.fop.apps.Fop "$@"

instead of
$JAVACMD -classpath "$LOCALCLASSPATH" $FOP_OPTS org.apache.fop.apps.Fop "$@"

in script fop.sh


On Thursday 09 October 2003 11:10, MORIN Eric - NTR ( 
EMORIN@nanterre.sema.slb.com ) wrote:
> Hello,
>
> I'am using FOP 0.20.4 to create PDF with svg graphics in a servlet context
> on Unix or Linux.
> Generally it works fine, but sometimes I get the following exception :
>
> java.lang.InternalError: Can't connect to X11 window server using ':0.0' as
> the value of the DISPLAY variable.
> 	at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
> 	at
> sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:54)
> 	at java.lang.Class.forName0(Native Method)
> 	at java.lang.Class.forName(Class.java:115)
> 	at
> java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironmen
>t .java:53)
> 	at
> java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1006)
> 	at org.apache.fop.svg.PDFGraphics2D.<init>(Unknown Source)
> 	at org.apache.fop.render.pdf.PDFRenderer.renderSVGDocument(Unknown
> Source)
> 	at org.apache.fop.render.pdf.PDFRenderer.renderSVGArea(Unknown
> Source)
> 	at org.apache.fop.svg.SVGArea.render(Unknown Source)
> 	at
> org.apache.fop.render.pdf.PDFRenderer.renderForeignObjectArea(Unknown
> Source)
> 	...
>
> Any idea ?
>
> Thanks in advance
>
> Eric
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: fop-user-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: Can't connect to X11

Posted by Jeremias Maerki <de...@greenmail.ch>.
A list of workarounds is at:
http://xml.apache.org/fop/graphics.html#batik

> I'am using FOP 0.20.4 to create PDF with svg graphics in a servlet context
> on Unix or Linux. 
> Generally it works fine, but sometimes I get the following exception :
> 
> java.lang.InternalError: Can't connect to X11 window server using ':0.0' as
> the value of the DISPLAY variable.
> 	at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)




---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org