Hi Dao,

dao <[email protected]> wrote on 12/28/2009 07:12:30 AM:

> I get This exception
> 
> java.lang.ClassCastException: org.apache.batik.dom.GenericElement 
> cannot be cast to org.w3c.dom.svg.SVGSVGElement
> at org.apache.batik.dom.svg.SVGOMDocument.getRootElement
> (SVGOMDocument.java:233)

    Almost certainly this is a problem with namespaces (so your
root element might be an svg element but not an svg:svg element).

    Also you aren't using our DocumentFactory implementation,  this
is at least a performance hit.

> When I do this, it is all right. What's wrong?
> 
> public CanvasProxy(long fps, String rmiRegistryLocation) throws 
> NotBoundException, ParserConfigurationException, SAXException, 
IOException {
> connect(rmiRegistryLocation);
>         canvas = new JSVGCanvas();
> canvas.setDocumentState(JSVGCanvas.ALWAYS_DYNAMIC);
> canvas.setURI(remoteEngine.getSvgDocumentURI().toString());
> -- 
> Dao Hodac

Reply via email to