One Star

tXMLMap index limitation?

Hello,
I am creating my XML requests for SOAP calls using the tXMLMap and my job fails after certain webservice calls with the below error:
java.lang.IndexOutOfBoundsException:Index value: 58 cannot be greater than the size: 47
This issue has been reported in other threads and as suggested there I have set the "createEmptyElements" option to false and I also set the parent of the loop element as group element. But still the job fails with the same error
My XML structure is as below:
-A (root element)
    -B (group element)
       -C (loop element)
Has anyone been able to find a solution to this problem?
Thanks,
Dhruv
7 REPLIES
Community Manager

Re: tXMLMap index limitation?

Hi 
I am not able to reproduce the problem, would you mind sharing me a use case? That will be helpful.
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: tXMLMap index limitation?

Hi Shong,
Thank you for your quick reply. I have a job with a series of webservice calls. In all there are 5 SOAP Calls. The first half of the process contains two SOAP calls which return a list of Items. I parse the XML responses of both the initial calls and append the list of items into a list of tHashout (the volume is huge with thousands of items, test bulk 40K items).
In the second half, I pick one item at a time and make 3 other SOAP calls to manipulate the contents of the item. The first call (1st) is a GET call which returns the contents of the item, a heavy call with a large list of child nodes. In the second call (2nd) I update the contents of the child nodes (one of the child node is a loop element), again a heavy call. And in the last SOAP call (3rd) I update some other details. The order of the 2nd and the 3rd call is interchangeable and it didn't make any difference in performance.
When I run the job, it always fails after parsing the response of the Item Update call (2nd call in the description above) after processing and fails after processing an average of 1200 items.
I have referred the following two posts so far but it doesn't seem to be working in my case.
https://www.talendforge.org/forum/viewtopic.php?id=22994
https://www.talendforge.org/forum/viewtopic.php?id=31766
Infact when I use the group element approach the job fails early after processing not more than 250 items.
Thanks,
Dhruv
Community Manager

Re: tXMLMap index limitation?

Hi Dhruv
I don't find the cause of this error right now, can you please create a jira issue on bugtracker with details? Our developer will investigate it further and debug the Java code of job.
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: tXMLMap index limitation?

Hi Shong,
Sure, will do that.
Thanks,
Dhruv
One Star

Re: tXMLMap index limitation?

Hi Shong,
I was able to resolve my issue, I hadn't marked the "All in one" option to true and I guess that was causing the error.
Thanks,
Dhruv
Community Manager

Re: tXMLMap index limitation?

Hi Dhruv 
Thanks for sharing the solution here, hope it will help others who meet the same problem in future. If you create a jira issue on our bugtracker, please add the issue number in your post, it is helpful for us to follow up the issue. 
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: tXMLMap index limitation?

Hi Shong,
No problem. I have created a jira issue, here is the issue number: TDI-34010.
Thanks,
Dhruv