My application is running on Websphere 5.0 and using Oracle 9.2.04. Some time it gives following exception in one particular query while retrieving a particular field. But this exception is coming random(sometime after 2 days). If I run this query in SQLPlus, it runs fine. Seeing the exception it appears this is a JDBC driver problem. Could someone please give the way how to fix this? ============================= java.lang.ArrayIndexOutOfBoundsException at oracle.sql.LnxLibThin.lnxnuc(LnxLibThin.java:5737) at oracle.sql.NUMBER.toInt(NUMBER.java:412) at oracle.jdbc.dbaccess.DBConversion.NumberBytesToInt(DBConversion.java:2959) at oracle.jdbc.driver.OracleStatement.getIntValue(OracleStatement.java:4505) java.la at oracle.jdbc.driver.OracleResultSetImpl.getInt(OracleResultSetImpl.java:536) at oracle.jdbc.driver.OracleResultSet.getInt(OracleResultSet.java:1528) at com.ibm.ws.rsadapter.jdbc.WSJdbcResultSet.getInt(WSJdbcResultSet.java:1347)
this isn't a JDBC error, those errors come in the form a java.sql.SQLException. This is a straight up java.lang.Exception, and seems as this one stems from you refering to an array index for an array in which the index you are referencing does not exist ( greater than the size of the array or less than 0 ). Jamie [ April 14, 2004: Message edited by: Jamie Robertson ]
Joined: Aug 01, 2002
Thanks Jamie, I understand that it is a java.lang Exception, but when I run this query in SQL plus it runs properly and the column where getInt is applied is also having proper number value. Can this be related to data format, thats why it is not able to convert a value to Integer? If I replace getInt by getString, then also it fails. And sometime I have seen failed to convert UTF8 to UCS2. My doubt goes on the data format. Please advise.