Cannot import workflow using 2.4.2 SDK version

Hi,

I am using the KNIME SDK version 2.4.2 and I'm trying to import a workflow someone else created.

From the file menu I selected File -> Import ->Other -> Import KNIME Workflow.

I then immediately see a "Problem Occurred" dialog box with text "Problem opening wizard. The selected wizard could not be started." When I click the Detail button I see:

The selected wizard could not be started.
org.knime.workbench.ui.wizards.imports.WorkflowImportWizard cannot be cast to org.eclipse.ui.IWorkbenchWizard 

Has anyone else seen this problem? Any workaround?

By the way, great work on an excellent workflow tool.

I am not able to reproduce the problem. Can you please give us some more details on your OS and how your runtime configuration looks like. I assume that you launch KNIME from within Eclipse and then do the import in KNIME via "Import KNIME workflow"?

Hi Gabriel,

I downloaded the KNIME SDK version 2.3.x from your website several months ago then upgraded to 2.4.2 via the Help --> Check for updates menu.
When I launch the KNIME SDK version I use the KNIME perspective then try to import a workflow, which fails as described.
(Note: I am considering uninstalling and performing a clean install of the KNIME SDK from your website. I seem to recall this Import feature working before I performed the update).

I also developed a custom node and tested by launching a separate KNIME instance from within Eclipse and in that environment importing a KNIME workflow also fails as described.

My OS is Windows 7 (64-bit). The Eclipse SDK version is 3.6.2

Here's the complete exception trace:

!SESSION 2011-10-20 11:15:50.454 -----------------------------------------------
eclipse.buildId=M20110210-1200
java.version=1.6.0_22
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments: -product org.eclipse.sdk.ide
Command-line arguments: -product org.eclipse.sdk.ide -data C:\data\eclipse_workspace/../runtime-New_configuration -dev file:C:/data/eclipse_workspace/.metadata/.plugins/org.eclipse.pde.core/KNIME_Node_Development/dev.properties -os win32 -ws win32 -arch x86_64 -consoleLog

!ENTRY org.eclipse.ui.workbench 4 2 2011-10-20 11:16:06.086
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.ui.workbench".
!STACK 0
java.lang.ClassCastException: org.knime.workbench.ui.wizards.imports.WorkflowImportWizard cannot be cast to org.eclipse.ui.IWorkbenchWizard
at org.eclipse.ui.internal.dialogs.WorkbenchWizardElement.createWizard(WorkbenchWizardElement.java:264)
at org.eclipse.ui.internal.dialogs.ImportExportPage$1.createWizard(ImportExportPage.java:300)
at org.eclipse.ui.internal.dialogs.WorkbenchWizardNode$2.run(WorkbenchWizardNode.java:151)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.ui.internal.dialogs.WorkbenchWizardNode$1.run(WorkbenchWizardNode.java:135)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.internal.dialogs.WorkbenchWizardNode.getWizard(WorkbenchWizardNode.java:132)
at org.eclipse.jface.wizard.WizardSelectionPage.getNextPage(WizardSelectionPage.java:104)
at org.eclipse.ui.internal.dialogs.WorkbenchWizardSelectionPage.getNextPage(WorkbenchWizardSelectionPage.java:100)
at org.eclipse.ui.internal.dialogs.ImportExportPage.getNextPage(ImportExportPage.java:431)
at org.eclipse.jface.wizard.WizardDialog.nextPressed(WizardDialog.java:887)
at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:426)
at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:234)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4066)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
at org.eclipse.jface.window.Window.open(Window.java:801)
at org.eclipse.ui.internal.handlers.WizardHandler$Import.executeHandler(WizardHandler.java:147)
at org.eclipse.ui.internal.handlers.WizardHandler.execute(WizardHandler.java:274)
at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
at org.eclipse.ui.internal.actions.CommandAction.runWithEvent(CommandAction.java:157)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4066)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
at org.eclipse.equinox.launcher.Main.main(Main.java:1384)
 

I agree, it seems to make sense to start with a fresh KNIME SDK installation. My guess is that your KNIME SDK has been converted into a pure KNIME during update (you probably checked the KNIME product item on our update site which makes the SDK look like KNIME). Even if I don't understand why the import does not work, you should be able to switch the perspective to KNIME and then see the "Import KNIME workflow" in the File menu. In order to keep the SDK don't update the product definition, because this changes the L&F, KNIME vs. KNIME SDK.

Hi gabriel, thanks for the reply.

I performed a clean install of KNIME SDK 64-bit and also 32-bit and encountered the same problem with both. Note: switching to the KNIME perspective does not solve the problem.

I then installed the regular knime version (non-sdk) and was able to import workflows without a problem. So my problem has a workaround, but I thought it would be good to report back on this.

Perhaps this is a bug with the knime SDK version (or Eclipse) on Windows 7 64-bit OS?

I just downloaded a fresh copy of KNIME SDK and installed it.  I did not install any updates.  I tried to import a KNIME workflow that I built in the regular KNIME and have run into the same error.  As soon as I click import it tells me that there is an error using the wizard.

I am running the 32 bit version on Windows XP.

I tried to reproduce it, but without success. Are your running KNIME 2.5.2? Did you export the workflow as archive or directory (with or without data)? Do you get some stack trace as shown above? There must be something different than in my setup. Mmm.

Hi Gabriel,

Answers to your questions below. 

Q: Are your running KNIME 2.5.2?

A: yes

 

Q: Did you export the workflow as archive or directory (with or without data)?

A: I exported it as an archive with data.  However, I can't even get to the screen where I can import the workflow.  As soon as I click 'Next' on Import KNIME Workflow, I get an  error. 

 

Q: Do you get some stack trace as shown above?

A: The selected wizard could not be started.
org.knime.workbench.ui.wizards.imports.WorkflowImportWizard cannot be cast to org.eclipse.ui.IWorkbenchWizard

 

Still no luck importing a workflow into Eclipse KNIME 2.5.2 SDK.  I can use my workflow in regular KNIME but I want to create some special nodes which I need the SDK for so I am still very stuck.  Not sure what to do.

Regards,

SC

Ah, got it! You are trying to import the workflow into your IDE (KNIME SDK), aren't you? The KNIME SDK is only available as a development environment for new nodes, that in turn are available when you run a new KNIME instance from within this IDE. Please see Run > Run Configuration in the menu bar and set up a new Eclipse runtime configuration for KNIME; use the KNIME_APPLICATION as "Run application". This will start a new KNIME instance where you can import the workflow.

I see.  I guess the SDK is not what I expected.  I thought it would allow me to build nodes within a workflow. 

Now I understand though, this is strictly a Java IDE with KNIME features built on top of it.  Very cool.  I guess I will have to create custom nodes in KNIME SDK and then import them into KNIME to test them.  Right?

What is the best way to test the nodes when you creating them?

Thanks for everything Gabriel!

Correct, you develop and implement a node within the KNIME SDK, you run and test it in the KNIME runtime that you run from within your KNIME SDK, and you can deploy and run your own nodes in all KNIME Desktop versions. For all details on developing and deploying your own KNIME nodes, check out the developer guide.

Yep.  I got a "Hello World" node up and running out of the KNIME SDK very nicely with all your help Gabriel.  The developer guide is very good too. 

Thank you again for all your help!

Hi,

I am new at knime node development.  Wondering if you could share with me your "hello world" code so that I can follow along how to create a new node?

Thanks

 

The KNIME SDK available on our website brings along a Node-Extension Wizard allowing to quickly generate new node (stubs); see http://tech.knime.org/developer-guide.