Skip to Content

IDOC to ANSI X12 String index out of bounds exception

Dec 21, 2017 at 11:30 AM


avatar image


HI Experts,

I'm doing an Outbound idoc to ANSI EDI 940 version 5010. I have done a simple mapping like mapped the ISA and IEA segments to constants except date and time. but in the Receiver SFTP channel i'm getting the below error. i know most of you guys says its a length issue but i checked all the length's of every element and they are correct(means the total length of ISA segment is 107). Even i tried to execute the EDI xml taken from the mapping in the B2B toolkit there it is converting to ANSI format perfectly. please let me know where to correct it

MP: exception caught with cause javax.ejb.TransactionRolledbackLocalException: Error occurred: ; nested exception is: javax.ejb.EJBTransactionRolledbackException: Transaction ended with error, reason: ; nested exception is: javax.ejb.EJBException: ASJ.ejb.005044 (Failed in component: Exception raised from invocation of public, throws method on bean instance for bean*xml|*xml|X12ConverterModule in application; nested exception is: java.lang.StringIndexOutOfBoundsException: String index out of range: 122

capture.png (10.0 kB)
edi-xml.txt (815 B)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
shiva Prasad Dec 22, 2017 at 03:37 AM

Hi Satish ,

In the attached XML i could see only header information (ISA) do a dummy mapping for all segments GS and ST and try it and try



Show 1 Share
10 |10000 characters needed characters left characters exceeded

HI Shiva prasad,

i have done as you mentioned and its working perfectly. but the thing is like GS segment is shown as optional in the message mapping then why do we need to map it if i dont need it?