Errors in my node

Hi
I have several problems with my node:

  1. I always get the same error as: Output spec-array length invalid: 1 <> 2, I have already configured the node xml and the class constructor.
  • My node receives a table and has a table and a PortObject as output. The class builder looks like this:
    super (new PortType {BufferedDataTable.TYPE}, new PortType {BufferedDataTable.TYPE, modelPortType});
    When I run the node and save the workflow. When starting again I get a series of errors that I do not understand.
    ERROR LoadWorkflowRunnable Errors during load: Status: DataLoadError: KNIME_project 0 loaded with error during data load
    ERROR LoadWorkflowRunnable Status: DataLoadError: KNIME_project 0
    ERROR LoadWorkflowRunnable Status: DataLoadError: Adjustment FM 0: 4
    ERROR LoadWorkflowRunnable Status: DataLoadError: Unable to load port content for node "Adjustment FM": Failed to instantiate class “PortModelMath” (failed to invoke no-arg constructor): cujae.edu.cu.PortModelMath
    ERROR LoadWorkflowRunnable Status: DataLoadError: State has changed from EXECUTED to CONFIGURED

I would like to know if anyone can help me? Thanks in advance.

Hi,
It seems like in your configure method you are returning only one spec object, but you need to return two, as you have two outputs. Additionally, your PortObject class must have a constructor without arguments. Any data and args for the constructor must be loaded by the serializer that belongs to it.
Kind regards
Alexander

3 Likes

Thank you. With your answer I solve all my problems.
Greetings
Taday

2 Likes