Tips for finding which plugins are exposing certain classes

Hi

I’ve hit a problem with using the JSON Path node and get this exception:

java.lang.RuntimeException: java.lang.NoSuchMethodError: com.fasterxml.jackson.databind.node.JsonNodeFactory.numberNode(Ljava/math/BigDecimal;)Lcom/fasterxml/jackson/databind/node/NumericNode;
at org.knime.core.data.container.RearrangeColumnsTable.calcNewColsASynchronously(RearrangeColumnsTable.java:518)
at org.knime.core.data.container.RearrangeColumnsTable.create(RearrangeColumnsTable.java:382)
at org.knime.core.node.ExecutionContext.createColumnRearrangeTable(ExecutionContext.java:385)
at org.knime.core.node.streamable.simple.SimpleStreamableFunctionNodeModel.execute(SimpleStreamableFunctionNodeModel.java:117)
at org.knime.core.node.NodeModel.execute(NodeModel.java:737)
at org.knime.core.node.NodeModel.executeModel(NodeModel.java:571)
at org.knime.core.node.Node.invokeFullyNodeModelExecute(Node.java:1236)
at org.knime.core.node.Node.execute(Node.java:1016)
at org.knime.core.node.workflow.NativeNodeContainer.performExecuteNode(NativeNodeContainer.java:557)
at org.knime.core.node.exec.LocalNodeExecutionJob.mainExecute(LocalNodeExecutionJob.java:95)
at org.knime.core.node.workflow.NodeExecutionJob.internalRun(NodeExecutionJob.java:218)
at org.knime.core.node.workflow.NodeExecutionJob.run(NodeExecutionJob.java:124)
at org.knime.core.util.ThreadUtils$RunnableWithContextImpl.runWithContext(ThreadUtils.java:334)
at org.knime.core.util.ThreadUtils$RunnableWithContext.run(ThreadUtils.java:210)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at org.knime.core.util.ThreadPool$MyFuture.run(ThreadPool.java:123)
at org.knime.core.util.ThreadPool$Worker.run(ThreadPool.java:246)

Caused by: java.lang.NoSuchMethodError: com.fasterxml.jackson.databind.node.JsonNodeFactory.numberNode(Ljava/math/BigDecimal;)Lcom/fasterxml/jackson/databind/node/NumericNode;
at org.knime.json.node.jsonpath.JsonPathUtil.toJackson(JsonPathUtil.java:161)
at org.knime.json.node.jsonpath.JsonPathUtil.toJackson(JsonPathUtil.java:138)
at org.knime.json.node.jsonpath.JsonPathUtil.toJackson(JsonPathUtil.java:138)
at org.knime.json.node.jsonpath.JsonPathUtil.toJackson(JsonPathUtil.java:207)
at org.knime.json.node.jsonpath.JsonPathUtil.toJackson(JsonPathUtil.java:138)
at org.knime.json.node.jsonpath.JsonPathUtil.toJackson(JsonPathUtil.java:207)
at org.knime.json.node.jsonpath.JsonPathUtil.toJackson(JsonPathUtil.java:138)
at org.knime.json.node.jsonpath.multi.JSONPathNodeModel$1.asJson(JSONPathNodeModel.java:399)
at org.knime.json.node.jsonpath.multi.JSONPathNodeModel$1.convertObjectToReturnType(JSONPathNodeModel.java:356)
at org.knime.json.node.jsonpath.multi.JSONPathNodeModel$1.getCell(JSONPathNodeModel.java:312)
at org.knime.core.data.container.SingleCellFactory.getCells(SingleCellFactory.java:105)
at org.knime.core.data.container.RearrangeColumnsTable.calcNewCellsForRow(RearrangeColumnsTable.java:541)
at org.knime.core.data.container.RearrangeColumnsTable$ConcurrentNewColCalculator.compute(RearrangeColumnsTable.java:769)
at org.knime.core.data.container.RearrangeColumnsTable$ConcurrentNewColCalculator.compute(RearrangeColumnsTable.java:1)
at org.knime.core.util.MultiThreadWorker$ComputationTask$1.call(MultiThreadWorker.java:442)
at java.util.concurrent.FutureTask.run(Unknown Source)
… 6 more

Looks to me like it’s got an unexpected version of the Jackson library on the classpath.

Before I make a clean KNIME install and 1 by 1 add plugins in to find the culprit is there a way of checking which bundle has provided another version of Jackson?

I don’t think I’ve exposed it on any of mine.

Cheers

Sam

Hi Sam,

Do you see this problem relative to our master branches or the release (4.1) branches? (On the master we bumped the version of jackson to 2.10.2.)

What usually helps me debugging those issue is:

  • Searching in the install dir or TP directory for plug-ins contributing conflicting classes
  • Using the OSGi console to see what jackson libs get loaded
  • Setting a break point at a problematic line of code and looking at the classloader of the class (i.e. Jackson class here)

For KNIME 4.2 (this summer) we will retire the “buddy classloading” in the KNIME core so that hijacking other plug-in’s class paths should no longer be possible (unless criminal energy is involved).

5 Likes

Hi Bernd

It’s on the release branch - the problem is happening in my KNIME 4.1.1 production environment. I haven’t check to see if it’s also happening in my dev environment.

Thanks for the tips I’ll start with setting the breakpoint and check the classloader first then go from there.

Cheers

Sam