still problems with different data types

When executing my node, I get the following error:

Execute failed: org.knime.core.data.def.IntCell cannot be cast to org.knime.core.data.def.DoubleCell

The implementation looks like this:

DataCell valueCell = row.getCell(idx);

if(!valueCell.isMissing()) {

Double value = ((DoubleCell)valueCell).getDoubleValue();

}

This works for double columns but not for integer columns. I have another node with a similar implementation, which has no problems at all. What is wrong with the implementation? I really don't get it. Can anybody please help?

 

You must not cast to DoubleCell but rather to DoubleValue.

Thanks a lot!

I did not recognize that the implementation of my other (working) node is exactly like this... the classes look too similar and the weird thing was, that I didn't get an error when executing this statement in debug mode (beside the fact that I could not go further but I always got the correct double value).