cancel
Showing results for 
Search instead for 
Did you mean: 

Error received : #java.lang.ArrayIndexOutOfBoundsException: -1

Former Member
0 Kudos

Hello all,

I have come across a strange behaviour while trying to execute an aRFC. This bapi that I have is suppose to take in a requestID and a userID, find the matching results and return me a table value. Problem is, whenever I attempt to set the parameters for requestID and userID, it prompts me with the following error : #java.lang.ArrayIndexOutOfBoundsException: -1. I will expect this error when trying to access a row number that exceeds the actual table rows but not in this case when I'm trying to set the parameters prior to the execution of the bapi.

Can someone kindly help please ? Thank you very much.

from

Kwok Wei

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Have you tried to reimport the rfc model. If so restart the server and again deploy the project. it will work fine.

Regards,

Mahesh K.

Former Member
0 Kudos

Hello Mahesh,

Thanks for the suggestion. I have restarted the server and seems to be moving forward now... its giving me a null pointer exception instead of the ambiguous ArrayIndexOutOfBoundsException. Do you know why ?

The NPE is triggered when I attempt to set the requestID eg: wdcontext.currentTestElement.setRequestID("0008");

from

Kwok Wei

Former Member
0 Kudos

Hello Mahesh.. your suggestion worked. But apart from re-importing the model, I need to delete the babpi from:

1) Used models

2) Delete the method "executeXXXXXX" from implemention,

3) Delet all context mappings in the view controller,

4) Re-import the model,

5) Repeat 2 to 3

Thanks.

Answers (0)