ORA-00911: invalid character
843859Oct 2 2007 — edited Oct 4 2007Hi Folks,
In one of my servelet i am tyring to execute a db proc which is suppose to return me a cursor. At times it runs perfectly fine but at some occassion i get ORA-00911: invalid character error in catch (SQLException ex). The stack trace tells me that it has generated this error when i try to get the cursor from i.e.
oResultSet = ((OracleCallableStatement) oCallStatement).getCursor(4);
The code is something like this
oConnection = oDbConnection.getConnection();
oCallStatement = oConnection.prepareCall("{Call packageName.procedureName(?,?,?,?,?,?,?,?)}");
oCallStatement.setString(1, inputString1);
oCallStatement.setString(2, inputString1);
oCallStatement.setString(3, inputString1);
oCallStatement.registerOutParameter(4, OracleTypes.CURSOR);
oCallStatement.registerOutParameter(5, OracleTypes.CURSOR);
oCallStatement.registerOutParameter(6, OracleTypes.CURSOR);
oCallStatement.registerOutParameter(7, java.sql.Types.VARCHAR);
oCallStatement.registerOutParameter(8, java.sql.Types.VARCHAR);
oCallStatement.execute();
oResultSet = ((OracleCallableStatement) oCallStatement).getCursor(4);
while(oResultSet.next())
{
//My program logic
}
Can somebody help. Also i have checked there is no missing single quotes or extra semicolon in my db proc.
Thanks
Rajesh