Bug #5230
closedsaving workflow that has instances of user created class to a KAR gives errors
0%
Description
User reports the following:
In the past year I have built many workflows as part of an on-going project... In several of these workflows I have converted a kar to a class, and then used instances of that class throughout the workflow. When I try to save this type of workflow to a kar I get errors indicating that the class cannot be found. (interestingly, there is no trouble with saving, opening, and closing these workflows as .xmls... as long as I don't convert them to kars).
I'm attaching two versions of the same simple workflow: an xml and a kar, both of which display the result of an instance of an "expression class" (the expression actor converted to a class), as well as the error which ensues from attempting to open the kar. Note that we do not save our workflows to the KeplerData directory.
Files
Updated by Derik Barseghian about 14 years ago
User's trace is:
ptolemy.kernel.util.IllegalActionException: Cannot find class: Expression2
Because:
-- no protocol: Expression2.xml
-- XML file not found relative to classpath.
-- C:\Kepler\svn\Expression2.xml
C:\Kepler\svn\Expression2.xml (The system cannot find the file specified)
in http://ptolemy.eecs.berkeley.edu/xml/dtd/MoML_1.dtd at line 123 and column 46
at ptolemy.moml.MoMLParser._createEntity(MoMLParser.java:3877)
at ptolemy.moml.MoMLParser.startElement(MoMLParser.java:2493)
at com.microstar.xml.XmlParser.parseElement(XmlParser.java:921)
at com.microstar.xml.XmlParser.parseContent(XmlParser.java:1104)
at com.microstar.xml.XmlParser.parseElement(XmlParser.java:924)
at com.microstar.xml.XmlParser.parseDocument(XmlParser.java:481)
at com.microstar.xml.XmlParser.doParse(XmlParser.java:159)
at com.microstar.xml.XmlParser.parse(XmlParser.java:132)
at ptolemy.moml.MoMLParser.parse(MoMLParser.java:1402)
at ptolemy.moml.MoMLParser.parse(MoMLParser.java:1374)
at ptolemy.moml.MoMLParser.parse(MoMLParser.java:1335)
at org.kepler.kar.handlers.ActorMetadataKAREntryHandler.open(ActorMetadataKAREntryHandler.java:252)
at org.kepler.kar.KARFile.open(KARFile.java:968)
at org.kepler.kar.KARFile.openKARContents(KARFile.java:736)
at org.kepler.gui.kar.ExportArchiveAction.actionPerformed(ExportArchiveAction.java:493)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1223)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1264)
at java.awt.Component.processMouseEvent(Component.java:6267)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6032)
at java.awt.Container.processEvent(Container.java:2041)
at java.awt.Component.dispatchEventImpl(Component.java:4630)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4460)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
at java.awt.Container.dispatchEventImpl(Container.java:2085)
at java.awt.Window.dispatchEventImpl(Window.java:2478)
at java.awt.Component.dispatchEvent(Component.java:4460)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: com.microstar.xml.XmlException: -- no protocol: Expression2.xml
-- XML file not found relative to classpath.
-- C:\Kepler\svn\Expression2.xml
C:\Kepler\svn\Expression2.xml (The system cannot find the file specified)
in http://ptolemy.eecs.berkeley.edu/xml/dtd/MoML_1.dtd at line 123 and column 46
at ptolemy.moml.MoMLParser.fileNameToURL(MoMLParser.java:1176)
at ptolemy.moml.MoMLParser._findOrParse(MoMLParser.java:4778)
at ptolemy.moml.MoMLParser._attemptToFindMoMLClass(MoMLParser.java:3649)
at ptolemy.moml.MoMLParser._createEntity(MoMLParser.java:3872)
... 41 more
Caused by: com.microstar.xml.XmlException: -- no protocol: Expression2.xml
-- XML file not found relative to classpath.
-- C:\Kepler\svn\Expression2.xml
C:\Kepler\svn\Expression2.xml (The system cannot find the file specified)
in http://ptolemy.eecs.berkeley.edu/xml/dtd/MoML_1.dtd at line 123 and column 46
at ptolemy.moml.MoMLParser.fileNameToURL(MoMLParser.java:1176)
at ptolemy.moml.MoMLParser._findOrParse(MoMLParser.java:4778)
at ptolemy.moml.MoMLParser._attemptToFindMoMLClass(MoMLParser.java:3649)
at ptolemy.moml.MoMLParser._createEntity(MoMLParser.java:3872)
at ptolemy.moml.MoMLParser.startElement(MoMLParser.java:2493)
at com.microstar.xml.XmlParser.parseElement(XmlParser.java:921)
at com.microstar.xml.XmlParser.parseContent(XmlParser.java:1104)
at com.microstar.xml.XmlParser.parseElement(XmlParser.java:924)
at com.microstar.xml.XmlParser.parseDocument(XmlParser.java:481)
at com.microstar.xml.XmlParser.doParse(XmlParser.java:159)
at com.microstar.xml.XmlParser.parse(XmlParser.java:132)
at ptolemy.moml.MoMLParser.parse(MoMLParser.java:1402)
at ptolemy.moml.MoMLParser.parse(MoMLParser.java:1374)
at ptolemy.moml.MoMLParser.parse(MoMLParser.java:1335)
at org.kepler.kar.handlers.ActorMetadataKAREntryHandler.open(ActorMetadataKAREntryHandler.java:252)
at org.kepler.kar.KARFile.open(KARFile.java:968)
at org.kepler.kar.KARFile.openKARContents(KARFile.java:736)
at org.kepler.gui.kar.ExportArchiveAction.actionPerformed(ExportArchiveAction.java:493)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1223)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1264)
at java.awt.Component.processMouseEvent(Component.java:6267)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6032)
at java.awt.Container.processEvent(Container.java:2041)
at java.awt.Component.dispatchEventImpl(Component.java:4630)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4460)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
at java.awt.Container.dispatchEventImpl(Container.java:2085)
at java.awt.Window.dispatchEventImpl(Window.java:2478)
at java.awt.Component.dispatchEvent(Component.java:4460)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)