oracle - Calling a Stored Procedure from Java - Exception not thrown on ORA error -
i'm calling oracle stored procedure java, , have no problem sending input parameter values , getting output parameter values java once execute callablestatement
.
however, when send bad data stored procedure (to force error) , execute callablestatement
's execute
method, i'd expect sqlexception
thrown in method. doesn't happen, , code continues normal.
when run stored procedure through sql developer, can see oracle error message (code ora-06502
) displayed in log window. it's mystery me why java code isn't catching error message.
does have idea source of behaviour is? stored procedure not throwing error correctly; java try/catch
not recognizing exception thrown? unfortunately have no access stored proc code check how they're handling errors.
any pointers appreciated.
java doesn't throw sqlexception because call stored procedure java function (callablestatement) has sent command oracle. if procedure executed success, methode of callablestatement give 0, otherwise different of 0, don't see sqlexception.
but in case of sqldevelopper, it's true interpreter sql oracle, can see sqlexception.
Comments
Post a Comment