Back Forum Reply New

Error handling while using stored procedure

Hi,

I have created a stored procedure class which extends spring storedprocedure. I am able to invoke the stored procedure correctly but I am not getting any exception if there are any failures while exeuting the statements in the stored procedure. I am seeing the error while I execute the stored procedire manually.
Can some provide pointers or more information on how to handle error condtions while executing stored procedure. I am using MySql as the database.

Regards,
Ramesh


Originally Posted by sramesh11Hi,

I have created a stored procedure class which extends spring storedprocedure. I am able to invoke the stored procedure correctly but I am not getting any exception if there are any failures while exeuting the statements in the stored procedure. I am seeing the error while I execute the stored procedire manually.
Can some provide pointers or more information on how to handle error condtions while executing stored procedure. I am using MySql as the database.

Regards,
Ramesh

Wow, i hope your name isn't sai ramesh as well.
Anyway, I am not wrong, you need to provide Exception translator class. That class is responsible for throwing the exception back to the application. The exception translator gives you an opportunity to intorragate the exception thrown, take maybe different course of action. If you can't handle the exception, you simply do nothing and let it fall through.
Check out the JdbcAccessor amp; SQLExceptionTranslator

hope it helps
¥
Back Forum Reply New