You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Jody Schofield <js...@ca.ibm.com> on 2004/09/29 21:58:43 UTC

X11 Graphics Env problems on Linux RedHat

Was anyone had problems using Batik on Linux RedHat?  I have an SVG image 
that i'm rendering into an image that can be displayed in eclipse (SWT). 
Here is a snippet of the stack trace I'm getting:

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:175)
        at java.lang.Class.initializeImpl(Native Method)
        at java.lang.Class.initialize(Class.java:350)
        at java.lang.Class.forNameImpl(Native Method)
        at java.lang.Class.forName(Class.java:116)
        at 
java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:91)
        at 
java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1073)
        at 
org.apache.batik.ext.awt.image.GraphicsUtil.createGraphics(Unknown Source)
        at org.apache.batik.gvt.filter.GraphicsNodeRed8Bit.genRect(Unknown 
Source)
        at 
org.apache.batik.gvt.filter.GraphicsNodeRed8Bit.copyData(Unknown Source)
        at 
org.apache.batik.ext.awt.image.rendered.TileCacheRed.genRect(Unknown 
Source)
        at 
org.apache.batik.ext.awt.image.rendered.AbstractTiledRed.drawBlockInPlace(Unknown 
Source)
        at 
org.apache.batik.ext.awt.image.rendered.AbstractTiledRed.drawBlock(Unknown 
Source)
at 
org.apache.batik.ext.awt.image.rendered.AbstractTiledRed.copyToRasterByBlocks(Unknown 
Source)
        at 
org.apache.batik.ext.awt.image.rendered.AbstractTiledRed.copyData(Unknown 
Source)
        at 
org.apache.batik.ext.awt.image.rendered.TranslateRed.copyData(Unknown 
Source)
        at org.apache.batik.ext.awt.image.rendered.PadRed.copyData(Unknown 
Source)
        at org.apache.batik.gvt.renderer.StaticRenderer.repaint(Unknown 
Source)
        at org.apache.batik.gvt.renderer.StaticRenderer.repaint(Unknown 
Source)
        at 
com.ibm.xtools.gef.internal.render.svg.ImageTranscoderEx.transcode(Unknown 
Source)
        at 
org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(Unknown 
Source)
        at 
com.ibm.xtools.gef.internal.render.svg.SVGImageConverter.setUpTranscoders(Unknown 
Source)
at 
com.ibm.xtools.gef.internal.render.svg.SVGImageConverter.renderSVGtoSWTImage(Unknown
Source)
at 
com.ibm.xtools.gef.internal.render.svg.SVGImageConverter.renderSVGtoSWTImage(Unknown
Source)


The DISPLAY env var is not :0.0.  At first I thought it might be an 
AWT/SWT issue so I created the following test but that seems to work fine.

        BufferedImage buff = new BufferedImage(10, 10, 
BufferedImage.TYPE_3BYTE_BGR);
        Graphics2D graphics = buff.createGraphics();
        graphics.dispose();

any and all help appreciated.

regards,
Jody

Re: X11 Graphics Env problems on Linux RedHat

Posted by Jody Schofield <js...@ca.ibm.com>.
Yeah it is strange.  Running headless does work, the problem with that is 
i'm not sure what other plug-ins the customers will have and they may use 
other AWT features.

Thanks for the suggestion.

-Jody




Robert Marcano <ro...@marcanoonline.com> 
09/29/2004 05:06 PM
Please respond to
"Batik Users" <ba...@xml.apache.org>


To
batik-users@xml.apache.org
cc

Subject
Re: X11 Graphics Env problems on Linux RedHat






On Wed, 2004-09-29 at 15:58, Jody Schofield wrote:
> Was anyone had problems using Batik on Linux RedHat?  I have an SVG
> image that i'm rendering into an image that can be displayed in
> eclipse (SWT).  Here is a snippet of the stack trace I'm getting:
> 

It is strange that if you have an X server running this exception is
thrown. You can try to workaround it defining java.awt.headless=true,
but i do not know if this will break the SWT connection to the X Server

> 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:175)
>         at java.lang.Class.initializeImpl(Native Method)
>         at java.lang.Class.initialize(Class.java:350)
>         at java.lang.Class.forNameImpl(Native Method)
>         at java.lang.Class.forName(Class.java:116)
>         at
> 
java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:91)
>         at
> java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1073)
>         at
> org.apache.batik.ext.awt.image.GraphicsUtil.createGraphics(Unknown
> Source)
>         at
> org.apache.batik.gvt.filter.GraphicsNodeRed8Bit.genRect(Unknown
> Source)
>         at
> org.apache.batik.gvt.filter.GraphicsNodeRed8Bit.copyData(Unknown
> Source)
>         at
> org.apache.batik.ext.awt.image.rendered.TileCacheRed.genRect(Unknown
> Source)
>         at
> 
org.apache.batik.ext.awt.image.rendered.AbstractTiledRed.drawBlockInPlace(Unknown 
Source)
>         at
> 
org.apache.batik.ext.awt.image.rendered.AbstractTiledRed.drawBlock(Unknown 
Source)
> at
> 
org.apache.batik.ext.awt.image.rendered.AbstractTiledRed.copyToRasterByBlocks(Unknown 
Source)
>         at
> 
org.apache.batik.ext.awt.image.rendered.AbstractTiledRed.copyData(Unknown 
Source)
>         at
> org.apache.batik.ext.awt.image.rendered.TranslateRed.copyData(Unknown
> Source)
>         at
> org.apache.batik.ext.awt.image.rendered.PadRed.copyData(Unknown
> Source)
>         at
> org.apache.batik.gvt.renderer.StaticRenderer.repaint(Unknown Source)
>         at
> org.apache.batik.gvt.renderer.StaticRenderer.repaint(Unknown Source)
>         at
> 
com.ibm.xtools.gef.internal.render.svg.ImageTranscoderEx.transcode(Unknown 
Source)
>         at
> org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(Unknown
> Source)
>         at
> 
com.ibm.xtools.gef.internal.render.svg.SVGImageConverter.setUpTranscoders(Unknown 
Source)
> at
> 
com.ibm.xtools.gef.internal.render.svg.SVGImageConverter.renderSVGtoSWTImage(Unknown
> Source)
> at
> 
com.ibm.xtools.gef.internal.render.svg.SVGImageConverter.renderSVGtoSWTImage(Unknown
> Source)
> 
> 
> The DISPLAY env var is not :0.0.  At first I thought it might be an
> AWT/SWT issue so I created the following test but that seems to work
> fine.
> 
>         BufferedImage buff = new BufferedImage(10, 10,
> BufferedImage.TYPE_3BYTE_BGR);
>         Graphics2D graphics = buff.createGraphics();
>         graphics.dispose();
> 
> any and all help appreciated.
> 
> regards,
> Jody
________________________________________
Robert Marcano


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



Re: X11 Graphics Env problems on Linux RedHat

Posted by Robert Marcano <ro...@marcanoonline.com>.
On Wed, 2004-09-29 at 15:58, Jody Schofield wrote:
> Was anyone had problems using Batik on Linux RedHat?  I have an SVG
> image that i'm rendering into an image that can be displayed in
> eclipse (SWT).  Here is a snippet of the stack trace I'm getting:
> 

It is strange that if you have an X server running this exception is
thrown. You can try to workaround it defining java.awt.headless=true,
but i do not know if this will break the SWT connection to the X Server

> 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:175)
>         at java.lang.Class.initializeImpl(Native Method)
>         at java.lang.Class.initialize(Class.java:350)
>         at java.lang.Class.forNameImpl(Native Method)
>         at java.lang.Class.forName(Class.java:116)
>         at
> java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:91)
>         at
> java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1073)
>         at
> org.apache.batik.ext.awt.image.GraphicsUtil.createGraphics(Unknown
> Source)
>         at
> org.apache.batik.gvt.filter.GraphicsNodeRed8Bit.genRect(Unknown
> Source)
>         at
> org.apache.batik.gvt.filter.GraphicsNodeRed8Bit.copyData(Unknown
> Source)
>         at
> org.apache.batik.ext.awt.image.rendered.TileCacheRed.genRect(Unknown
> Source)
>         at
> org.apache.batik.ext.awt.image.rendered.AbstractTiledRed.drawBlockInPlace(Unknown Source)
>         at
> org.apache.batik.ext.awt.image.rendered.AbstractTiledRed.drawBlock(Unknown Source)
> at
> org.apache.batik.ext.awt.image.rendered.AbstractTiledRed.copyToRasterByBlocks(Unknown Source)
>         at
> org.apache.batik.ext.awt.image.rendered.AbstractTiledRed.copyData(Unknown Source)
>         at
> org.apache.batik.ext.awt.image.rendered.TranslateRed.copyData(Unknown
> Source)
>         at
> org.apache.batik.ext.awt.image.rendered.PadRed.copyData(Unknown
> Source)
>         at
> org.apache.batik.gvt.renderer.StaticRenderer.repaint(Unknown Source)
>         at
> org.apache.batik.gvt.renderer.StaticRenderer.repaint(Unknown Source)
>         at
> com.ibm.xtools.gef.internal.render.svg.ImageTranscoderEx.transcode(Unknown Source)
>         at
> org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(Unknown
> Source)
>         at
> com.ibm.xtools.gef.internal.render.svg.SVGImageConverter.setUpTranscoders(Unknown Source)
> at
> com.ibm.xtools.gef.internal.render.svg.SVGImageConverter.renderSVGtoSWTImage(Unknown
> Source)
> at
> com.ibm.xtools.gef.internal.render.svg.SVGImageConverter.renderSVGtoSWTImage(Unknown
> Source)
> 
> 
> The DISPLAY env var is not :0.0.  At first I thought it might be an
> AWT/SWT issue so I created the following test but that seems to work
> fine.
> 
>         BufferedImage buff = new BufferedImage(10, 10,
> BufferedImage.TYPE_3BYTE_BGR);
>         Graphics2D graphics = buff.createGraphics();
>         graphics.dispose();
> 
> any and all help appreciated.
> 
> regards,
> Jody
________________________________________
Robert Marcano


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