Reasons behind State has changed from CONFIGURED to IDLE


I have one problem with reloading workflow. It reports the exception like this:

This is one exception called

Node description of 'Alignment-Based Replayer(Default)' does not conform to the Schema. 

However, I’m not sure if it is the reason. Secondly, I can’t find the wrong with the NodeDescription. I can upload my xml here. DefaultPNReplayerNodeFactory.xml (3.3 KB)
PNReplayerNodeFactory.xml (3.8 KB)

More generally, if a node state changes from CONFIGURE to IDLE from reloading, is it due to the exception of InvalidSettingsException, any conccrete reasons?

Any help is grateful. Thanks

Hi Kefang,

the node description doesn’t comply with the XML schema namely very likely because of the dt-, dl- and dd-tags.

And regarding the node state changes: yes, that’s very likely due to the InvalidSettingsException you mentioned, probably thrown in the configure-method of the respective node on load. If you are familiar with debugging then I would suggest to set a breakpoint there (or a general ‘InvalidSettingsException’-breakpoint) in order to find out why the node configuration fails.



Hi, martin,

is that possible for me to add more XML Shema for <knimeNode> to make them compatible? If it is possible, how? I am not so familiar with XML.
Or if with <dd dt/> don’t work, are there corresponding elements in knime xml schema to allow listing?

Hi Kefang,

the node’s xml-schema is kind of a contract between all node descriptions and can’t be changed on an individual basis.

For lists you can use the following:
<ul><li>list item 1</li><li>list item 2</li></ul>



Cool, it still allows the normal HTML formats. I will use it. But <dt.dl > are also from HTML…

Martion, another step related to your word:

If the debug you mean is actually not the debug in Eclipse, right? But the one in KNIME. I have heard once about it, but it demands on some special settings. How’s that? Is there any pages there?

Yes, you are right, the debug in eclipse (i.e. what we refer to as KNIME SDK). You have to start KNIME from within the SDK in debug mode. If done so, e.g., the program execution will be halted at so called breakpoints where you then can inspect the current state (variables etc.). A quick intro on debugging with eclipse can, e.g., be found here:

I meant the one which connected to KNIME, not the one just from Eclipse side. For example, the bug above gives no specific information about which nodes in the workflow have the exception…

I tried to set the breakpoint in Eclipse for InvalidSettingsException, but it doesn’t work. The console of eclipse also provides little information.

Nothing is caught there for the reloading. Most useful information is the one, state changed from EXECUTED to IDLE. Do you know which exception class provide this information?
feel confrusted…

Hm, maybe the other reason could be that the output spec(s) returned by the configure-method on load differs from the one that it has been stored with.
(I would also suggest to set the console log level to ‘debug’ if you haven’t already - then you might get more insights)

1 Like

Hi @hornm,

I have changed the debug level, more information is showing. However, not so helpful, like following.

But it gives me one idea to debug. Step in the Node which prints out the messages! I tried the

private static final NodeLogger logger = NodeLogger.getLogger(PNReplayerNodeModel.class);

But it seems not the logger for the Exception with State change.
Do you know the class for printing out the state change information??


More information about the bug, it is OK to reload from Configured State. But it goes wrong when reloading from Executed state.

I have another suspicion: the loading of the port object at the output port failed. You can quickly confirm that if there is a ‘DataLoadError’ in the console log for the respective node.

Hi Martin,
the right name in KNIME for “DataLoadError” is ?? Only given this name, can’t create the exception breakpoint.

find the nodes to print out the message, it called WorkflowManager#postLoad()

It says that the reason is

 NodeContainerPersistor persistor = persistorMap.get(bfsID);
 InternalNodeContainerState loadState = persistor.getMetaPersistor().getState();

loadState == “Executed” while cont.getInternalState() is “Idle”.

I didn’t mean an exception but just a message in the consol log. Nevermind, now that you are already digging into core-classes, can you please add a breakpoint in the WorkflowManger one line below if (!hasData && nc.getInternalState().equals(EXECUTED)) { - line 8698 on my computer (which might vary depending on the version). If you run into that breakpoint then something went wrong while loading the output port object.

1 Like

Hi Martin,
the running situation is

So the exception is located in the lines above.

hasData &= p != null && p.getPortObject() != null && p.getPortObjectSpec() != null;

helps a lot to solve it!

1 Like

The cause of this problem is the PortObjectSpec is null. By changing the code in the following way,

public PortObjectSpec getSpec() {
	// TODO if it access the null one??
	if(m_rSpec != null)
		return m_rSpec ;
	return new RepResultPortObjectSpec();

Avoid the null PortObjectSpec, it reloads correctly.
In conclusion, if there is a reload problem, changed node state from EXECUTED to IDLE, while reloading from CONFIGURED state works fine.
Make the breakpoint exception in method WorkflowManager#sweep(X,X)

Solution: make sure the Spec is not null.
Special thanks for the help from @hornm


1 Like

Hi, One supplement to the solution.
The deeper reason for the exception is in the code FileNodePersistor#loadPortObject

Here, we object is of type PortObject. It is loaded according to the PortObjectSpec and requires implicitly the spec to be the value of its PortObjectSpec. However, in my code, I didn’t assign the spec to PortObject during the loading process. It results in the null value for Spec and inconsistent state for workflow.

One suggestion, do assign the spec to its PortObject during serialization by method **XXPortObjectSerializer#load

	protected void load(PortObjectZipInputStream in, PortObjectSpec spec, ExecutionMonitor exec)
			throws IOException, CanceledExecutionException {



This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.