Hello, I am trying to make a kind of drawing application that can save SVG files sothat users can work on their stuff in more sophisticated environments. Anyway, I followed the code-examples for how to do this and got it working nicely on my computer (running linux kernel 2.4.22, Slackware 9.1, IDE environment is One Studio). However, when I jar the application and the batik-sources I get a problem I cannot figure out. I have seperated the batik stuff and the application in two different jar-files, the one containing the application, that is the Main class, containing a Class-Path attribute in its manifest to get the required batik files. Still I never get my drawings exported properly. I hope that someone can help me out here:

In short:
when calling batik from another jar-file this exception happens:

java.lang.NullPointerException
at org.apache.batik.svggen.SVGGeneratorContext.doubleString(SVGGeneratorContext.java:420)
at org.apache.batik.svggen.SVGPath.appendPoint(SVGPath.java:131)
at org.apache.batik.svggen.SVGPath.toSVGPathData(SVGPath.java:86)
at org.apache.batik.svggen.SVGPath.toSVG(SVGPath.java:53)
at org.apache.batik.svggen.SVGShape.toSVG(SVGShape.java:72)
at org.apache.batik.svggen.SVGGraphics2D.fill(SVGGraphics2D.java:1232)
at uk.co.nose2nose.vislan.Drawing.ShapeObject.paintImage(ShapeObject.java:136)
at uk.co.nose2nose.vislan.Drawing.DrawingCanvas.repaintOnlyShapes(DrawingCanvas.java:271)
at uk.co.nose2nose.vislan.Drawing.DrawingCanvas.paintSVG(DrawingCanvas.java:106)
at uk.co.nose2nose.vislan.Drawing.Vis2SVGwriter.createSVG(Vis2SVGwriter.java:54)
at uk.co.nose2nose.vislan.Drawing.DrawingCanvas.saveSVG(DrawingCanvas.java:427)
at uk.co.nose2nose.vislan.Drawing.DrawingCanvas.saveCanvas(DrawingCanvas.java:375)



This does not seem to be a classpath issue as far as I can tell, because if I change the Class-Path attribute so that the application cannot find the jar containing batik, I get:


java.lang.NoClassDefFoundError: org/apache/batik/svggen/SVGGraphics2D
at uk.co.nose2nose.vislan.Drawing.DrawingCanvas.saveSVG(DrawingCanvas.java:421)
at uk.co.nose2nose.vislan.Drawing.DrawingCanvas.saveCanvas(DrawingCanvas.java:375)




The same problem occurs when I create an installer with InstallAnywhere-5.5 and run the application as installed (again the batik-sources are included in this and put in the class-path). I am run out of ideas how to solve these, to my inexperienced eye related problems. I hope someone can help me out in this.

Thanks

Rob van Nues



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



Reply via email to