Hi,
I guess, the solution is rather easy but I don't get the problem...
My node throws an error when it tries to read the double value of a double cell. As I also allow to process int cells, the statement I've use looks like this:
DataCell valueCell = row.getCell(colIdx);
Double value = null;
if (!valueCell.isMissing()) value = ((IntCell) valueCell).getDoubleValue();
If I debug the code in IntelliJ and evaluate the expression I don't get any error...
The error I get in KNIME is this one:
ERROR BinningAnalysis Execute failed: org.knime.core.data.def.DoubleCell cannot be cast to org.knime.core.data.def.IntCell
DEBUG BinningAnalysis Execute failed: org.knime.core.data.def.DoubleCell cannot be cast to org.knime.core.data.def.IntCell
java.lang.ClassCastException: org.knime.core.data.def.DoubleCell cannot be cast to org.knime.core.data.def.IntCell
at de.mpicbg.tds.knime.hcstools.populationanalysis.BinningAnalysisNodeModel.execute(BinningAnalysisNodeModel.java:125)
at org.knime.core.node.NodeModel.execute(NodeModel.java:668)
at org.knime.core.node.NodeModel.executeModel(NodeModel.java:524)
at org.knime.core.node.Node.execute(Node.java:873)
at org.knime.core.node.workflow.SingleNodeContainer.performExecuteNode(SingleNodeContainer.java:845)
at org.knime.core.node.exec.LocalNodeExecutionJob.mainExecute(LocalNodeExecutionJob.java:100)
at org.knime.core.node.workflow.NodeExecutionJob.run(NodeExecutionJob.java:166)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at org.knime.core.util.ThreadPool$MyFuture.run(ThreadPool.java:124)
at org.knime.core.util.ThreadPool$Worker.run(ThreadPool.java:239)
What is wrong with my code?