Unable to export (no formats available)
Brought to you by:
sdedit
I'm using version 4.01 on a mac version 10.9.5 with java 1.8.0-ea.
The program mostly works fine (and is very nice) but I'm having trouble with the export function. When I choose export the dialog box (I assume for graphics formats) is empty, and I can't export the diagrams.
If I run it on the command line it does work (although I'll have to fiddle with the command line options to recreate the preferences I've made when running it with the GUI).
I am experiencing the same problem on Linux running an Oracle Java 8 Runtime Environment.
I have not implemented that dialog, it is from the Freehep vector-graphics library, which relies (to a small extent) on an internal API that has again changed with Java 8.
When GIF export is disabled, the dialog should again work as expected. It can be disabled like this:
Open sdedit-4.01.jar with an archiver that allows you to edit files and save them back to the archive.
Open: META-INF/services/javax.imageio.spi.ImageWriterSpi
Remove the lines containing: org.freehep.graphicsio.gif.GIFImageWriterSpi
Save META-INF/services/javax.imageio.spi.ImageWriterSpi
Open META-INF/services/org.freehep.util.export.ExportFileType
Remove the line containing: org.freehep.graphicsio.gif.GIFExportFileType
Save META-INF/services/org.freehep.util.export.ExportFileType
Run sdedit-4.01.jar
I will soon release a new version in which the Freehep GIF export will be either fixed to work also on Java 8 (unlikely) or simply disabled (very likely).
Last edit: Markus Strauch 2015-01-22
Thanks for the rapid response, glad to see you are still looking after this tool, it looks like something I could use a good bit.
Tried the changes you suggested, but still got an error on export (stack trace appended).
I don't know if it's connected but I also could not start on the command line with no options supplying the path name of the file I'm working on (in order to avoid messing with the file open dialog). When I tried I got a dialog saying "Cannot handle path/to/file" but the file opens fine via the open file dialog if I open sdedit without a file on the command line.
stack trace when exporting:
java.lang.NoClassDefFoundError: Could not initialize class org.freehep.graphicsio.ImageGraphics2D
at org.freehep.graphicsio.exportchooser.ImageExportFileType.getGraphics(ImageExportFileType.java:221)
at org.freehep.graphicsio.exportchooser.AbstractExportFileType.getGraphics(AbstractExportFileType.java:263)
at org.freehep.graphicsio.exportchooser.AbstractExportFileType.exportToFile(AbstractExportFileType.java:248)
at org.freehep.graphicsio.exportchooser.AbstractExportFileType.exportToFile(AbstractExportFileType.java:282)
at org.freehep.util.export.ExportDialog.writeFile(Unknown Source)
at org.freehep.util.export.ExportDialog.setValue(Unknown Source)
at javax.swing.plaf.basic.BasicOptionPaneUI$ButtonActionListener.actionPerformed(BasicOptionPaneUI.java:1198)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2346)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.Component.processMouseEvent(Component.java:6522)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3322)
at java.awt.Component.processEvent(Component.java:6287)
at java.awt.Container.processEvent(Container.java:2229)
at java.awt.Component.dispatchEventImpl(Component.java:4878)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Component.dispatchEvent(Component.java:4700)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4872)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4528)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4457)
at java.awt.Container.dispatchEventImpl(Container.java:2273)
at java.awt.Window.dispatchEventImpl(Window.java:2706)
at java.awt.Component.dispatchEvent(Component.java:4700)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:743)
at java.awt.EventQueue.access$400(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:694)
at java.awt.EventQueue$3.run(EventQueue.java:691)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.awt.EventQueue$4.run(EventQueue.java:716)
at java.awt.EventQueue$4.run(EventQueue.java:714)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:713)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:220)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:135)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:127)
at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:184)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:229)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:227)
at java.awt.Dialog.show(Dialog.java:1084)
at java.awt.Component.show(Component.java:1656)
at java.awt.Component.setVisible(Component.java:1608)
at java.awt.Window.setVisible(Window.java:996)
at java.awt.Dialog.setVisible(Dialog.java:1005)
at org.freehep.util.export.ExportDialog.showExportDialog(Unknown Source)
at net.sf.sdedit.editor.ExportAction._actionPerformed(Unknown Source)
at net.sf.sdedit.editor.ExportAction._actionPerformed(Unknown Source)
at net.sf.sdedit.editor.TabAction.actionPerformed(Unknown Source)
at net.sf.sdedit.ui.components.buttons.ManagedAction.actionPerformed(Unknown Source)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2346)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:833)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:877)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
at java.awt.Component.processMouseEvent(Component.java:6522)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3322)
at java.awt.Component.processEvent(Component.java:6287)
at java.awt.Container.processEvent(Container.java:2229)
at java.awt.Component.dispatchEventImpl(Component.java:4878)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Component.dispatchEvent(Component.java:4700)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4872)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4528)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4457)
at java.awt.Container.dispatchEventImpl(Container.java:2273)
at java.awt.Window.dispatchEventImpl(Window.java:2706)
at java.awt.Component.dispatchEvent(Component.java:4700)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:743)
at java.awt.EventQueue.access$400(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:694)
at java.awt.EventQueue$3.run(EventQueue.java:691)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.awt.EventQueue$4.run(EventQueue.java:716)
at java.awt.EventQueue$4.run(EventQueue.java:714)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:713)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:220)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:135)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:123)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:119)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:111)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:97)
With Java 8 on Windows there seems to be not problem at all.
Also, I have no problem with naming a file on the command line and opening it, as long as it ends with '.sdx' or '.sd'.
So we have
Given that I am still sticking with MacOSX Snow Leopard I cannot test sdedit running on a Mac JRE >= 7.
org.freehep.graphicsio.ImageGraphics2D uses classes that are inside the
javax.imageio
package.
I guess that package is not (yet?) available on Java 8 (early access) for MacOSX.
First thing: with the command line my problem was that I didn't realize that I needed to name the file with '.sdx' or '.sd'. When I did that worked fine. So unless I missed something I'd argue that's a documentation bug ;-)
But for the real problem, I'm happy to do a bit of investigation, although I don't use java much so I'm rather rusty.
I did upgrade the version on my mac to the latest version (1.8.0_31) and the problem is still there.
I wrote a hello world program that included "import javax.imageio.*;" and it compiled and ran. So I think that means that javax.imageio is available on the system. I can fiddle with this a bit more but if there any test directions you think would be best to follow let me know. (And if you'd rather talk directly than via this web interface, my email is fowler@acm.org)
I am also trying to export graphics. I am running version sdedit-4.01 with Java 1.8.0_31 on Mac OSX 10.9.5 and I cannot export graphics. If I click the browse button nothing comes up and when I click the save button I get a null exception error with the terminal also filling up with exceptions.
I removed the gif line out of both files as outlined above and still does not work.
Thank you....