Hi,

I am trying to execute SaveAsJPEG.java example provided on 
http://xml.apache.org/batik/rasterizerTutorial.html with my SVG file and I am getting 
errors like 

C:\Apache Group\Tomcat 4.0\webapps\Risk\WEB-INF\classes\Risk\javaObjects>java Sa
veAsJPEG barchartnew.svg
Exception in thread "main" java.lang.ExceptionInInitializerError
        at org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(Unknown S
ource)
        at SaveAsJPEG.main(SaveAsJPEG.java:25)
Caused by: java.util.MissingResourceException: Can't find bundle for base name o
rg.apache.batik.util.resources.XMLResourceDescriptor, locale en_US
        at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle
.java:804)
        at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:773)
        at java.util.ResourceBundle.getBundle(ResourceBundle.java:538)
        at org.apache.batik.util.XMLResourceDescriptor.<clinit>(Unknown Source)
        ... 2 more

can any one help me with this. I am stuck at this point for so long. Below is the 
source code of my svg file.

============================================================
barChartNew.svg
============================================================
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd";;>

<svg xmlns="http://www.w3.org/2000/svg";; xmlns:xlink="http://www.w3.org/1999/xlink";; 
onload="lineGraph(evt);" height="500" width="2000">
<script type="text/javascript" language="JavaScript">
                                function lineGraph(evt)
                                {
                                   svgGraph = evt.getTarget().getOwnerDocument();
                                   max = 
svgGraph.getElementById("totalBars").getAttribute("value");
                                         //alert(max);
                                         
                                         var x_new;
                                         var x_old;
                                         var y_new;
                                         var y_old;

                                         
                                         x_old = 
parseInt(svgGraph.getElementById("pt1").getAttribute("x")) + 2;
                                         y_old = 
parseInt(svgGraph.getElementById("pt1").getAttribute("y")) + 2;

                                         counter=1;                      
                                         
                                         while(counter != max)                  
                                         {
                                            counter++;
                                                        id_old = "pt"+ (counter - 1);
                                                        id_new = "pt"+ counter;
                                                        
                                                        x_old = 
parseInt(svgGraph.getElementById(id_old).getAttribute("x"))+2;
                                                        y_old = 
parseInt(svgGraph.getElementById(id_old).getAttribute("y"))+2;
                                                                                       
                         
                                                        x_new = 
parseInt(svgGraph.getElementById(id_new).getAttribute("x"))+2;
                                                        y_new = 
parseInt(svgGraph.getElementById(id_new).getAttribute("y"))+2;
                                                                                       
                 
                                                        //alert("line: 
&lt;"+x_old+","+y_old+"&gt; to &lt;"+x_new+", "+y_new+"&gt;");
                                                        
                                                        var drawLine = 
svgGraph.createElement("line");
                                                        drawLine.setAttribute("x1", 
x_old);
                                                        drawLine.setAttribute("y1", 
y_old);
                                                        drawLine.setAttribute("x2", 
x_new);
                                                        drawLine.setAttribute("y2", 
y_new);
                                                        drawLine.setAttribute("style", 
"stroke:blue;stroke-width:1");
                                                        
                                                        
svgGraph.getElementById("lineGraph").appendChild(drawLine);
                                         }
                                           
                                }
                  </script>
<coordinates id="totalBars" value="3"/>
<text y="20" style="font-size:12; text-anchor:middle" x="180">Trend of Corporate 
Ratings for "subject company".</text>
<text x="120" y="275" style="font-size:12; text-anchor:middle;">
<tspan/>
</text>
<text y="15" x="-120" style="writing-mode:lr; font-size:12; text-anchor:middle;" 
transform="rotate(-90)">
<tspan>Corporate Rating</tspan>
</text>
<text x="50" style="writing-mode:lr; font-size:12; text-anchor:middle;" 
transform="translate(15, 180) rotate(-90)" y="250">
<tspan>Percent Probability of Distress</tspan>
</text>
<g style="stroke-width:2; stroke:black">
<path d="M 40 240 L 40 30 L 40 240 L 200 240 Z"/>
<path d="M 200 240 L 200 30 Z"/>
</g>
<g style="fill:none; stroke:#B0B0B0; stroke-width:1; stroke-dasharray:2 4">
<path d="M 42 200 L 198 200 Z"/>
<path d="M 42 160 L 198 160 Z"/>
<path d="M 42 120 L 198 120 Z"/>
<path d="M 42 80 L 198 80 Z"/>
<path d="M 42 40 L 198 40 Z"/>
</g>
<g style="text-anchor:start; font-size:9">
<text y="203" x="26">A</text>
<text y="163" x="26">B</text>
<text y="123" x="26">C</text>
<text y="83" x="26">D</text>
<text y="43" x="26">F</text>
</g>
<g style="text-anchor:start; font-size:9">
<text x="206" y="203">0</text>
<text x="206" y="163">15</text>
<text x="206" y="123">30</text>
<text x="206" y="83">45</text>
<text x="206" y="43">50-100 %</text>
</g>
<path style="stroke-width:2; stroke:black; fill:green" d="M 65 240 L 65 160 L 85 160 L 
85 240 Z"/>
<text style="font-size:10; text-anchor:middle" x="75" y="195">0</text>
<rect id="pt1" style="stroke-width:2; stroke:black; fill:none" x="73" y="198" 
width="4" height="4"/>
<text style="font-size:10; text-anchor:end" transform="translate(-150,140) 
rotate(-45)" x="75" y="235">Ajax Ltd</text>
<text style="font-size:10; text-anchor:end" transform="translate(-147,133) 
rotate(-45)" x="75" y="247">June YTD 2001</text>
<path style="stroke-width:2; stroke:black; fill:yellow" d="M 110 240 L 110 120 L 130 
120 L 130 240 Z"/>
<text style="font-size:10; text-anchor:middle" x="120" y="155.25">15</text>
<rect id="pt2" style="stroke-width:2; stroke:black; fill:none" x="118" y="158.25" 
width="4" height="4"/>
<text style="font-size:10; text-anchor:end" transform="translate(-137,172) 
rotate(-45)" x="120" y="235">BBK</text>
<text style="font-size:10; text-anchor:end" transform="translate(-134,165) 
rotate(-45)" x="120" y="247">Q1 2002</text>
<path style="stroke-width:2; stroke:black; fill:orange" d="M 155 240 L 155 80 L 175 80 
L 175 240 Z"/>
<text style="font-size:10; text-anchor:middle" x="165" y="102.25">35</text>
<rect id="pt3" style="stroke-width:2; stroke:black; fill:none" x="163" y="105.25" 
width="4" height="4"/>
<text style="font-size:10; text-anchor:end" transform="translate(-124,204) 
rotate(-45)" x="165" y="235">Long Johns Ltd</text>
<text style="font-size:10; text-anchor:end" transform="translate(-121,197) 
rotate(-45)" x="165" y="247">2nd Half 2001</text>
<g id="lineGraph"/>
</svg>

-- 
===

Another FREE service from Jayde Online <http://www.jayde.com>
Private, Web-based email accounts at http://www.jaydemail.com

Powered by Outblaze

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to