cancel
Showing results for 
Search instead for 
Did you mean: 

java.lang.ArrayIndexOutOfBoundsException

Former Member
0 Kudos

Hi All

We have a sender RFC adapter and it is throwing the above exception when ever data is pushed from R/3.

We observerd that we are getting this error when data is sent in one of the table structure of the RFC.

I have stopped/started the adapter, reimported the RFC structure.

Nothing worked.

<b>Exact Error : - Error: 2007-01-04 18:28:53 PST: java.lang.ArrayIndexOutOfBoundsException: 24</b>

Any suggestions would be greatly appreciated.

Thanks and Regards

NagaKishore V

null

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi Kishore,

This is exception raised mostly, in user defined functions only, there might be a situation in runtime where you are trying to access an element of an array which dosent exist, please send the userdefined functions, so that we can have a more clear picture of it.

Cheers

Nagesh

Former Member
0 Kudos

Hi All

Thanks for all the suggestions. I have tested the RFC in standalone mode and it is working fine. We are trying to push the data using RFC to XI. We configured the required ports and as said before data is coming to XI when one of the table structure is not filled.

Bhavesh Kantilal: I have checked the RFC in standalone mode and it is working fine

Archana Shrivas : RFC is just a shell and we are calling this RFC from the background mode

Nagesh: We have some UDF's which does looping and return a XML string. I have tested in the Mapping program and I am not getting any error. I have also tested by creating a new Message Mapping and Interface mapping with out any UDF's. Even then we are getting the error.

Code in the UDF's

public void xyz(String[] a,String[] b,String[] c,ResultList result,Container container){

String strReturnValue="<iiiiiiiii>";

for (int i=0;i<a.length;i++)

{

strReturnValue = strReturnValue + "<xxxxx>"a<i>

"<ZZZZ>"b<i>"<YYYYY>"c<i>"<AAAA>";

}

strReturnValue = strReturnValue + "</iiiiiiiii>";

result.addValue(strReturnValue);

}

Thanks and Regards

NagaKishore V

Former Member
0 Kudos

Hi NagaKishore,

It seems that it is not possible to have table parameters in input for remote-enabled functions.You may have to find some alternative.

Check this forum discussion on the similar issue

Regards

Bipin Joshi

Former Member
0 Kudos

Hi ,

I Don think there is much issue in sending a Table using RFC .

Check where your table parameters are located among tabs -- there are "Input", "Table", "Changing", "Output" and "Exception" groups. If they are inside "Input" or "Output" then this could be a reason. If they are inside "Table" then it's ok, and the reason is something different.

Cheers,

Nagesh....

Former Member
0 Kudos

Hi All

I solved the problem. There was a mismatch in the RFC Destination and RFC adapter settings. In the RFC Destination I have not set the unicode flag. But in communciation channel for RFC i have set the unicode flag.

I have set the unicode flag at the both the places and issue was solved.

Regards

NagaKishore V

Former Member
0 Kudos

Hi Kishore,

This is exception raised mostly, in user defined functions only, there might be a situation in runtime where you are trying to access an element of an array which dosent exist, please send the userdefined functions, so that we can have a more clear picture of it.

Cheers

Nagesh

Former Member
0 Kudos

Hi,

It could be that you have tested your mpping in your IR before, but it wouldnt be for all conditions... So as suggested in the Blog provided by Bhavesh just do the test of your mapping again.... It could be something to do with context.... So just check ur context set also.

Regards,

Abhy

Former Member
0 Kudos

Hi All

Thanks for the reply..

I am using some UDF's. Problem is messages are not seen in the message monitor.

We have 5 table parameters in the RFC. For each table parameter, I have a UDF to loop thru the structure.

There is a strucute which contains data with decimal data type and we found that if we send the data in this structure, Adapter is throwing the error. If we dont send the data in this structure then the message is coming to the queue and is getting processed.

I have removed the mapping of that structure and I checked sending the data populating all the table structures. Still I am having the problem.

Thanks and Regards

NagaKishore V

Former Member
0 Kudos

Hi All

I have tested by creating a new message mapping free of all UDFs and a new IM.

I have changed the interface determination.

Even now I the adapter is throwing the error.

Regards

NagaKishore V

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

test your RFC stand alone with the same data and check if it works fine.

Regards

Bhavesh

bhavesh_kantilal
Active Contributor
0 Kudos

Hi

><i>Problem is messages are not seen in the message monitor.</i>

Is this a synchronous scneario? If yes, you need to turn SYNCH Looging on.

SXMB_ADM > Integration Engine Configuration> specific configuration --> LOGGING_SYNC --> set value to 1.

Regards

Bhavesh

Former Member
0 Kudos

What are you guys doing in RFC? Any array or substring operations in it?

Is it a big RFC? Did you debug the RFC stand alone using the same values?

--Archana

Former Member
0 Kudos

Hi,

Usually, u wl get this kind of error bcoz of ur mapping. Plz chck ur mapping prgrm exclusively text functions like substring and UDFs.

regards

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

Do you have some UDF in XI uin your mapping? This looks like some problem with some custom code. Check your UDF's and test your mapping using this blog and see if you get the same error and then debug the same,

/people/michal.krawczyk2/blog/2005/09/16/xi-how-to-test-your-mapping-in-real-life-scenarios

Regards

Bhavesh