#1 2011-03-15 09:17:04

eps1975
Member
Registered: 2011-03-09
Posts: 10

Datatype mismatch AS400

Tags: [bug, db2, error, mysql]

Hi

I have created a AS400 input component.
Among the fields I want there is one that is called invoice description. In our AS400 this is set to type NCHAR(24)
When I look at the schema design I see that it is set with type String and DB Type to varchar.
It failes at the very first line. The text it finds is "2412 FEILBET."

My error code:
[statistics] connecting to socket on port 3671
[statistics] connected
Exception in component tAS400Input_1
java.sql.SQLException: Data type mismatch. (For input string: "2412 FEILBET.")
    at com.ibm.as400.access.JDError.throwSQLException(JDError.java:528)
    at com.ibm.as400.access.SQLChar.getFloat(SQLChar.java:464)
    at com.ibm.as400.access.AS400JDBCResultSet.getFloat(AS400JDBCResultSet.java:2869)
    at as400_mitmas.fapred_0_1.FAPRED.tAS400Input_1Process(FAPRED.java:700)
    at as400_mitmas.fapred_0_1.FAPRED.runJobInTOS(FAPRED.java:1065)
    at as400_mitmas.fapred_0_1.FAPRED.main(FAPRED.java:936)

I have tried to alter the line so it has "FEILBET". Still the same error.

Anyone got ideas on why this happends?

Dan

Offline

#2 2011-03-15 09:46:46

shong
Talend team
Registered: 2007-08-29
Posts: 10310
Website

Re: Datatype mismatch AS400

Hi Dan
Can you please upload a screenshot of schema?

Best regards
Shong


Email:shong@talend.com
Choose Talend, Enjoy Talend!
New & Event: Talend Help Center
Talend-->the leader of open source data management and application integration solutions!

Offline

#3 2011-03-15 20:05:56

emaxt6
Member
Registered: 2008-08-04
Posts: 325

Re: Datatype mismatch AS400

Are you sure that the problem is related to that field? in the stack trace I see something related to float / numeric fields columns....

show your data if you want help...

Offline

#4 2011-03-21 13:21:40

eps1975
Member
Registered: 2011-03-09
Posts: 10

Re: Datatype mismatch AS400

Hi

Sorry for late reply. I have been on a short holiday. smile

Please find below my attached printscreen of my model.
Is tis what you wanted?

I also tested to remove the field I thought was worng. Imported just fine without that one.
Sp at least I know what field it is. smile

Dan


Uploaded Images

Last edited by eps1975 (2011-03-21 13:32:48)

Offline

#5 2011-03-21 17:39:23

emaxt6
Member
Registered: 2008-08-04
Posts: 325

Re: Datatype mismatch AS400

The code is issuing a getFloat (...at com.ibm.as400.access.AS400JDBCResultSet.getFloat...).

Maybe somewhere you have on as400 character data mapped as float ( maybe automatically wrongly by Talend ).
Have you checked that.

Also you should compare the "dds" command on as400 to the schema you are fetching.

bye

Offline

Board footer

Powered by FluxBB