xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From noni_4444 <naveed.0...@gmail.com>
Subject Exception loading svg document in applet (from Tomcat Server)
Date Thu, 23 Aug 2007 07:25:16 GMT

I receive an exception while loading an SVG document from within a batik
applet. The SVG document is being loaded from the Tomcat server, where it is
placed in the ROOT directory. The line of code which causes the exception
is:

                      SVGDocument rectDoc;
                      rectDoc =
docFactory.createSVGDocument("http://localhost:8080/screen10_DT.svg");

When i open the SVG document directly inside the browser using the URL
"http://localhost:8080/screen10_DT.svg", it opens without any exception.

Text of exception is:
java.lang.ExceptionInInitializerError
	at org.apache.batik.dom.svg.SAXSVGDocumentFactory.createDocument(Unknown
Source)
	at org.apache.batik.dom.svg.SAXSVGDocumentFactory.createSVGDocument(Unknown
Source)
	at WES.Agents.BatikApplet.init(BatikApplet.java:153)
	at sun.applet.AppletPanel.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
	at org.apache.batik.Version.getVersion(Version.java:70)
	at org.apache.batik.util.ParsedURL.<clinit>(Unknown Source)
	... 5 more

Does this exception occur because of the url? I have previously opened an
SVG being served from a servlet successfully.
Why is there a getVersion error message? I already have all the relevant
class files placed on the ROOT directory of the TOMCAT server.

Details: Might be irrelevant
 I extracted all the batik jar files into a single folder named org, and
placed it at the ROOT directory so that it can be directly accessed. Did
this because the requests for class files did not succeed when i had only
the jar files placed in tomcat ROOT directory. The applet has been loaded
from the same web server from which we are trying to load the svg file. So
that scenario goes something like this

 - Load an html page containing an applet from a the webserver
 - Applet is loaded in the local directory.... Question .??????. where is it
loaded ???????
 - Applet tries to load the SVG file from the webserver

We people plan to do interesting things with Batik ... so do give any ideas
u may have to solve this problem.

Naveed
-- 
View this message in context: http://www.nabble.com/Exception-loading-svg-document-in-applet-%28from-Tomcat-Server%29-tf4315867.html#a12288747
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


Mime
View raw message