Java Snippet: Exceptions in the code caused missing rows to be output.

The “Java Snippet” node claims that “Exceptions in the code caused missing rows to be output.”, even when these exceptions have been fixed.

Reproduction:

  1. Arbitrary input table with rows
  2. Connect Java Snippet
  3. Enter code
    out_column1 = c_column1;
    throw new IllegalStateException();
    
  4. Execute. Node contains yellow warning sign “Exceptions in the code caused missing rows to be output.”
  5. Open node config, remove the line with throw
  6. Execute. Node still contains yellow warning sign “Exceptions in the code caused missing rows to be output.”
3 Likes

I downloaded your workflow and tried it myself. I got the same warning message if I type the code. The strange things is that if you copy and paste the same Java Snippet node, it executes without the warning message. No clue why…

1 Like

was confused by this a few times :frowning:
Really unhelpful if you try to fix a bug in the code…

Would be interessted why this is happening as well :+1:

Had the same issue here just minutes ago. Keeping getting this message but I don’t see anything going wrong. Heck I even wrapped the code in try-catch All and still got the message. I have since put that node into a meta node and restarted knime and now the error is gone.

1 Like

Hi,
I had a look into the code and it seems that the Java Snippet node simply does not reset the warning messages in the reset method of the NodeModel (should happen here). The warning is set in the JavaSnippetCellFactory and never cleared. I think this is not that hard to fix and I will open an internal ticket for it.
Kind regards,
Alexander

5 Likes

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