Thomas,
Thanks for the quick response.
I'm a little confused. I have installed the Batik libraries in the JRE extension
directory. They appear to be being loaded from there. Wouldn't the DTD
be in those JAR files or am I goofing something up?
Maybe I'm using a problematic DOCTYPE?
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
Another program is generating the SVG for my app and embeds this during creation.
I'll debug line 311 further to see what I find out.
Thanks again,
G. Wade
Thomas E Deweese wrote:
> >>>>> "GWJ" == G Wade Johnson <[EMAIL PROTECTED]> writes:
>
> GWJ> I recently ran into a problem with NullPointExceptions when I
> GWJ> tried to deploy the applet as a JAR file. I found that the
> GWJ> application would run either way but the applet would only run as
> GWJ> separate class files. More importantly, neither applet approach
> GWJ> worked when the applet was served from a Tomcat server. (my
> GWJ> production environment.)
>
> GWJ> I got the latest CVS version (this morning) and verified that it
> GWJ> still exhibited the same behavior. I compiled with debugging on
> GWJ> and optimization off. Using that version of the Batik jars, I was
> GWJ> able to track the exception to
>
> GWJ>
> org.apache.batik.dom.util.SAXDocumentFactory.createDocument(SAXDocumentFactory.java:353)
>
> GWJ> I added some further debugging code and tracked that exception to
>
> GWJ>
> org.apache.batik.dom.svgSAXSVGDocumentFactory.resolveEntity(SAXSVGDocumentFactory.java:311)
>
> It seems that your JAR file is missing the SVG DTD that should be
> bundled with Batik. Are you bundling all the stuff from:
> xml-batik/resources/org/apache/batik/dom/svg/resources/
>
> It would probably be worth your while to break up the
> 'SAXFactory.java:311' line and insert some diagnostics to see exactly
> what part of the line is failing. See if something is wrong with the
> localSystemId it finds etc...
>
> In this case Batik should not be accessing the web in any way, it
> should pull the DTD out of the JAR file.
>
> GWJ> With this in hand, I went back to some of my reference SVG and
> GWJ> removed the DOCTYPE and added the namespace for xlink. This
> GWJ> workaround appears to work without issue.
>
> GWJ> Questions: 1. Is there some way to make the code use the proxy
> GWJ> information in the browser? - That is one of the major technical
> GWJ> reasons behind doing this as an applet. (The other reasons are
> GWJ> out of my control.)
>
> The applet should already do this.
>
> GWJ> 2. Any idea why the class file version works and the JAR file
> GWJ> version doesn't?
>
> My guess is that when you run from source you are getting the
> resources, when you build the jar you miss them...
>
> GWJ> 3. Am I doing something incredibly wrong and there is an obvious
> GWJ> solution I haven't noticed? <grin/> (At the rate I'm going, I'm
> GWJ> not willing to rule this out.)
>
> I think this is the case :)
>
> GWJ> Thanks in advance, G. Wade
>
> GWJ> ---------------------------------------------------------------------
> GWJ> To unsubscribe, e-mail: [EMAIL PROTECTED]
> GWJ> For additional commands, e-mail: [EMAIL PROTECTED]
>
> ---------------------------------------------------------------------
> 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]