Skip to content

Conversation

@danielesser
Copy link
Member

As of today, some nodes of the Erlwood Nodes on KNIME 5.8 throw an exception when initiating the node model:

08:55:05.309 [main] ERROR JsonNodeDocuGenerator:246 - Encountered error
java.lang.NoClassDefFoundError: org/RDKit/ROMol
        at org.erlwood.knime.nodes.mmp.RDKitMMPNodeFactory.createNodeModel(RDKitMMPNodeFactory.java:41)
        at org.erlwood.knime.nodes.mmp.RDKitMMPNodeFactory.createNodeModel(RDKitMMPNodeFactory.java:1)
        at org.knime.core.node.NodeFactory.callCreateNodeModel(NodeFactory.java:565)
        at org.knime.core.node.Node.<init>(Node.java:307)
        at org.knime.core.node.Node.<init>(Node.java:279)
        at de.philippkatz.knime.jsondocgen.JsonNodeDocuGenerator.generate(JsonNodeDocuGenerator.java:521)

This PR catches and logs said exceptions – as we already did previously at another occurrence.

Running the new tests requires XstartOnFirstThread (on Mac) and Xvfb (during build).

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR addresses exceptions thrown by certain node factories (specifically Erlwood Nodes on KNIME 5.8) when they fail to initialize due to missing dependencies. The main fix expands the scope of exception handling to catch errors during node creation, and adds test coverage for this scenario.

Key changes:

  • Expanded exception handling in JsonNodeDocuGenerator.generate() to catch errors during Node instantiation
  • Added test case to verify handling of NoClassDefFoundError during node model creation
  • Configured build to support GUI-dependent tests on macOS and Linux

Reviewed Changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.

Show a summary per file
File Description
application/src/de/philippkatz/knime/jsondocgen/JsonNodeDocuGenerator.java Moved exception handling to catch errors during Node instantiation and node description retrieval
application/src/de/philippkatz/knime/jsondocgen/docs/CategoryDoc.java Added getter method for nodes list to support testing
tests/src/de/philippkatz/knime/jsondocgen/JsonNodeDocuGeneratorTest_NoClassDefFound_Test.java Added test case simulating NoClassDefFoundError during node creation
tests/pom.xml Configured tycho-surefire-plugin to use platform-specific JVM flags for tests
pom.xml Added eclipserun.jvm.flags property and macOS-specific profile for XstartOnFirstThread
.github/workflows/main.yml Added Xvfb installation and execution wrapper for headless GUI tests
tests/META-INF/MANIFEST.MF Updated version to 1.16.1
application/META-INF/MANIFEST.MF Updated version to 1.16.1
feature/feature.xml Updated version to 1.16.1
feature/pom.xml Updated version to 1.16.1
p2/pom.xml Updated version to 1.16.1
application/pom.xml Updated version to 1.16.1
targetplatform/pom.xml Updated version to 1.16.1
Comments suppressed due to low confidence (1)

application/src/de/philippkatz/knime/jsondocgen/JsonNodeDocuGenerator.java:1

  • Lines 520 and 521 are duplicates - node.invokeGetNodeDescription() is called and assigned to nodeDescription twice. Remove one of these duplicate lines.
/*

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@qqilihq
Copy link
Member

qqilihq commented Nov 17, 2025

👍

@qqilihq qqilihq merged commit a7d923f into master Nov 17, 2025
1 check passed
@qqilihq qqilihq deleted the fix/catch-exception branch November 17, 2025 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants