Hi, I confronted one error when I developed customized node in Eclipse. Node cannot be created due the following reason: XXXXX/MyParameter. which is set into null as one class attribute in NodeModel at first, and configured later by using information from Dialog.
When I debug it, I can not step into NodeModel, it goes into exception procedure. so no useful information returned about MyParameter.
My questions come,
what kind of reasons to make a node not created with respect with object attributes??
why the debug failed in Eclipse?? Although there are information in KNIME Error Log, says FrameworkEventError, detail in below…But when it concerns to other nodes, it works. Then I think the frame is fine, right??
Thu Feb 28 14:50:03 CET 2019
org.osgi.framework.BundleException: Could not resolve module: org.knime.workbench.ui 
Another singleton bundle selected: osgi.identity; type=“osgi.bundle”; version:Version=“3.7.0.v201809260727”; osgi.identity=“org.knime.workbench.ui”; singleton:=“true”
Have you tried configuring a breakpoint for NullPointerException (caught and uncaught) and seeing if that throws anything up? You will almost certainly get a few spurious ones during the startup but it may also show you somewhere where your parameter is being accessed before you are expecting.
I dont hold out a huge amount of hope for this though, as the FrameworkException looks like something different is going wrong
Before I set it into Null for one of my parameter, I couldn’t step into the NodeModel, it jumped already into the bug. Then I changed some library which relates to my parameter, it steps into NodeModel class, and everything begins to work.
I wonder if there is some errors with java link, which I can debug into the class. Although, in Eclipse there is no sign for this error.
A reason with my side for node cannot be created might be – The class for NodeModel is not well created(but the error is hidden from Eclipse IDE)… The other reasons are ??
It seems like there was a problem with the dependencies of your project, that would explain the behavior. Maybe the framework could not load the class of your parameter during runtime, so it failed.
Is the node correctly created now or are you still having issues?
Do you mean framework for KNIME, not the Eclipse Framwork?? After the dependency changed, the Node can be created in KNIME, but in Error Log, one view of KNIME, there are still the same errors shown about the FrameworkEventError.
OK, in Eclipse, if you are not already in the ‘debug’ perspective goto Window -> Perpsective -> Open Perspective and look for Debug. You should then have a view with tabs for Variables and Breakpoints:
Is the library you changed another eclipse project in your workspace, or are you including it as a .jar file in a lib folder in the project with the node?
If it is another workspace project, make sure you have it configured as a required dependency - otherwise the Eclipse classloader loads plugins in a pretty much random order, and so sometimes the dependency might load first, and you are OK, and other times it might load later, and you are not OK.
thanks at first. I use the debug mode but never used the Exception Caught in breakpoint. Great to know it!!
But the library, it is generated from another project and then put it into use manually. I think I put the same .jar twice, one is to lib folder, one is for the reference path in Build Configuration. So, according to the loader mechanism of Eclipse, it is better that I always put my /*.jar into lib folder??
I think put it in /lib, and make sure it is included in the classpath section of the Runtime tab, and also that your lib folder is included in both source and binary builds, and in the ‘extra classpath entries’ part of the build
One more exception related to dependency of the *.jar file import.
ERROR KNIME-Worker-1 Node
Execute failed: Found interface org.processmining.plugins.petrinet.replayresult.PNRepResult, but class was expected
I checked online and found out the explanation quite good in this link General Situation In Jave
But I don’t know how to solve the problems. It is due to the loading mechanism of KNIME, or it is because of the imported *.jar file??