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 MaGaM <m....@rug.nl> on 2012/10/25 11:32:01 UTC
Re: loadSVGDocument generates NullPointerException
Kenneth B. Harwood wrote
> loadSVGDocument() generates a call to the XML parser (component).
> According to the (Class XMLResourceDescriptor) docs, if an XML parser
> has not been explicitly set, Batik will attempt to assign one based on
> the entry in the resources/XMLResourceDescriptor.properties file.
>
> Although Batik installs this .properties file on my machine, unlike a
> java application, *** an applet cannot read local files (such as
> .properties) without explicit permission (ie. granted in the .policy
> file).
> *** This caused my XMLParserClassName field to be uninitialized (it
> was NULL), which lead to the NPE. btw, there is also a
> CSSParserClassName field that has to be set to avoid the same kind
> of error.
I had the same problem, but with running my application from an Ant build
file instead of your applet context. This made me realize that the
batik-src/resources directory was not on the classpath. After adding it, it
(also) worked like a charm!
Thanks for taking the time to post your solution after you found it. As you
can see, it helps others greatly!
--
View this message in context: http://batik.2283329.n4.nabble.com/Fw-loadSVGDocument-generates-NullPointerException-tp2971376p4655313.html
Sent from the Batik - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org