2013-06-27 38 views
2

由於我已更新至JRE 1.7.0_25,因此在應用轉換時,batik會拋出異常。Batik自JRE以來的轉換失敗1.7.0_25

的堆棧跟蹤是:

java.awt.image.ImagingOpException: Unable to transform src image 
at java.awt.image.AffineTransformOp.filter(Unknown Source) 
at org.apache.batik.ext.awt.image.rendered.AffineRed.genRect(AffineRed.java:193) 
at org.apache.batik.ext.awt.image.rendered.AffineRed.copyData(AffineRed.java:109) 
at org.apache.batik.ext.awt.image.rendered.PadRed.copyData(PadRed.java:88) 
at org.apache.batik.ext.awt.image.rendered.PadRed.copyData(PadRed.java:88) 
at org.apache.batik.ext.awt.image.rendered.Any2sRGBRed.copyData(Any2sRGBRed.java:166) 
at org.apache.batik.ext.awt.image.rendered.AbstractRed.getData(AbstractRed.java:526) 
at org.apache.batik.ext.awt.image.GraphicsUtil.drawImage(GraphicsUtil.java:264) 
at org.apache.batik.ext.awt.image.GraphicsUtil.drawImage(GraphicsUtil.java:455) 
at org.apache.batik.gvt.AbstractGraphicsNode.paint(AbstractGraphicsNode.java:549) 
at org.apache.batik.gvt.ShapeNode.paint(ShapeNode.java:143) 
at org.apache.batik.gvt.CompositeGraphicsNode.primitivePaint(CompositeGraphicsNode.java:165) 
at org.apache.batik.gvt.AbstractGraphicsNode.paint(AbstractGraphicsNode.java:509) 
at org.apache.batik.gvt.CompositeGraphicsNode.primitivePaint(CompositeGraphicsNode.java:165) 
at org.apache.batik.gvt.filter.GraphicsNodeRed8Bit.genRect(GraphicsNodeRed8Bit.java:140) 
at org.apache.batik.gvt.filter.GraphicsNodeRed8Bit.copyData(GraphicsNodeRed8Bit.java:116) 
at org.apache.batik.ext.awt.image.rendered.PadRed.copyData(PadRed.java:88) 
at org.apache.batik.ext.awt.image.rendered.Any2LsRGBRed.copyData(Any2LsRGBRed.java:109) 
at org.apache.batik.ext.awt.image.rendered.AbstractRed.getData(AbstractRed.java:526) 
at org.apache.batik.ext.awt.image.rendered.CompositeRed.genRect(CompositeRed.java:188) 
at org.apache.batik.ext.awt.image.rendered.CompositeRed.copyData(CompositeRed.java:139) 
at org.apache.batik.ext.awt.image.rendered.Any2sRGBRed.copyData(Any2sRGBRed.java:166) 
at org.apache.batik.ext.awt.image.GraphicsUtil.drawImage(GraphicsUtil.java:347) 
at org.apache.batik.ext.awt.image.GraphicsUtil.drawImage(GraphicsUtil.java:455) 
at org.apache.batik.ext.awt.image.renderable.PadRable8Bit.paintRable(PadRable8Bit.java:135) 
at org.apache.batik.ext.awt.image.GraphicsUtil.drawImage(GraphicsUtil.java:440) 
at org.apache.batik.ext.awt.image.renderable.PadRable8Bit.paintRable(PadRable8Bit.java:135) 
at org.apache.batik.ext.awt.image.GraphicsUtil.drawImage(GraphicsUtil.java:440) 
at org.apache.batik.ext.awt.image.renderable.FilterChainRable8Bit.paintRable(FilterChainRable8Bit.java:251) 
at org.apache.batik.ext.awt.image.GraphicsUtil.drawImage(GraphicsUtil.java:440) 
at org.apache.batik.gvt.AbstractGraphicsNode.paint(AbstractGraphicsNode.java:549) 
at org.apache.batik.gvt.CompositeGraphicsNode.primitivePaint(CompositeGraphicsNode.java:165) 
at org.apache.batik.gvt.AbstractGraphicsNode.paint(AbstractGraphicsNode.java:509) 
at org.apache.batik.gvt.CompositeGraphicsNode.primitivePaint(CompositeGraphicsNode.java:165) 
at org.apache.batik.gvt.CanvasGraphicsNode.primitivePaint(CanvasGraphicsNode.java:159) 
at org.apache.batik.gvt.AbstractGraphicsNode.paint(AbstractGraphicsNode.java:509) 
at org.apache.batik.gvt.CompositeGraphicsNode.primitivePaint(CompositeGraphicsNode.java:165) 
at org.apache.batik.gvt.filter.GraphicsNodeRed8Bit.genRect(GraphicsNodeRed8Bit.java:140) 
at org.apache.batik.gvt.filter.GraphicsNodeRed8Bit.copyData(GraphicsNodeRed8Bit.java:116) 
at org.apache.batik.ext.awt.image.rendered.TranslateRed.copyData(TranslateRed.java:105) 
at org.apache.batik.gvt.renderer.DynamicRenderer.repaint(DynamicRenderer.java:244) 
at org.apache.batik.gvt.renderer.StaticRenderer.repaint(StaticRenderer.java:344) 
at org.apache.batik.swing.gvt.GVTTreeRenderer.run(GVTTreeRenderer.java:123) 

唯一的例外是在this line in AffineRed.java拋出。

有誰如何解決這個問題或這是在JRE一個臨時的錯誤?

回答

3

這是在Java中的regression 7更新25 Aggravatingly,甲骨文似乎將拖延修復的,直到更新60.它不喜歡的人依賴於Java的任何東西迴歸。謝謝,甲骨文!

有一個在this post關於如何避免此類問題的簡要說明從蠟染郵件列表:

我已經能夠迄今爲止發現的唯一的解決方法是打補丁蠟染 來源不再打電話BufferedImageOp中。直接在源 和目標圖像上過濾,但要過濾兩個ARGB BufferedImage副本。

遺憾的是,這意味着必須複製源圖像和目標圖像,如果它們不是ARGB的話。

+0

謝謝,我已閱讀有關回歸。修理蠟染 - 哈哈,多年來沒有真正的進展。 – Stephan

+0

蠟染中沒有什麼可以解決的。這不是他們的錯誤。在這種情況下,Batik根據規範使用Java。 – uckelman

+1

托馬斯(寫這篇文章的人)向我寄來了一個修補蠟染來源的補丁,以解決這個問題。他還沒有回覆我的電子郵件,所以我沒有發佈它,但如果有人正面臨這個問題,請通過電子郵件發送給我。 –

3

Thomas Behr(編寫this post的人)創建了一個修補程序,該修補程序使用sibling answer中描述的解決方法修復了問題。

他親切地把它交給我,當我問他,既然很多人聯繫我這個補丁,我決定把它發佈在誠信,托馬斯並不介意。

應用它的蠟染1.7源頂部,你應該罰款。

+0

謝謝,我會試試看。 – Stephan