Potential ExtToolOutputNodeModel/View changes broke our logging views

Hi,

we are inheriting from ExtToolOutputNodeModel and use

                setExternalOutput(executor.getToolOutput());
                setExternalErrorOutput(executor.getToolErrorOutput());

to display the output of the tool in the views.

However since KNIME 4.4 we only see the following:

What happened?

Best wishes,
Julianus

Hi @jpfeuffer,

Looks like your code is running into an exception, that is causing these lines:

So you can investigate with a breakpoint there.

best,
Gabriel

Hi Gabriel,

Right in the beginning, when the Document is empty, this returns 1.
The length of the document is of course 0.
→ Exception

By the way, your non-labs External Tool node has the same problem, I just double-checked.

In most of the code snippets around the web, people use doc.getLength() or doc.getEndPosition().getOffset() - 1.

Not sure if the JDK “fixed” something here from 8 to 11.

P.S.: In case you guys make some changes there, it would be cool if the API for adding single lines (kind of used in the View itself) would be exposed publicly in the model somehow :wink: It would be a bit more efficient than setting the whole text everytime. As long as it does not invalidate any internal state or preconditions of course.

Best,
Julianus

See the corresponding fixes in SonarQube (since I did not find any report on the change in Java).

1 Like

Hi @jpfeuffer,

Thank you for reporting this, I was able to verify this issue and apply a fix. It should be released with the next bugfix release.

best,
Gabriel

3 Likes

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