• 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
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

java.sql.SQLException: ORA-06550

 
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi the following is my stored procedure

PROCEDURE get_batch_ind (p_batch_ind OUT NUMBER)

IS

-- ------------------------------------------------------------
-- Name : GET_BATCH_IND
-- Date Created : [date]
-- Created By : [name]
-- Date Changed :
-- Changes Made :
-- Description : Invoked from the MIS JSP, returns a count
--of rows from T_TRANSACTION_SUMMARIES where
-- tsum_creation_date is current date and
--tsum_conf_total_amt is 1. If this is more
--than 0, there has been a successful batch
--run on the current date.
-- -------------------------------------------------------------

BEGIN

-- ------------------------------------------------
-- Returns count of tsum_conf_total_amt indicator
-- ------------------------------------------------


SELECT COUNT(*) into p_batch_ind
FROM t_transaction_summaries
WHERE to_char(tsum_creation_date, 'dd/mm/yyyy') = to_char(sysdate, 'dd/mm/yyyy')
AND tsum_conf_total_amt = 1;


EXCEPTION

WHEN OTHERS THEN
RAISE_APPLICATION_ERROR (-20450, 'GET_BATCH_IND Abended '||sqlerrm);

END get_batch_ind;


THe above stored procedure compiled and executed properly in Sql Plus. Also it gave the right results when I run it.

But when I am trying to run it through java.I am getting the following exception.

Description: java.sql.SQLException: ORA-06550: line 1, column 16:
PLS-00302: component 'GET_BATCH_IND' must be declared

Can any body please help.Its very urgent.
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It could simply be a matter of which "user" is logging into Oracle. When you run SQLPlus and in the Java Program, are they both using the same URL, username and password? Meaning it might be a matter of the database security and if the user the App is using can see the Schema/SP that you created.

Mark
 
Ranch Hand
Posts: 1143
1
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Rohit,
Post your java code (if you want us to debug it for you)

Good Luck,
Avi.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic