This question is particularly related to KNIME update.
We have developed our custom nodes and successfully plugged with KNIME. We have been doing update also through our update site which is exactly as expected. But, one strange behavior we are experiencing is that when we try to update KNIME, after successful completion (No error), KNIME gets updated perfectly but some of our custom nodes(NOT ALL) disappear from the Node Repository with the console error saying "Node from plugin 'xyz.abc' could not be created: Can't load factory class for node: xyz.abc.MyNodeFactory"
and knime.log file error as:
"java.lang.NoClassDefFoundError: org/knime/core/node/NodeModel
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:188)
...complete stack trace.
To Debug and know more about the issue i tried some cases, here are few observations:
1) After the state mentioned above even uninstall and re-install of our custom components doesn't help, it remains same.
2) If I take latest 2.11.3 release of KNIME and plug our components that works perfectly fine (means problem with particular release is not the case).
3) I tried to update KNIME in eclipse sdk and after update there also I faced the same issue when I updated from 2.10.1 to 2.10.4 (means there is nothing particular to 2.11 release).
So, the problem is the users cannot update KNIME once custom components are installed (in the sense that KNIME get updated but custom nodes are lost).
Anybody who has faced this kind of issue OR if somebody can give any pointer/workaround/fix ASAP for this would be of great help.
Is there a dependency issue? Some of my nodes will only run on 2.10 and 2.11. They refuse to install on other versions but I've not upgraded to a new version once they have already installed so not sure what would happen there.
I'm not sure which version you are having a problem with, you;ve said you updated from 2.10.1 to 2.10.4 but independently tested on 2.11 and that worked fine?
I think it's not a dependency issue because if I take any knime installation(at least after 2.10.1) and plug custom components it works.
So, the thing I mentioned is when I updated from 2.10.1 to 2.10.4 or even if I update from any version to any, just one update KNIME activity does something which disappears some custom nodes which are not recoverable.
We have never experienced this behaviour which strongly indicates that something is wrong with your plug-in. Is there a cause for the NoClassDefFoundError in the stacktrace?
It may be the issue with plug-in, but If that is the case why it works with any fresh release and creates problem only when update happens? That's what I am trying to ask where in the code i can debug when the update occurs. I have checked plugin.xml(looks fine and that's why nodes are proper in every case other than update).
Yes, cause is there, ClassNotFoundException, see here:
Caused by: java.lang.ClassNotFoundException: org.knime.core.node.NodeModel
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:467)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
I am not able to understand why suddenly after update it's not able to find NodeModel class.
I have no idea, really. This is the first time I have heard of such problems. Did you carefully check the .log and the knime.log files if they contain some related information?
Regarding this problem, I had no luck after those debugging effort then. But, with the same custom extension bundle I am able to update workbench smoothly to KNIME 2.12 onwards releases.