Community
Participate
Working Groups
Build Identifier: M20100909-0800 Start the eclipse with GMF installed also with orbit extracted to dropins/ directory. 1. Create a geoshape plugin according to the examples wizard. 2. Debug a eclipse instance. 3. Create a geoshape diagram instance. 4. Try to "Save As Image", choose the format of PNG/SVG/PDF. An NoClassDefFoundError will be thrown. See attached screenshot. If i remove the "duplicated" org.apache.batik.ext.awt_1.7.0.v200903091627.jar that come from orbit.zip, and restart eclipse, the saveAsImage action would work. So it looks like to me that the coexists of uncompatible org.apache.batik.ext.awt it's the cause of the issue. But in the manifest of org.apache.batik.transcoder_1.6.0(which is the caller of org.apache.batik.ext.awt in this case), the require version is given like this: org.apache.batik.ext.awt;version="[1.6.0,1.7.0)" So i suppose a coexist of two version of org.apache.batik.ext.awt should not cause such a problem. Should this be a problem of GMF runtime, or a problem of bundle loading? Test on GMF version: 1.4.1 Reproducible: Always Steps to Reproduce: 1. Create a geoshape plugin according to the examples wizard. 2. Debug a eclipse instance. 3. Create a geoshape diagram instance. 4. Try to "Save As Image", choose the format of PNG/SVG/PDF. An NoClassDefFoundError will be thrown. See attached screenshot.
Created attachment 189922 [details] screenshot
Created attachment 189923 [details] the log
while trying on Eclipse 3.7 with GMF 1.4.1, png and svg work fine, but PDF will report the following exception: java.lang.ClassCastException: org.eclipse.gmf.runtime.draw2d.ui.render.internal.image.ImageRenderedImage cannot be cast to org.eclipse.gmf.runtime.draw2d.ui.render.awt.internal.svg.SVGImage at org.eclipse.gmf.runtime.diagram.ui.render.util.CopyToImageUtil.saveToOutputStream(CopyToImageUtil.java:529) at org.eclipse.gmf.runtime.diagram.ui.render.util.CopyToImageUtil.saveToFile(CopyToImageUtil.java:513) at org.eclipse.gmf.runtime.diagram.ui.render.util.CopyToImageUtil.copyToImage(CopyToImageUtil.java:378) at org.eclipse.gmf.runtime.diagram.ui.render.util.CopyToImageUtil.copyToImage(CopyToImageUtil.java:305) at org.eclipse.gmf.runtime.diagram.ui.render.actions.CopyToImageAction$1.run(CopyToImageAction.java:260) at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372)
We are having the same problem here. > while trying on Eclipse 3.7 with GMF 1.4.1, png and svg work fine, but PDF will > report the following exception: > > java.lang.ClassCastException: > org.eclipse.gmf.runtime.draw2d.ui.render.internal.image.ImageRenderedImage > cannot be cast to > org.eclipse.gmf.runtime.draw2d.ui.render.awt.internal.svg.SVGImage > at > org.eclipse.gmf.runtime.diagram.ui.render.util.CopyToImageUtil.saveToOutputStream(CopyToImageUtil.java:529) > at > org.eclipse.gmf.runtime.diagram.ui.render.util.CopyToImageUtil.saveToFile(CopyToImageUtil.java:513) > at > org.eclipse.gmf.runtime.diagram.ui.render.util.CopyToImageUtil.copyToImage(CopyToImageUtil.java:378) > at > org.eclipse.gmf.runtime.diagram.ui.render.util.CopyToImageUtil.copyToImage(CopyToImageUtil.java:305) > at > org.eclipse.gmf.runtime.diagram.ui.render.actions.CopyToImageAction$1.run(CopyToImageAction.java:260) > at > org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464) > at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372)
*** Bug 361888 has been marked as a duplicate of this bug. ***
Hello I currently also face this problem. Are there any news on this bug?
(In reply to Svenja Wendler from comment #6) > Hello I currently also face this problem. Are there any news on this bug? Hi. I'm in the process of updating the Batik version used by GMF Runtime (for completely different reasons), so I'll keep this scenario in mind and try to have a look. I can't make any guarantee though, as we have limited resources to put into GMF and a large part has already been consumed by the Batik upgrade.