File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Raise an Exception in PL/SQL but not got @ JAVA End

 
Shaan Shar
Ranch Hand
Posts: 1249
Java Spring Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends,

I have raised an exception in PL/SQL Stored Procedures which is of catagory "WHEN OTHERS THEN" Now here I wrote "RAISE" as the last statement. I was calling this SP from JAVA but when I ran this program, I found that at Oracle side the exception was raised, I mean excution went in exception block but neverthless I haven't received that exception as a SQLException in JAVA.

It's strange behaviour for me, Could anyone help me out. I am attaching the code snippet here below...
*********SQL Stored Procedure************
WHEN OTHERS THEN
p_status := Pkg_PalletHosp.cons_error;
RAISE;
*********SQL Stored Procedure************

And java snippet is as follows:

********JAVA Snippet**************

********JAVA Snippet**************

But execution is not passing through Catch Block.......
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 33719
316
Eclipse IDE Java VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ankur,
It looks like a different exception is being thrown. Your best bet would to be to catch (and output) that so we have more information about what is going on.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic