xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vincent Hardy <vincent.ha...@sun.com>
Subject Re: NullPointerException in JSVG
Date Wed, 02 Jul 2003 06:31:12 GMT
Hello Daniel,

Which version of Batik are you using? Also, could you run the code in 
debug mode (you can set debug=on in build.properties) so that we get the 
line numbers in the stack trace.

Thanks,
Vincent.

Daniel Noll wrote:

> Snippet of code from our application...
>
>    // Get a new SVG drawing context.
>    DOMImplementation domImpl = 
> SVGDOMImplementation.getDOMImplementation();
>    SVGDocument document = (SVGDocument) domImpl.createDocument(null, 
> "svg", null);
>    SVGGraphics2D svg = new SVGGraphics2D(document);
>
>    // Render the drawing and store it in the session.
>    OurRenderer.render(svg);
>
>    // Load the SVG viewer and view the SVG.
>    JSVGComponent view = new JSVGComponent();
>    view.setSVGDocument(document);
>    gui.setView(view);
>
> When running:
>
> java.lang.NullPointerException
>    at 
> org.apache.batik.bridge.BaseScriptingEnvironment.isDynamicDocument(Unknown 
> Source)
>    at org.apache.batik.bridge.UpdateManager.isDynamicDocument(Unknown 
> Source)
>    at org.apache.batik.swing.svg.JSVGComponent.setSVGDocument(Unknown 
> Source)
>    at [my code above]
>
> Anybody have any ideas?  I've tried moving setSVGDocument to after the 
> view is displayed,
> but this makes no difference.
>
> Daniel
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-users-help@xml.apache.org
>
>



---------------------------------------------------------------------
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