List Info

Thread: Problem with loading SVG files using SVGApplication tutorial on Batik




Problem with loading SVG files using SVGApplication tutorial on Batik
user name
2006-04-29 10:00:35
Hi,
I am having problem in loading SVG documents using the setURI() function of JSVGCanvas.
I get the following exception when I attempt to load any file.:
 
*******************************************************************************
java.lang.NullPointerException
  ; &nbsp; &nbsp;  at java.io.Reader.<init>(Unknown Source)
&nbsp; &nbsp;   ;  at java.io.InputStreamReader.<init>(Unknown Source)
&nbsp; &nbsp;   ;  at java.util.Properties.load(Unknown Source)
&nbsp; &nbsp;   ;  at org.apache.batik.util.XMLResourceDescriptor.getParserProps(Unknown So
urce)
&nbsp;   ; &nbsp;  at org.apache.batik.util.XMLResourceDescriptor.getXMLParserClassName(Unk
nown Source)
&nbsp; &nbsp;   ;  at org.apache.batik.swing.svg.JSVGComponent$BridgeUserAgent.getXMLParser
ClassName(Unknown Source)
&nbsp; &nbsp;   ;  at org.apache.batik.swing.svg.JSVGComponent$BridgeUserAgentWrapper.getXM
LParserClassName(Unknown Source)
&nbsp; &nbsp;   ;  at org.apache.batik.bridge.DocumentLoader.<init>(Unknown Source)
&nbsp; &nbsp;   ;  at org.apache.batik.swing.svg.JSVGComponent$1.run(Unknown Source)
&nbsp; &nbsp;   ;  at org.apache.batik.swing.svg.JSVGComponent.stopThenRun(Unknown Source)
&nbsp; &nbsp;   ;  at org.apache.batik.swing.svg.JSVGComponent.loadSVGDocument(Unknown Sour
ce)
&nbsp;   ; &nbsp;  at org.apache.batik.swing.JSVGCanvas.setURI(Unknown Source)
&nbsp; &nbsp;   ;  at SVGApplication$2.actionPerformed(SVGApplication.java:66)
 &nbsp; &nbsp;   ; at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
&nbsp; &nbsp;   ;  at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknow
n Source)
&nbsp; &nbsp;   ;  at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
&nbsp; &nbsp;   ;  at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
&nbsp; &nbsp;   ;  at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Sour
ce)
&nbsp;   ; &nbsp;  at java.awt.Component.processMouseEvent(Unknown Source)
&nbsp; &nbsp;   ;  at java.awt.Component.processEvent(Unknown Source)
&nbsp; &nbsp;   ;  at java.awt.Container.processEvent(Unknown Source)
&nbsp; &nbsp;   ;  at java.awt.Component.dispatchEventImpl(Unknown Source)
&nbsp; &nbsp;   ;  at java.awt.Container.dispatchEventImpl(Unknown Source)
&nbsp; &nbsp;   ;  at java.awt.Component.dispatchEvent(Unknown Source)
&nbsp; &nbsp;   ;  at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
&nbsp; &nbsp;   ;  at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
&nbsp; &nbsp;   ;  at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
&nbsp; &nbsp;   ;  at java.awt.Container.dispatchEventImpl(Unknown Source)
&nbsp; &nbsp;   ;  at java.awt.Window.dispatchEventImpl(Unknown Source)
&nbsp; &nbsp;   ;  at java.awt.Component.dispatchEvent(Unknown Source)
&nbsp; &nbsp;   ;  at java.awt.EventQueue.dispatchEvent(Unknown Source)
&nbsp; &nbsp;   ;  at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
 &nbsp; &nbsp; &nbsp;  at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
&nbsp; &nbsp;   ;  at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
&nbsp; &nbsp;   ;  at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
&nbsp; &nbsp;   ;  at java.awt.EventDispatchThread.run(Unknown Source)
**************************************************************************************
 
Can anyone please let me know what is going ;wrong.
 
Thanks
Hitesh
 
 

 


Blab-away for as little as 1¢/min. Make PC-to-Phone Calls using Yahoo! Messenger with Voice.
Problem with loading SVG files using SVGApplication tutorial on Batik
user name
2006-04-29 11:15:32
Hi Hitesh,

Hitesh Harnal <hharnalyahoo.co.in> wrote on
04/29/2006 06:00:35 AM:

> I am having problem in loading SVG documents using the
setURI() function 
of JSVGCanvas.
> I get the following exception when I attempt to load
any file.:

   It looks like you are missing a jar file or perhaps the
'resources' 
directory
from your class path.

> java.lang.NullPointerException
>         at java.io.Reader.<init>(Unknown Source)
>         at
java.io.InputStreamReader.<init>(Unknown Source)
>         at java.util.Properties.load(Unknown Source)
>         at 
org.apache.batik.util.XMLResourceDescriptor.getParserProps(U
nknown So
> urce)


------------------------------------------------------------
---------
To unsubscribe, e-mail: batik-users-unsubscribexmlgraphics.apache.org
For additional commands, e-mail: batik-users-helpxmlgraphics.apache.org

Problem with loading SVG files using SVGApplication tutorial on Batik
user name
2006-04-29 12:00:04
Thanks Thomas, The resources directory was missing.

thomas.deweesekodak.com wrote:
Hi Hitesh,

Hitesh Harnal YAHOO.CO.IN>wrote on 04/29/2006 06:00:35 AM:

> I am having problem in loading SVG documents using the setURI() function
of JSVGCanvas.
> I get the following exception when I attempt to load any file.:

It looks like you are missing a jar file or perhaps the 'resources'
directory
from your class path.

>; java.lang.NullPointerException
&gt; at java.io.Reader.(Unknown Source)
&gt; at java.io.InputStreamReader.(Unknown Source)
&gt; at java.util.Properties.load(Unknown Source)
&gt; at
org.apache.batik.util.XMLResourceDescriptor.getParserProps(Unknown So
> urce)


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribexmlgraphics.apache.org
For additional commands, e-mail: batik-users-helpxmlgraphics.apache.org



Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2¢/min or less.
[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )