rob van nues wrote:
However, when I jar the
application and the batik-sources I get a problem I cannot figure out.
I think the jar thing is a red herring. In the Batik 1.5 release
there was a bug in doubleString where we did not initialize the
DecimalFormat object. This is fixed in CVS or you can call
SVGGraphics2D.setPrecision to initialize this properly.
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]