ERROR ReadProcessNodeModel Output spec-array length invalid: 1 <> 2

hi, KNIME developers, I am learning to extend a node that can read a file, and partition the file to several parts. At current stage, I read the file, and make the outports to output the same specified table. However, when runnning the node, it is shown that "ERROR ReadProcessNodeModel Output spec-array length invalid: 1 <> 2". Could anyone give some suggestions for this problem? Thanks, Hongmei


you need to set the correct number of in- and output ports in the constructor of your NodeModel. In the configure and execute method you will be provided with an input array whose length is equal to the number of inputs. Similarly, you must return an output array with the correct length (number of outputs).


I ran into a similar error: "Output spec-array length invalid: 0 <> 1".
My issue is that I am actually developing a source node and have no use for input so I constructed as such:

    protected SpecMirBaseNodeModel() {
        super(0, 1); //Source node, no input, datatable output.

configure is plain empty and execute does not access inData.

Any ideas?

Thank you,


Hi Jens,

In configure you should return an array with at least a null. (It complains about output, not input.) You might need to change the node description too (no inports).

Cheers, gabor

Thank you Gabor,

returnin null solved the issue.