xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rossen Hristov" <rhris...@sun-fish.com>
Subject Weird Exception
Date Mon, 16 Jul 2001 07:10:35 GMT
Hi all,

I developed several applications using Batik to generate SVG-s. My
development environment is Win2000 and everything ran perfectly, I generated
lots of nice charts etc. But when I deployed my module to the real server
which is RedHat Linux 2.2.14-5.0smp and I tried to run the thing look what I
got:

 Exception:  java.lang.InternalError: Can't connect to X11 window server
using ':0.0' as the value of the DISPLAY variable.
        Stack Trace follows:
        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:64)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:124)
        at
java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment
.java:63)
        at sun.awt.motif.MToolkit.<clinit>(MToolkit.java:60)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:124)
        at java.awt.Toolkit$2.run(Toolkit.java:499)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:492)
        at java.awt.SystemColor.updateSystemColors(SystemColor.java:346)
        at java.awt.SystemColor.<clinit>(SystemColor.java:339)
        at
org.apache.batik.css.value.DefaultSystemColorResolver.activeBorder(DefaultSy
stemColorResolver.java:27)
        at
org.apache.batik.css.value.ColorFactory.<init>(ColorFactory.java:75)
        at
org.apache.batik.css.value.CommonValueFactoryMap.<init>(CommonValueFactoryMa
p.java:39)
        at
org.apache.batik.css.svg.SVGValueFactoryMap.<init>(SVGValueFactoryMap.java:3
9)
        at
org.apache.batik.css.svg.SVGValueFactoryMap.<init>(SVGValueFactoryMap.java:3
2)
        at
org.apache.batik.dom.svg.SVGDOMImplementation.<init>(SVGDOMImplementation.ja
va:88)
        at
org.apache.batik.dom.svg.SVGDOMImplementation.<clinit>(SVGDOMImplementation.
java:59)
        at ...

I do not use anything connected to XWindows. The only things I do is drawing
lines with the SVGGraphics2D.draw(Shape s) method and I use only standard
shapes.

If this will be of any help here is what I do first:

    // Get a DOMImplementation
    domImpl = SVGDOMImplementation.getDOMImplementation();
    // we are using a constant available on the SVGDOMImplementation
    String svgNameSpace = SVGDOMImplementation.SVG_NAMESPACE_URI;
    //Create the XML document
    document = domImpl.createDocument(svgNameSpace, "svg", null);
    //Create a context
    SVGGeneratorContext svgContext =
SVGGeneratorContext.createDefault(document);
    svgContext.setComment("Generated by " + this.getClass() + ". Copyright
(c) 2001 Sunfish Ltd.");
    // Create an instance of the SVG Generator
    svgGenerator = new SVGGraphics2D(svgContext, true);
    svgGenerator.setSVGCanvasSize(new Dimension(width, height));
    svgGenerator.setBackground(new Color(228, 228, 228));
    svgGenerator.clearRect(0, 0, width, height);

Please, if anyone can help me I would appreciate it.

Sincerely,

Rossen



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


Mime
View raw message