Oracle JDBC driver givin problems when reading a LONG from the oracle database !!!
Posted on 2003-03-02
I am reading a resultset in a usual manner by doing the while(resultset.next()) method.
I get an "ArrayIndexOutOfBoundsException" when the driver is reading the "LONG" type of value returned by the PLSQL procedure.
Again the problem is that when I am returning the LONG column as the first in the select there is no error, but when I change the position of the LONG column in the select the exception starts occuring from that line. And again its ArrayOutOfBoundsException.
I hv pasted the code below..
dID = rsDocs.getString(1);
stat = rsDocs.getString(2);
dTypeCode = rsDocs.getString(3);
suppD = rsDocs.getString(4);
pNum = rsDocs.getString(5);
rDate = rsDocs.getString(6);
sNote = rsDocs.getString(7);
cNum = rsDocs.getString(8);
strSer = rsDocs.getString(9);
Here I am reading the LONG as the 7th column (sNote). It throws the exception.
Even if I comment that line
//sNote = rsDocs.getString(7);
I start to get the exception on the next statement.
So I have guessed that the problem is when the driver reads the LONG value from the DB and not when it is read from the resultset.
But the question remains, What/Why the problem ??
And on top of it, why not when the column is the 1st column selected !!!
Any explanations ???