Hello,

This is due to the input document having a null URL. I'll fix this for
the RhinoClassLoader. In the meanwhile, you can set a dummy URL on the
document, something like:

((SVGOMDocument)doc).setURLObject(new
java.net.URL("file:/c:/temp/dummy.svg"));

Vincent.



J Aaron Farr wrote:
> 
> Okay, I'm running a test here trying to load SVG which has been generated by
> the SVGGraphics2D converter to a SVGCanvas object.  If anyone knows of an
> easier way let me know.
> 
> If I use this method, everything works fine:
> 
>   String svg = generateSVG(doc);
>             System.out.println(svg);
>             StringReader sr = new StringReader(svg);
>             SAXSVGDocumentFactory df = new
> SAXSVGDocumentFactory("org.apache.xerces.parsers.SAXParser");
>             SVGOMDocument svgDoc = df.createDocument(null,sr);
> 
>             svgCanvas.setSVGDocument(svgDoc);
>         //    File f = new File("test.svg");
>         //    svgCanvas.setURI(f.toURL().toString());
> 
> java.lang.Exception: Unknown language: text/ecmascript
>         at
> org.apache.batik.bridge.BaseScriptingEnvironment.dispatchSVGLoadEvent(Unknown
> Source)
>         at org.apache.batik.bridge.UpdateManager.dispatchSVGLoadEvent(Unknown Source)
> 
>         at org.apache.batik.swing.svg.SVGLoadEventDispatcher.run(Unknown Source)
> 
> java.lang.NullPointerException
> 
>         at java.net.URLClassLoader.getPermissions(URLClassLoader.java:422)
> 
>         at org.apache.batik.script.rhino.RhinoClassLoader.getPermissions(Unknown
> Source)
> 
>         at org.apache.batik.script.rhino.RhinoClassLoader.<init>(Unknown Source)
> 
>         at org.apache.batik.script.rhino.RhinoInterpreter.<init>(Unknown Source)
> 
>         at
> org.apache.batik.script.rhino.RhinoInterpreterFactory.createInterpreter(Unknown
> Source)
> 
>         at org.apache.batik.script.InterpreterPool.createInterpreter(Unknown Source)
> 
>         at org.apache.batik.bridge.BridgeContext.getInterpreter(Unknown Source)
> 
>         at
> org.apache.batik.bridge.BaseScriptingEnvironment.dispatchSVGLoadEvent(Unknown
> Source)
> 
>         at org.apache.batik.bridge.UpdateManager.dispatchSVGLoadEvent(Unknown Source)
> 
>         at org.apache.batik.swing.svg.SVGLoadEventDispatcher.run(Unknown Source)
> 
> __________________________________________________
> Do You Yahoo!?
> Sign up for SBC Yahoo! Dial - First Month Free
> http://sbc.yahoo.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to