A fellow of mine sent me some code to open a workflow:
public class ServiceMapBuilder {
public ServiceMapBuilder(){}
// fileLocation :: ""C:/Documents and Settings/admin/My
Documents/Downloads/_lymphoma_type_prediction_based_on_microarray_data__547084.t2flow"
public void openWorkflow(String fileLocation){
File fileObject = new File(fileLocation);
FileManager fileManager = FileManager.getInstance();
try {
fileManager.openDataflow(new T2FlowFileType(), fileObject);
} catch (OpenException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
System.out.println("Did we make it?");
}
}
When I run it, I get the following error:
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError:
net/sf/taverna/t2/workbench/file/impl/T2FlowFileType
at
caseTool.visualizationWindow.VisualizationWindow.jButton16ActionPerformed(VisualizationWindow.java:467)
at
caseTool.visualizationWindow.VisualizationWindow.access$11(VisualizationWindow.java:460)
at
caseTool.visualizationWindow.VisualizationWindow$12.actionPerformed(VisualizationWindow.java:205)
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.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
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: java.lang.ClassNotFoundException:
net.sf.taverna.t2.workbench.file.impl.T2FlowFileType
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
... 28 more
How do I get a NoClassDefFoundError when Im running this inside the taverna
plugin? It has everything I thought?!?
Has anyone ever experienced this before?>
On Thu, Mar 3, 2011 at 10:09 AM, John Alexander <
[email protected]> wrote:
> Greetings!
>
> I have a fairly simple question. I am looking for source code to open a
> workflow from a file.
>
> I.E. a Scufl: workflow.xml or a T2Flow: workflow.t2flow
>
> Needs to be opened inside my plugin so I can look through it and interact
> with it.
>
> Im assuming it has something to do with the FileManager class and the
> openDataflow() method
> but Im not sure of what FileType to provide or what type of Object my file
> needs to be in so that it can read it.
>
> If someone code provide me a short code snippet of how to do this I would
> be greatly appreciative.
>
>
> - John
>
------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in
Real-Time with Splunk. Collect, index and harness all the fast moving IT data
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business
insights. http://p.sf.net/sfu/splunk-dev2dev
_______________________________________________
taverna-hackers mailing list
[email protected]
Web site: http://www.taverna.org.uk
Mailing lists: http://www.taverna.org.uk/about/contact-us/
Developers Guide: http://www.taverna.org.uk/developers/