Custom component created gives error when running

One Star

Custom component created gives error when running

I am getting the below error, when I am running a job with custom created component
Starting job ESI_trial_WS_OG_DD_1 at 15:35 10/09/2011.
connecting to socket on port 4046
Exception in component tESI_FM_trial3_1
at java.util.LinkedHashMap$LinkedHashIterator.nextEntry(
at java.util.LinkedHashMap$
at esi_test1.esi_trial_ws_og_dd_1_0_1.ESI_trial_WS_OG_DD_1.tContextDump_1Process(
at esi_test1.esi_trial_ws_og_dd_1_0_1.ESI_trial_WS_OG_DD_1.runJobInTOS(
at esi_test1.esi_trial_ws_og_dd_1_0_1.ESI_trial_WS_OG_DD_1.main(
Job ESI_trial_WS_OG_DD_1 ended at 15:35 10/09/2011.
Is there a way i can identify which line (javajet/java) code is causing this? Suggest some way to debug the same.
One Star

Re: Custom component created gives error when running

You should add a few debug lines ( System.out.println("debug xxx"); ) to detect which line gives you the error and then.. well, normally there is a good reason if an exception is thrown Smiley Happy
One Star

Re: Custom component created gives error when running

He He Smiley Happy ... I was just doing that. But was looking for better ways Smiley Wink to deal with it, probably some inbuilt parser Smiley Wink.
One Star

Re: Custom component created gives error when running

You can actually run the job code from the "code" tab and set breakpoints, watch variables etc... however, if your component is not huge (say :_ less than 100 lines per section) it should not be difficult to get the the faulty line anyway... if instead you have a very big chunk of java code, you should probably consider to create it outside, in a java class, package it ina jar and then use it accordingly.
I do this in some of my components, it also help sbecause you can easily create a test program in java for your class, without dealing with the component.

Re: Custom component created gives error when running

Agree with saburo's comments.
As a more general tip - which will probably help more next time, than this time: you didn't seem sure if the problem is JET or Java. I know the feeling.
When I build a non trivial component, I build and unit test the target Java first, divided into begin/main/end sections.
When I have that working, I wrap it up in the JET template.
That goes a long way to eliminating any issues with Java and algorithm, before I get into those of JET and code generation.


Talend named a Leader.

Get your copy


Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables


How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration


Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.