Error in reading data from SQL


I have been trying to read data from a table in SQL with a number of fields (some fields contains blank values). I receive the following error:

Execute failed: Runtime class of object "" (index 0) in row "Row1" is StringCell and does not comply with its supposed superclass BinaryObjectDataCell

The error is caused by the fields with no data. Since, the table is having 25-30 fields and I require almost all the fields other than the blanks cell, writing a custom uery in the database reader is not a feasible solution. (I have 50 other tables of same kind). Is there any other way to mitigate this error other than writing a custom query to ignore the blank fields?

Please help.


Which database system are you using? What do exactly do you mean with "blank values"? Empty strings, NULL, ...? What's the column's type in the database?

Thank you for getting back. here is the details

Database: Microsoft SQL 2012

Blank values means 'Empty Strings'. 

field type: ntext

found an alternate solution. used different node to construct the same dataflow.

I have used "database connector" and "database column filter", read the data using "database connection reader" node , instead of database reader and writing a custom query.


I just tested with SQL Server 2012: created a table with an "ntext" column and inserted two rows, one with a text, another with an empty string. The reader node in KNIME correctly creates a String column and reads both values from the database. There most be something else wrong in your case. I was using the latest sqljdbc4.jar from Microsoft. Maybe you are using a different driver?

I am using 'sqljdbc4.jar' driver. 

I am attaching a screenshot of the table with focus on the particular field.

Sorry, I can in now way reproduce your problem. Whatever I try, ntext columns are always correctly read as string columns.

Can you try other Java-based client? For example eclipse, IntelliJ idea, Netbeans have DB query extensions. If the select * ... works also similarly to KNIME's behavior -with the same JDBC driver- that might be an indicator of a bug in the JDBC driver.

My other guess would be incompatibility with encodings or byte order marks, though that whould not explain why things work when there is only a single column.

sorry for the delay in replying.

I would be looking at a different driver. Hopefully, that would solve my problem.