• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 1252
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.......
 
author & internet detective
Posts: 41878
909
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic