Hi 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 connected Exception in component tESI_FM_trial3_1 java.util.NoSuchElementException at java.util.LinkedHashMap$LinkedHashIterator.nextEntry(LinkedHashMap.java:392) at java.util.LinkedHashMap$KeyIterator.next(LinkedHashMap.java:401) at esi_test1.esi_trial_ws_og_dd_1_0_1.ESI_trial_WS_OG_DD_1.tContextDump_1Process(ESI_trial_WS_OG_DD_1.java:1489) at esi_test1.esi_trial_ws_og_dd_1_0_1.ESI_trial_WS_OG_DD_1.runJobInTOS(ESI_trial_WS_OG_DD_1.java:8568) at esi_test1.esi_trial_ws_og_dd_1_0_1.ESI_trial_WS_OG_DD_1.main(ESI_trial_WS_OG_DD_1.java:8438) disconnected 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. Thanks
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
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.
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.