xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From DeWeese Thomas <thomas.dewe...@gmail.com>
Subject Re: Strange CSS Exception while loading , updating and transcoding svg document
Date Thu, 14 Mar 2013 22:17:42 GMT
Hi Mihir,

    The random nature of the exceptions, especially occuring in the CSS engine makes me think
that the issue is that you have multiple threads accessing the same document.  Most of the
Batik
methods try not to copy the document you pass to it so if you set the document on the canvas
and then
try and do something else with the document you could easily run into this sort of issue.

On Mar 13, 2013, at 7:28 AM, mihir <mihir_amreli@yahoo.com> wrote:

> with every run , the program throws random exception,
> 
> like
> 
> **** CSSEngine: exception property.syntax.error:org.w3c.dom.DOMException:
> The "o" identifier is not a valid value for the "shape-rendering" property. 
> 
> AttrValue:auto
> 
> ***** CSSEngine: exception property.syntax.error:org.w3c.dom.DOMException:
> The "" identifier is not a valid value for the "shape-rendering" property. 



> AttrValue:auto
> 
> Exception:org.w3c.dom.DOMException
> org.w3c.dom.DOMException: The "" identifier is not a valid value for the
> "shape-rendering" property. 
> 	at
> org.apache.batik.css.engine.value.AbstractValueFactory.createInvalidIdentifierDOMException(AbstractValueFactory.java:50)
> 	at
> org.apache.batik.css.engine.value.IdentifierManager.createValue(IdentifierManager.java:48)
> 	at org.apache.batik.css.engine.CSSEngine$1.property(CSSEngine.java:744)
> 	at
> org.apache.batik.css.engine.CSSEngine.getCascadedStyleMap(CSSEngine.java:768)
> 	at
> org.apache.batik.css.engine.CSSEngine.getComputedStyle(CSSEngine.java:876)
> 	at
> org.apache.batik.bridge.CSSUtilities.getComputedStyle(CSSUtilities.java:82)
> 	at
> org.apache.batik.bridge.CSSUtilities.convertVisibility(CSSUtilities.java:579)
> 	at
> org.apache.batik.bridge.SVGSVGElementBridge.createGraphicsNode(SVGSVGElementBridge.java:142)
> 	at org.apache.batik.bridge.GVTBuilder.build(GVTBuilder.java:76)
> 	at
> org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(SVGAbstractTranscoder.java:208)
> 	at
> com.mmg.app.svg.TiledImageTranscoder.transcode(TiledImageTranscoder.java:61)
> 	at
> org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(XMLAbstractTranscoder.java:142)
> 	at
> org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(SVGAbstractTranscoder.java:156)
> 	at
> com.mmg.app.svg.ShoeComponentPNGCreator.savePngImage(ShoeComponentPNGCreator.java:601)
> 	at
> com.mmg.app.svg.ShoeComponentPNGCreator.create72DPIOriginalImage(ShoeComponentPNGCreator.java:305)
> 	at
> com.mmg.app.svg.ShoeComponentPNGCreator.processStyleImaging(ShoeComponentPNGCreator.java:226)
> 	at
> com.mmg.app.svg.ShoeComponentPNGCreator.traverseFolder(ShoeComponentPNGCreator.java:186)
> 	at
> com.mmg.app.svg.ShoeComponentPNGCreator.main(ShoeComponentPNGCreator.java:662)
> 
> ***** CSSEngine: exception....
> org.w3c.dom.DOMException:
> file:/F:/workspace/MonoGeneiousShoe/src/svg/72DPI/Style-5/Left_Style-5.svg:
> The attribute "shape-rendering" represents an invalid CSS value ("auto").
> Original message:
> The "" identifier is not a valid value for the "shape-rendering" property. 
> 	at
> org.apache.batik.css.engine.CSSEngine.getCascadedStyleMap(CSSEngine.java:784)
> 	at
> org.apache.batik.css.engine.CSSEngine.getComputedStyle(CSSEngine.java:876)
> 	at
> org.apache.batik.bridge.CSSUtilities.getComputedStyle(CSSUtilities.java:82)
> 	at
> org.apache.batik.bridge.CSSUtilities.convertVisibility(CSSUtilities.java:579)
> 	at
> org.apache.batik.bridge.SVGSVGElementBridge.createGraphicsNode(SVGSVGElementBridge.java:142)
> 	at org.apache.batik.bridge.GVTBuilder.build(GVTBuilder.java:76)
> 	at
> org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(SVGAbstractTranscoder.java:208)
> 	at
> com.mmg.app.svg.TiledImageTranscoder.transcode(TiledImageTranscoder.java:61)
> 	at
> org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(XMLAbstractTranscoder.java:142)
> 	at
> org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(SVGAbstractTranscoder.java:156)
> 	at
> com.mmg.app.svg.ShoeComponentPNGCreator.savePngImage(ShoeComponentPNGCreator.java:601)
> 	at
> com.mmg.app.svg.ShoeComponentPNGCreator.create72DPIOriginalImage(ShoeComponentPNGCreator.java:305)
> 	at
> com.mmg.app.svg.ShoeComponentPNGCreator.processStyleImaging(ShoeComponentPNGCreator.java:226)
> 	at
> com.mmg.app.svg.ShoeComponentPNGCreator.traverseFolder(ShoeComponentPNGCreator.java:186)
> 	at
> com.mmg.app.svg.ShoeComponentPNGCreator.main(ShoeComponentPNGCreator.java:662)
> 
> Exception:org.w3c.dom.DOMException
> org.w3c.dom.DOMException: The "o" identifier is not a valid value for the
> "shape-rendering" property. 
> 	at
> org.apache.batik.css.engine.value.AbstractValueFactory.createInvalidIdentifierDOMException(AbstractValueFactory.java:50)
> 	at
> org.apache.batik.css.engine.value.IdentifierManager.createValue(IdentifierManager.java:48)
> 	at org.apache.batik.css.engine.CSSEngine$1.property(CSSEngine.java:744)
> 	at
> org.apache.batik.css.engine.CSSEngine.getCascadedStyleMap(CSSEngine.java:768)
> 	at
> org.apache.batik.css.engine.CSSEngine.getComputedStyle(CSSEngine.java:876)
> 	at
> org.apache.batik.bridge.CSSUtilities.getComputedStyle(CSSUtilities.java:82)
> 	at
> org.apache.batik.bridge.CSSUtilities.convertVisibility(CSSUtilities.java:579)
> 	at
> org.apache.batik.bridge.SVGSVGElementBridge.createGraphicsNode(SVGSVGElementBridge.java:142)
> 	at org.apache.batik.bridge.GVTBuilder.build(GVTBuilder.java:76)
> 	at org.apache.batik.swing.svg.GVTTreeBuilder.run(GVTTreeBuilder.java:96)
> ERROR: null
> Enclosed Exception:
> file:/F:/workspace/MonoGeneiousShoe/src/svg/72DPI/Style-5/Left_Style-5.svg:
> The attribute "shape-rendering" represents an invalid CSS value ("auto").
> Original message:
> The "" identifier is not a valid value for the "shape-rendering" property. 
> 
> ***** CSSEngine: exception....
> org.w3c.dom.DOMException:
> file:/F:/workspace/MonoGeneiousShoe/src/svg/72DPI/Style-5/Left_Style-5.svg:
> The attribute "shape-rendering" represents an invalid CSS value ("auto").
> Original message:
> The "o" identifier is not a valid value for the "shape-rendering" property. 
> 	at
> org.apache.batik.css.engine.CSSEngine.getCascadedStyleMap(CSSEngine.java:784)
> 	at
> org.apache.batik.css.engine.CSSEngine.getComputedStyle(CSSEngine.java:876)
> 	at
> org.apache.batik.bridge.CSSUtilities.getComputedStyle(CSSUtilities.java:82)
> 	at
> org.apache.batik.bridge.CSSUtilities.convertVisibility(CSSUtilities.java:579)
> 	at
> org.apache.batik.bridge.SVGSVGElementBridge.createGraphicsNode(SVGSVGElementBridge.java:142)
> 	at org.apache.batik.bridge.GVTBuilder.build(GVTBuilder.java:76)
> 	at org.apache.batik.swing.svg.GVTTreeBuilder.run(GVTTreeBuilder.java:96)
> ERROR: null
> Enclosed Exception:
> file:/F:/workspace/MonoGeneiousShoe/src/svg/72DPI/Style-5/Left_Style-5.svg:
> The attribute "shape-rendering" represents an invalid CSS value ("auto").
> Original message:
> The "o" identifier is not a valid value for the "shape-rendering" property. 
> 
> ***** CSSEngine: exception property.syntax.error:org.w3c.dom.DOMException:
> The "lormal" identifier is not a valid value for the "font-style" property. 
> 
> AttrValue:normal
> 
> Exception:org.w3c.dom.DOMException
> org.w3c.dom.DOMException: The "lormal" identifier is not a valid value for
> the "font-style" property. 
> 	at
> org.apache.batik.css.engine.value.AbstractValueFactory.createInvalidIdentifierDOMException(AbstractValueFactory.java:50)
> 	at
> org.apache.batik.css.engine.value.IdentifierManager.createValue(IdentifierManager.java:48)
> 	at org.apache.batik.css.engine.CSSEngine$1.property(CSSEngine.java:744)
> 	at
> org.apache.batik.css.engine.CSSEngine.getCascadedStyleMap(CSSEngine.java:768)
> 	at
> org.apache.batik.css.engine.CSSEngine.getComputedStyle(CSSEngine.java:876)
> 	at
> org.apache.batik.bridge.CSSUtilities.getComputedStyle(CSSUtilities.java:82)
> 	at
> org.apache.batik.bridge.CSSUtilities.convertVisibility(CSSUtilities.java:579)
> 	at
> org.apache.batik.bridge.SVGSVGElementBridge.createGraphicsNode(SVGSVGElementBridge.java:142)
> 	at org.apache.batik.bridge.GVTBuilder.build(GVTBuilder.java:76)
> 	at
> org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(SVGAbstractTranscoder.java:208)
> 	at
> com.mmg.app.svg.TiledImageTranscoder.transcode(TiledImageTranscoder.java:61)
> 	at
> org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(XMLAbstractTranscoder.java:142)
> 	at
> org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(SVGAbstractTranscoder.java:156)
> 	at
> com.mmg.app.svg.ShoeComponentPNGCreator.savePngImage(ShoeComponentPNGCreator.java:601)
> 	at
> com.mmg.app.svg.ShoeComponentPNGCreator.create72DPIOriginalImage(ShoeComponentPNGCreator.java:305)
> 	at
> com.mmg.app.svg.ShoeComponentPNGCreator.processStyleImaging(ShoeComponentPNGCreator.java:226)
> 	at
> com.mmg.app.svg.ShoeComponentPNGCreator.traverseFolder(ShoeComponentPNGCreator.java:186)
> 	at
> com.mmg.app.svg.ShoeComponentPNGCreator.main(ShoeComponentPNGCreator.java:662)
> 
> ***** CSSEngine: exception....
> org.w3c.dom.DOMException:
> file:/F:/workspace/MonoGeneiousShoe/src/svg/72DPI/Style-5/Left_Style-5.svg:
> The attribute "font-style" represents an invalid CSS value ("normal").
> Original message:
> The "lormal" identifier is not a valid value for the "font-style" property. 
> 	at
> org.apache.batik.css.engine.CSSEngine.getCascadedStyleMap(CSSEngine.java:784)
> 	at
> org.apache.batik.css.engine.CSSEngine.getComputedStyle(CSSEngine.java:876)
> 	at
> org.apache.batik.bridge.CSSUtilities.getComputedStyle(CSSUtilities.java:82)
> 	at
> org.apache.batik.bridge.CSSUtilities.convertVisibility(CSSUtilities.java:579)
> 	at
> org.apache.batik.bridge.SVGSVGElementBridge.createGraphicsNode(SVGSVGElementBridge.java:142)
> 	at org.apache.batik.bridge.GVTBuilder.build(GVTBuilder.java:76)
> 	at
> org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(SVGAbstractTranscoder.java:208)
> 	at
> com.mmg.app.svg.TiledImageTranscoder.transcode(TiledImageTranscoder.java:61)
> 	at
> org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(XMLAbstractTranscoder.java:142)
> 	at
> org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(SVGAbstractTranscoder.java:156)
> 	at
> com.mmg.app.svg.ShoeComponentPNGCreator.savePngImage(ShoeComponentPNGCreator.java:601)
> 	at
> com.mmg.app.svg.ShoeComponentPNGCreator.create72DPIOriginalImage(ShoeComponentPNGCreator.java:305)
> 	at
> com.mmg.app.svg.ShoeComponentPNGCreator.processStyleImaging(ShoeComponentPNGCreator.java:226)
> 	at
> com.mmg.app.svg.ShoeComponentPNGCreator.traverseFolder(ShoeComponentPNGCreator.java:186)
> 	at
> com.mmg.app.svg.ShoeComponentPNGCreator.main(ShoeComponentPNGCreator.java:662)
> ERROR: null
> Enclosed Exception:
> file:/F:/workspace/MonoGeneiousShoe/src/svg/72DPI/Style-5/Left_Style-5.svg:
> The attribute "font-style" represents an invalid CSS value ("normal").
> Original message:
> The "lormal" identifier is not a valid value for the "font-style" property. 
> java.lang.NullPointerException
> 	at
> com.mmg.app.svg.TiledImageTranscoder.transcode(TiledImageTranscoder.java:69)
> 	at
> org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(XMLAbstractTranscoder.java:142)
> 	at
> org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(SVGAbstractTranscoder.java:156)
> 	at
> com.mmg.app.svg.ShoeComponentPNGCreator.savePngImage(ShoeComponentPNGCreator.java:601)
> 	at
> com.mmg.app.svg.ShoeComponentPNGCreator.create72DPIOriginalImage(ShoeComponentPNGCreator.java:305)
> 	at
> com.mmg.app.svg.ShoeComponentPNGCreator.processStyleImaging(ShoeComponentPNGCreator.java:226)
> 	at
> com.mmg.app.svg.ShoeComponentPNGCreator.traverseFolder(ShoeComponentPNGCreator.java:186)
> 	at
> com.mmg.app.svg.ShoeComponentPNGCreator.main(ShoeComponentPNGCreator.java:662)
> 
> 
> sometimes it says height is 0 , sometimes it says stroke-width is not valid
> attributes etc.
> 
> 
> i think it is CSS engine related issue. what do i do wrong here ? 
> 
> Thank You
> Mihir Parekh
> 
> 
> 
> --
> View this message in context: http://batik.2283329.n4.nabble.com/Strange-CSS-Exception-while-loading-updating-and-transcoding-svg-document-tp4655504.html
> 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
> 


---------------------------------------------------------------------
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