aspose file tools
The moose likes JDBC and the fly likes Exception handling for stored procedure from Java code Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "Exception handling for stored procedure from Java code" Watch "Exception handling for stored procedure from Java code" New topic
Author

Exception handling for stored procedure from Java code

lakshman kumaran
Greenhorn

Joined: Aug 16, 2011
Posts: 13
how do you handle exception while writing stored procedure or accessing stored procedure from java
Martin Vajsar
Bartender

Joined: Aug 22, 2010
Posts: 2319
    
    2

Handling the exception inside a stored procedure is obviously database specific; you'll probably find the details on your database documentation.

If there is an exception that escapes the stored procedure, it causes an SQLException to be thrown. Again, the details of how this exception is initialized are database specific, but sometimes it is possible to extract useful information from that. For example, in Oracle the SQLException message contains a stack-trace from the PL/SQL code.
 
I agree. Here's the link: http://jrebel.com/download
 
subject: Exception handling for stored procedure from Java code
 
Similar Threads
List Updation
ORA-00942 How to figure out privileges problem
User Defined SQLException...
Callable statement in Servlet throws exception
User Defined SQLException...