One Star

Exception in component tMSSqlInput_1 -- casting issues -- unicode char

Exception in component tMSSqlInput_1
java.sql.SQLException: Unable to convert between net.sourceforge.jtds.jdbc.ClobImpl and INTEGER.
at net.sourceforge.jtds.jdbc.Support.convert(Support.java:648)
at net.sourceforge.jtds.jdbc.JtdsResultSet.getInt(JtdsResultSet.java:641)
at technetics.customers_0_1.Customers.tMSSqlInput_1Process(Customers.java:23982)
at technetics.customers_0_1.Customers.runJobInTOS(Customers.java:37397)
at technetics.customers_0_1.Customers.main(Customers.java:37262)
Hello -- we are receiving this error, and if we deal with that by removing it from the map, we get other errors indicatiing that certain fields in the input are null, etc. The problem is that the errors aren't valid. By that I mean that nowhere do we try to put an nvarchar in an integer field and the fields being reported as null are not null.
We are wondering if the problem is that the source database is unicode complaint (i.e., using nvarchar) where the target is not unicode compliant.
In this particular case, the source database field is nchar and the target is char. The most confusing part is the reference to "INTEGER", as that is not true in either map.
We are using a tJoin and when we look at the schema, on the source side, after clicking the Reset DB Types button we see things like VARBINARY, VARCHAR, etc. However, that button is not available on the target side so we can't get the DB Types.
Any idea how to resolve this problem?
1 REPLY
Four Stars

Re: Exception in component tMSSqlInput_1 -- casting issues -- unicode char

Whether your source and target metadata are different?
I would suggest you to use tConvertType component and be consistent with the metadata before using tMap or tJoin.
Many a times errors are not exactly as expected but they refers to some other problem which occurs before actual point of error.
Can you put a screenshot of your job and the metadata?
Thanks
Vaibhav