cancel
Showing results for 
Search instead for 
Did you mean: 

IndexOutOfBoundsException while web service returns more records

Former Member
0 Kudos

Hi

I have a web service which returns records based on the parameters send when i try to search for more number of records it runs for more than 20 minutes and then it generete error <b>java.lang.IndexOutOfBoundsException</b> and if there are no records or less records it works fine no problem in both the cases so

please guid me what could be the problem

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi nk,

This maybe the intialization of Array with minimum number in the webservice.

Can you check the Webservice(Is it created by you)?.

Kind Regards,

Mukesh.

Former Member
0 Kudos

Hi NK,

The problem you get is caused by, the recieving end is too small to carry, so it is better to check the webservice and the local dynpro array that recieving the values. Go for increasing the size of array

suresh_krishnamoorthy
Active Contributor
0 Kudos

Hi Nk,

Web Services has that problem b'coz it has return n no of records in XML format. It take more times forming in XML format. Web service has the performance issue.

If your not generating model out web service to retreive data from database go for EJB Lookup call the interface directly.

Regards

Suresh

Former Member
0 Kudos

Hi Suresh

I am new to web dynpro can you please tell me about EJB Lookup I am connecting to a SAP system (not any database directly)

Thanks

suresh_krishnamoorthy
Active Contributor
0 Kudos

Hi Ninad,

After long time i am replying for this post.

Sample code for lookup ejb

1. addRecord method is interface in EJB

SampleEJB remote = null;

try {

Context ctx = new InitialContext();

SampleEJBHome home = (SampleEJBHome) ctx.lookup("SampleJNDI");

remote = home.create();

String result = remote.addRecord(aTemp1,aTemp2);

} catch (Exception e) {

System.out.println("Exception:" + e.getLocalizedMessage());

}

Regards

Suresh

suresh_krishnamoorthy
Active Contributor
0 Kudos

Hi ninad,

1. Write one java main program inside put above code look up your ejb and call corresponding interface which u want.

2. run that application you will find exact line which gives error.

3. add jar files and EJB project. Add VM Argument also.

still problem exists mean paste your code

Regards

Suresh