Search code examples
javaetltalend

TJavaFlex component unable to convert Integer to String error


I am a noob in Talend and I am having a very simple flow as below: A delimited file connected to a tjavaflex component, which is in turn is connected to tlogrow. enter image description here

The delimited file has a column "id" defined as integer. I am trying to send this column as a string and also do some transformations(like string append) while sending data into the tlogrow component. I have modified the schema of the tlogrow component so that it can receive String values.

enter image description here

Yet when I run the job,I am getting the error as below: enter image description here

When I inspect the code,I find that the error has occurred here: enter image description here

At the same time, I don't understand why I have the lines 850,851,852 in the above snip, when ideally ,my code is at lines 854,855,856.

From what I can understand, even though I changed the datatype of my "id" column at the receiving end, it is still considering it as an Integer type.

Can someone please let me know why this error could be occurring? I tried a lot of combinations to get this working somehow, but it doesn't. Even executed similar code snippets in Java(EclipseIDE),but I don't seem to be able to reproduce this.


Solution

  • Uncheck the Data Auto Propogate checkbox in the tJavaFlex component to prevent the automatic code generation to propagate the input-output flow.

    enter image description here