Unexplained Eclipse error message

I keep getting this error in Eclipse: “The method getRaType(DataType) from the type RaType refers to the missing type DataType”.

There are several versions of this, but the first part is always one of my declared types and the ‘missing type’ is always a Knime type, usually DataType.

The code all compiles and runs perfectly. Then I make some minor unrelated change and this error pops up. I have found that the Eclipse Project|Clean makes it go away again, until the next time. Reloading the Knime target seems to work too.

Any idea what might cause it?

Just a guess: do you miss org.knime.core in your project’s dependencies? I think this is where DataType is defined and it might work for you because it gets pulled in as a dependency of one of your other dependencies, but if you use its types in your code you should define it as a direct dependency of the project.
Kind regards,

As far as I know, all the dependencies are correct. I have imports that look like these:

import org.knime.core.data.DataCell;
import org.knime.core.data.DataColumnSpec;
import org.knime.core.data.DataColumnSpecCreator;
import org.knime.core.data.DataRow;
import org.knime.core.data.DataTableSpec;

Mostly it works fine, compiles and runs. It just that occasionally some compile errors appear in code that was working and has not been changed, and Eclipse clean makes them go away again.

No, in that file there is no import for DataType. So I added one and now I get the warning:

The import org.knime.core.data.DataType is never used

It seems to be somehow related to Eclipse losing track of dependencies. I hoped someone might have run across it and could suggest a fix. If not, I guess I’ll just have to keep cleaning.

Which dependencies do you have in your plugin.xml? Is org.knime.core listed there?
Kind regards,

Sadly eclipse seems to get hick-ups from time to time, and such things happen.
Also, you might need to reset your target platform if suddenly no dependencies are located anymore.

1 Like


I think they were all added by Eclipse. I don’t know why (or if) these are the right ones.

That’s been my experience. Maybe over time it’ll get better or worse, and either go away or turn into something that can be fixed. Time will tell. Thanks.

1 Like