Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » SVG export tutorial example not working(Corrupted svg export from tutorial example)
SVG export tutorial example not working [message #1809164] Wed, 10 July 2019 12:36 Go to next message
Abhishek Chakraborty is currently offline Abhishek ChakrabortyFriend
Messages: 82
Registered: July 2009
Location: Cologne, Germany
Member

I am using Graphiti v0.16.0 with
Eclipse Modeling Tools
Version: 2019-06 (4.12.0)
Build id: 20190614-1200


When exporting SVG image for a simple tutorial example with one ECLass Node figure, the output svg is corrupted .

Regards,

Abhishek Chakraborty


Regards,
Abhishek Chakraborty
Re: SVG export tutorial example not working [message #1809166 is a reply to message #1809164] Wed, 10 July 2019 12:57 Go to previous messageGo to next message
Abhishek Chakraborty is currently offline Abhishek ChakrabortyFriend
Messages: 82
Registered: July 2009
Location: Cologne, Germany
Member


!ENTRY org.eclipse.graphiti 4 0 2019-07-10 14:55:20.588
!MESSAGE Cannot save image:
!STACK 0
java.lang.reflect.InvocationTargetException
at org.eclipse.graphiti.ui.features.DefaultSaveImageFeature$1.run(DefaultSaveImageFeature.java:281)
at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:438)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:354)
at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:469)
at org.eclipse.graphiti.ui.features.DefaultSaveImageFeature.save(DefaultSaveImageFeature.java:114)
at org.eclipse.graphiti.features.impl.AbstractSaveImageFeature.execute(AbstractSaveImageFeature.java:100)
at org.eclipse.graphiti.internal.command.GenericFeatureCommandWithContext.execute(GenericFeatureCommandWithContext.java:58)
at org.eclipse.graphiti.ui.internal.command.GefCommandWrapper.execute(GefCommandWrapper.java:48)
at org.eclipse.graphiti.ui.internal.editor.EmfOnGefCommand.execute(EmfOnGefCommand.java:51)
at org.eclipse.graphiti.internal.command.GFPreparableCommand2.doExecute(GFPreparableCommand2.java:40)
at org.eclipse.emf.transaction.RecordingCommand.execute(RecordingCommand.java:135)
at org.eclipse.emf.workspace.EMFCommandOperation.doExecute(EMFCommandOperation.java:119)
at org.eclipse.emf.workspace.AbstractEMFOperation.execute(AbstractEMFOperation.java:150)
at org.eclipse.core.commands.operations.DefaultOperationHistory.execute(DefaultOperationHistory.java:495)
at org.eclipse.emf.workspace.impl.WorkspaceCommandStackImpl.doExecute(WorkspaceCommandStackImpl.java:208)
at org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.execute(AbstractTransactionalCommandStack.java:165)
at org.eclipse.graphiti.ui.internal.editor.GFWorkspaceCommandStackImpl.execute(GFWorkspaceCommandStackImpl.java:94)
at org.eclipse.graphiti.ui.internal.editor.GFCommandStack.execute(GFCommandStack.java:136)
at org.eclipse.graphiti.ui.internal.action.SaveImageAction.executeOnCommandStack(SaveImageAction.java:106)
at org.eclipse.graphiti.ui.internal.action.SaveImageAction.run(SaveImageAction.java:89)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:474)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:580)
at org.eclipse.jface.action.ActionContributionItem.lambda$4(ActionContributionItem.java:412)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5874)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1400)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:5138)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4663)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1173)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1062)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:635)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:559)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:155)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:660)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:597)
at org.eclipse.equinox.launcher.Main.run(Main.java:1468)
at org.eclipse.equinox.launcher.Main.main(Main.java:1441)
Caused by: java.lang.NullPointerException
at org.apache.batik.svggen.ImageHandlerBase64Encoder.encodeImage(ImageHandlerBase64Encoder.java:157)
at org.apache.batik.svggen.ImageHandlerBase64Encoder.handleHREF(ImageHandlerBase64Encoder.java:133)
at org.apache.batik.svggen.ImageHandlerBase64Encoder.handleHREF(ImageHandlerBase64Encoder.java:72)
at org.apache.batik.svggen.DefaultImageHandler.handleImage(DefaultImageHandler.java:63)
at org.apache.batik.svggen.SimpleImageHandler.handleImage(SimpleImageHandler.java:100)
at org.apache.batik.svggen.SVGGraphics2D.drawImage(SVGGraphics2D.java:677)
at org.apache.batik.svggen.SVGGraphics2D.drawImage(SVGGraphics2D.java:868)
at org.eclipse.graphiti.export.batik.GraphicsToGraphics2DAdaptor.drawString(GraphicsToGraphics2DAdaptor.java:764)
at org.eclipse.graphiti.export.batik.GraphicsToGraphics2DAdaptor.drawText(GraphicsToGraphics2DAdaptor.java:719)
at org.eclipse.draw2d.Graphics.drawText(Graphics.java:426)
at org.eclipse.draw2d.Label.paintFigure(Label.java:515)
at org.eclipse.graphiti.ui.internal.figures.GFText.paintFigure(GFText.java:149)
at org.eclipse.draw2d.Figure.paint(Figure.java:1118)
at org.eclipse.draw2d.Figure.paintChildren(Figure.java:1170)
at org.eclipse.draw2d.Figure.paintClientArea(Figure.java:1205)
at org.eclipse.draw2d.Figure.paint(Figure.java:1120)
at org.eclipse.draw2d.Figure.paintChildren(Figure.java:1170)
at org.eclipse.draw2d.Figure.paintClientArea(Figure.java:1209)
at org.eclipse.draw2d.Figure.paint(Figure.java:1120)
at org.eclipse.draw2d.Figure.paintChildren(Figure.java:1170)
at org.eclipse.draw2d.Figure.paintClientArea(Figure.java:1205)
at org.eclipse.draw2d.Figure.paint(Figure.java:1120)
at org.eclipse.draw2d.Figure.paintChildren(Figure.java:1170)
at org.eclipse.draw2d.Figure.paintClientArea(Figure.java:1205)
at org.eclipse.draw2d.Figure.paint(Figure.java:1120)
at org.eclipse.graphiti.export.batik.SVGExporter.export(SVGExporter.java:50)
at org.eclipse.graphiti.ui.features.DefaultSaveImageFeature$1.run(DefaultSaveImageFeature.java:278)
... 49 more
Root exception:
java.lang.NullPointerException
at org.apache.batik.svggen.ImageHandlerBase64Encoder.encodeImage(ImageHandlerBase64Encoder.java:157)
at org.apache.batik.svggen.ImageHandlerBase64Encoder.handleHREF(ImageHandlerBase64Encoder.java:133)
at org.apache.batik.svggen.ImageHandlerBase64Encoder.handleHREF(ImageHandlerBase64Encoder.java:72)
at org.apache.batik.svggen.DefaultImageHandler.handleImage(DefaultImageHandler.java:63)
at org.apache.batik.svggen.SimpleImageHandler.handleImage(SimpleImageHandler.java:100)
at org.apache.batik.svggen.SVGGraphics2D.drawImage(SVGGraphics2D.java:677)
at org.apache.batik.svggen.SVGGraphics2D.drawImage(SVGGraphics2D.java:868)
at org.eclipse.graphiti.export.batik.GraphicsToGraphics2DAdaptor.drawString(GraphicsToGraphics2DAdaptor.java:764)
at org.eclipse.graphiti.export.batik.GraphicsToGraphics2DAdaptor.drawText(GraphicsToGraphics2DAdaptor.java:719)
at org.eclipse.draw2d.Graphics.drawText(Graphics.java:426)
at org.eclipse.draw2d.Label.paintFigure(Label.java:515)
at org.eclipse.graphiti.ui.internal.figures.GFText.paintFigure(GFText.java:149)
at org.eclipse.draw2d.Figure.paint(Figure.java:1118)
at org.eclipse.draw2d.Figure.paintChildren(Figure.java:1170)
at org.eclipse.draw2d.Figure.paintClientArea(Figure.java:1205)
at org.eclipse.draw2d.Figure.paint(Figure.java:1120)
at org.eclipse.draw2d.Figure.paintChildren(Figure.java:1170)
at org.eclipse.draw2d.Figure.paintClientArea(Figure.java:1209)
at org.eclipse.draw2d.Figure.paint(Figure.java:1120)
at org.eclipse.draw2d.Figure.paintChildren(Figure.java:1170)
at org.eclipse.draw2d.Figure.paintClientArea(Figure.java:1205)
at org.eclipse.draw2d.Figure.paint(Figure.java:1120)
at org.eclipse.draw2d.Figure.paintChildren(Figure.java:1170)
at org.eclipse.draw2d.Figure.paintClientArea(Figure.java:1205)
at org.eclipse.draw2d.Figure.paint(Figure.java:1120)
at org.eclipse.graphiti.export.batik.SVGExporter.export(SVGExporter.java:50)
at org.eclipse.graphiti.ui.features.DefaultSaveImageFeature$1.run(DefaultSaveImageFeature.java:278)
at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:438)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:354)
at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:469)
at org.eclipse.graphiti.ui.features.DefaultSaveImageFeature.save(DefaultSaveImageFeature.java:114)
at org.eclipse.graphiti.features.impl.AbstractSaveImageFeature.execute(AbstractSaveImageFeature.java:100)
at org.eclipse.graphiti.internal.command.GenericFeatureCommandWithContext.execute(GenericFeatureCommandWithContext.java:58)
at org.eclipse.graphiti.ui.internal.command.GefCommandWrapper.execute(GefCommandWrapper.java:48)
at org.eclipse.graphiti.ui.internal.editor.EmfOnGefCommand.execute(EmfOnGefCommand.java:51)
at org.eclipse.graphiti.internal.command.GFPreparableCommand2.doExecute(GFPreparableCommand2.java:40)
at org.eclipse.emf.transaction.RecordingCommand.execute(RecordingCommand.java:135)
at org.eclipse.emf.workspace.EMFCommandOperation.doExecute(EMFCommandOperation.java:119)
at org.eclipse.emf.workspace.AbstractEMFOperation.execute(AbstractEMFOperation.java:150)
at org.eclipse.core.commands.operations.DefaultOperationHistory.execute(DefaultOperationHistory.java:495)
at org.eclipse.emf.workspace.impl.WorkspaceCommandStackImpl.doExecute(WorkspaceCommandStackImpl.java:208)
at org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.execute(AbstractTransactionalCommandStack.java:165)
at org.eclipse.graphiti.ui.internal.editor.GFWorkspaceCommandStackImpl.execute(GFWorkspaceCommandStackImpl.java:94)
at org.eclipse.graphiti.ui.internal.editor.GFCommandStack.execute(GFCommandStack.java:136)
at org.eclipse.graphiti.ui.internal.action.SaveImageAction.executeOnCommandStack(SaveImageAction.java:106)
at org.eclipse.graphiti.ui.internal.action.SaveImageAction.run(SaveImageAction.java:89)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:474)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:580)
at org.eclipse.jface.action.ActionContributionItem.lambda$4(ActionContributionItem.java:412)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5874)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1400)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:5138)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4663)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1173)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1062)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:635)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:559)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:155)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:660)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:597)
at org.eclipse.equinox.launcher.Main.run(Main.java:1468)
at org.eclipse.equinox.launcher.Main.main(Main.java:1441)


Regards,
Abhishek Chakraborty
Re: SVG export tutorial example not working [message #1809184 is a reply to message #1809166] Thu, 11 July 2019 06:07 Go to previous message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1937
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Hi Abishek,

this sounds like a bug, would you please open a bugzilla against Graphiti to track that?

Thanks,
Michael
Previous Topic:Executing feature on object select
Next Topic:getPictogramElementForBusinessObject returns wrong business object
Goto Forum:
  


Current Time: Sun Dec 22 05:33:04 GMT 2024

Powered by FUDForum. Page generated in 0.03079 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top