Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-00911: invalid character

843859Oct 2 2007 — edited Oct 4 2007
Hi 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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 1 2007
Added on Oct 2 2007
2 comments
228 views