tags:

views:

148

answers:

2

I have a java program that is trying to call a stored procedure that returns a cursor type. However after registering the appropriate out paramaters and calling callableStatement.execute() I recieve an arrayIndexOutOfBoundsException: -1

I dont fully understand why I am recieving this error at this point in the program. Can anyone explain typical reasons I might encounter this error

thanks

A: 

You try to access some array with the index -1. Check your code for this. By the way there should be some information about where this exception happens.

schnaader
A: 

This shouldn't have anything to do with the callable statement itself, it has to do with you trying to access an array or array-like object with an index that is out of bounds. If one of your parameters in the callable statement were out of bounds it would end up in a different error (Namely a type of SQLException). Can you provide a stack trace?

jtbradle