Database product version=Oracle 9.2.0.1.0
Driver Version=9.2.0.3.0
Our application is an Multi-Threaded Java based application and uses 6 connections to do various database operations,I get "Invalid arument call exception" when the following code is executed. This exception is thrown at line cols.close() in the code given below .I have also pasted the exception traces.Any help would be highly appreciated.

Thanks,
charoo

code:

rs=smt.executeQuery("SELECT * FROM JUNK");
try{
while(rs.next())
{
md = con.getMetaData();
cols = md.getColumns(null, null,"JUNK", "%");
try{
while(cols.next())
{
String test=cols.getString("COLUMN_NAME");
System.out.println("THE VALUE IS .."+test);
}
}
finally
{
cols.close();
md=null;
}
}
}
finally
{
rs.close();
}
}catch(Exception exp)
{
exp.printStackTrace();
}
Exception traces:

java.sql.SQLException: Io exception: invalid arguments in call
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBE rror.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBE rror.java:179)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBE rror.java:334)
at oracle.jdbc.driver.OracleStatement.prepare_for_new _result(OracleStatement.java:3287)
at oracle.jdbc.driver.OraclePreparedStatement.end_of_ result_set(OraclePreparedStatement.java:3413)
at oracle.jdbc.driver.OracleResultSetImpl.internal_cl ose(OracleResultSetImpl.java:1504)
at oracle.jdbc.driver.OracleResultSetImpl.close(Oracl eResultSetImpl.java:96)
at test.ResultSetImpl.callMain(ResultSetImpl.java:50)

PS: Exception is reproducible only once every 4 or 5 runs .