Knime 5.5: Opening Workflow causes catastrophic fail - java.lang.RuntimeException

Hi,

I started to shift over using 5.5 in production. Upon opening one workflow I was recently working on, I was under “mild shock” being greeted with this:

Here is the detailed error, constantly beign triggered even after switchign back and forth between 5.4.4 and 5.4:

java.lang.RuntimeException: java.lang.ClassCastException: class org.knime.core.node.missing.MissingNodeModel cannot be cast to class org.knime.core.node.workflow.ScopeStartNode (org.knime.core.node.missing.MissingNodeModel and org.knime.core.node.workflow.ScopeStartNode are in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @7567fa42)
	at org.knime.workbench.editor2.WorkflowEditor.setInput(WorkflowEditor.java:1465)
	at org.knime.workbench.editor2.WorkflowEditor.init(WorkflowEditor.java:535)
	at org.eclipse.ui.internal.EditorReference.initialize(EditorReference.java:353)
	at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:344)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:58)
	at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:976)
	at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:938)
	at org.eclipse.e4.core.internal.di.InjectorImpl.internalInject(InjectorImpl.java:138)
	at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:385)
	at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:311)
	at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:203)
	at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:90)
	at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:59)
	at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:42)
	at org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer.createWidget(ContributedPartRenderer.java:132)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:991)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:658)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:762)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$2.run(PartRenderingEngine.java:727)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:47)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:711)
	at org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer.showTab(StackRenderer.java:1379)
	at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer.postProcess(LazyStackRenderer.java:114)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:676)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:762)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$2.run(PartRenderingEngine.java:727)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:47)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:711)
	at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.processContents(SWTPartRenderer.java:72)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:672)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$1.run(PartRenderingEngine.java:543)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:47)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:527)
	at org.eclipse.e4.ui.workbench.renderers.swt.ElementReferenceRenderer.createWidget(ElementReferenceRenderer.java:73)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:991)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:658)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:762)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$2.run(PartRenderingEngine.java:727)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:47)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:711)
	at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.processContents(SWTPartRenderer.java:72)
	at org.eclipse.e4.ui.workbench.renderers.swt.SashRenderer.processContents(SashRenderer.java:147)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:672)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:762)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$2.run(PartRenderingEngine.java:727)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:47)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:711)
	at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.processContents(SWTPartRenderer.java:72)
	at org.eclipse.e4.ui.workbench.renderers.swt.PerspectiveRenderer.processContents(PerspectiveRenderer.java:48)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:672)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:762)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$2.run(PartRenderingEngine.java:727)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:47)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:711)
	at org.eclipse.e4.ui.workbench.renderers.swt.PerspectiveStackRenderer.showTab(PerspectiveStackRenderer.java:79)
	at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer.postProcess(LazyStackRenderer.java:114)
	at org.eclipse.e4.ui.workbench.renderers.swt.PerspectiveStackRenderer.postProcess(PerspectiveStackRenderer.java:61)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:676)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:762)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$2.run(PartRenderingEngine.java:727)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:47)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:711)
	at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.processContents(SWTPartRenderer.java:72)
	at org.eclipse.e4.ui.workbench.renderers.swt.SashRenderer.processContents(SashRenderer.java:147)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:672)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:762)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$2.run(PartRenderingEngine.java:727)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:47)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:711)
	at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.processContents(SWTPartRenderer.java:72)
	at org.eclipse.e4.ui.workbench.renderers.swt.WBWRenderer.processContents(WBWRenderer.java:660)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:672)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:762)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$2.run(PartRenderingEngine.java:727)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:47)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:711)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1079)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1042)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:152)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:639)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:546)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:173)
	at org.knime.product.rcp.KNIMEApplication.start(KNIMEApplication.java:211)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:208)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:143)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:109)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:439)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:271)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:651)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:588)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1459)
Caused by: java.lang.ClassCastException: class org.knime.core.node.missing.MissingNodeModel cannot be cast to class org.knime.core.node.workflow.ScopeStartNode (org.knime.core.node.missing.MissingNodeModel and org.knime.core.node.workflow.ScopeStartNode are in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @7567fa42)
	at org.knime.core.node.Node.setScopeStartNode(Node.java:3000)
	at org.knime.core.node.workflow.WorkflowManager.configureSingleNodeContainer(WorkflowManager.java:6972)
	at org.knime.core.node.workflow.WorkflowManager.postLoad(WorkflowManager.java:9251)
	at org.knime.core.node.workflow.WorkflowManager.loadContent(WorkflowManager.java:9078)
	at org.knime.core.node.workflow.WorkflowManager.postLoad(WorkflowManager.java:9192)
	at org.knime.core.node.workflow.WorkflowManager.loadContent(WorkflowManager.java:9078)
	at org.knime.core.node.workflow.WorkflowManager.load(WorkflowManager.java:8942)
	at org.knime.core.node.workflow.WorkflowManager.load(WorkflowManager.java:8863)
	at org.knime.core.node.workflow.WorkflowManager.load(WorkflowManager.java:8836)
	at org.knime.core.node.workflow.WorkflowManager.loadProject(WorkflowManager.java:8673)
	at org.knime.workbench.editor2.LoadWorkflowRunnable.run(LoadWorkflowRunnable.java:199)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:124)

I almost thought my workflow got corrupted, which once happened in the past, though. Gladly, opening in 5.4.4 was still possible:

@armingrudd the possibility of a catastrophic failure (curruption of my workspace / workflows), alongside the immediate issues faced during the prev. Community Hacking days, resulted in my reservation to participate further.

For any future community hacking days, I’d strongly advocate to point out the risks, which I experiences a few times, and provide suggestions to backup / clone a workspace.

Some sort of official upgrade guide might be a good idea. WDYT?

Best
Mike

Hi Mike,

Thank you for reporting this! The error looks very strange… Do you use any exotic loops from extensions that aren’t installed in your 5.5.0 installation? The exception shows that there is a “scope” (e.g. a loop or try/catch) where the start node is missing:

class MissingNodeModel cannot be cast to class ScopeStartNode
	at org.knime.core.node.Node.setScopeStartNode(Node.java:3000)

I don’t think we’ve changed anything in this code for quite a while, so I’d be surprised if this was a regression in 5.5 (but never say never…).

– Leo

1 Like

Hi @leo_woerteler,

thanks for your quick reply. Albeit the workflow being WIP I cannot recall, and have double verified it once more, to have any “loose ends” lingering around.

Continuing to debug with based on your response, I created a backup and started to deleted sections of the workflow in 5.4.4. I.e. some were related to text processing (topic extraction). After the first iteration I started 4.5 and guess what … it worked.

There is a high certainty that the issue originates from any of the deleted nodes / components etc. that contained KNIME R Scripting extension and / or NodePit Power Nodes which were not installed.

image

Give me some time to narrow down the culprit and provide more details about the cause.

Best
Mike

2 Likes

So, what I did was:

  1. Create a copy of teh “faulty” workflow
  2. Deleted large portions I suspected playing a role in the error in 5.4.4
  3. Opened the workflow in 5.5, found it to be able to open
  4. Opened the copy of the workflow, found the issue still present
  5. Switched between 5.4.4 and 5.5 and gradually reintroduced the deleted sections to isolate the cause
  6. I was not able to reproduce it by that approach
  7. I compared both workflows, the still failing copy and the one I gradually reconstructed. Nothing apparent was found meaning both are comparable except the execution state
  8. I executed the reconstructred workflow to the equivalent state of the “faulty” once to check if the data is at fault which … drums please … IT WAS. Only the Parameter Optimization Loop Start node I executed
    image
  9. Just to be certain, I reset it, switched back to 5.5 and could confirm the workflow did opened
    image
  10. I re-executed the node and switched once more jsut for absolute certainty.
  11. Then I reset the node to be able to start 5.5 and install the missing extensions
  12. Started 5.5 but with node state executed and extension installed (to force a possible error) but the issue was gone

To conclude, the issue originates from a combination of executed node state and missing extension. I can imagine chances are this is a more universal issue, though. Let me know if you need anything else.

1 Like

Hi Mike,

thanks for the reporting this. We can reproduce the problem and will also be able to fix it relatively easily. It must be an old old problem.

I think(!) this is a very special case. You need to have:

  • A loop (obviously)
  • A loop start node that is
    • saved executed
    • … and missing on load
  • The rest of the loop must not be executed (at least not the loop end)
  • Loop Start and End node must not be in the same extension

We’ll track it as AP-24726.

8 Likes

@wiswedel - Nice work to track that somewhat obscure alignment of planets! I can’t wait to see what the solution looks like in the github :slight_smile:

Steve

ROFL, got to remember that :slight_smile:

2 Likes

Here it is in on BitBucket (to be included in 5.6).

3 Likes

Thanks Bernd!

Uh oh - WorkflowManager - I always find myself encountering a slight frisson of dread when I reference that class anywhere…

Steve

Internal ticket ID: AP-24726
Summary: Loops with “missing nodes” cause bad exceptions to be thrown when loaded (partially executed)
Fix version(s): 5.6.0