Strange error while executing a stored procedure: Incorrect syntax near '@p0'

All, I am getting a strange error while executing a stored procedure: Incorrect syntax near '@p0'  using JDBC CallableStatment.
Here is my code...
CallableStatement cStmt = con.prepareCall("{call SET CHAINED ON EXEC <dbName>.<schemaName>.<SPName> (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}");
cStmt.setString(1, "2012005881");
cStmt.setString(2, "07");
cStmt.setString(3, "10");
cStmt.setString(4, "Case title");
cStmt.setString(5, "Open");
java.sql.Date dt1 = new java.sql.Date(2014,10,20);
cStmt.setDate(6, dt1);
cStmt.setString(7, "01");
cStmt.setString(8, "N");
cStmt.setString(9, "ADA Test");
cStmt.setString(10, "N");
cStmt.setString(11, "English");
cStmt.setString(12, "N");
cStmt.setString(13, "N");
cStmt.setString(14, "N");
cStmt.setString(15, "N");
cStmt.setString(16, "N");
cStmt.setString(17, "N");
cStmt.setString(18, "07");
cStmt.setString(19, "10");
cStmt.setString(20, "juache0");
java.sql.Date dt2 = new java.sql.Date(2014,10,20);
java.sql.Date dt3 = new java.sql.Date(2014,10,20);
cStmt.setDate(21, dt2);
cStmt.setDate(22, dt3);
cStmt.setString(23, "userid0");
cStmt.setString(24, "");
cStmt.setString(25, "");  
cStmt.setString(26, "");
java.math.BigDecimal bg1 = new java.math.BigDecimal(10);
cStmt.setBigDecimal(27, bg1);
cStmt.setString(28, "userid");
cStmt.setString(29, "userid");
int hadResults = cStmt.executeUpdate();
Your help is greatly appreciated.
I am executing the above using Jconnect3.0 driver, inside WebSphere Application Server V8.0
Thanks
Nags

NOTE: I don't work with JDBC/jConnect so (at this point) just some questions ...
1 - are you sending this to ASE, ASA, IQ, or some other RDBMS?
2 - what is the value of <schemaname>?
3 - do you have other prepareCall() instances that successfully call a stored proc? [would be interesting to see if there's a difference in the format of the calls]
A quick google search shows a couple ways to submit a stored proc execution to the RDBMS, with the format depending on the format expected by the target RDBMS.
I'm wondering if you really need/want the parentheses around the argument list, ie, what happens if you change
from
-- parentheses around args
EXEC <dbName>.<schemaName>.<SPName> ( ?,?,?,?,?,...,? )
to
-- no parentheses around args
EXEC <dbName>.<schemaName>.<SPName> ?,?,?,?,?,...,?
In ASE if I wrap the parameters in parentheses I get the same error you're getting:
================== w/ parentheses => error
1> sp_who (sa)
2> go
Msg 102, Level 15, State 1:
Server 'CC1_V1', Line 1:
Incorrect syntax near 'sa'.   <<=== sa == @p0 ??
================== w/out parentheses => works
1> sp_who sa
2> go
fid spid status  loginame origname ...
   0   17 running sa       sa       ...
==================

Similar Messages

  • Error while executing the stored procedure through sender JDBC adapter

    Hi All,
    I am getting below error while executing the stored procedure through sender JDBC adapter.
    Database-level error reported by JDBC driver while executing statement 'exec SapgetNextEntity 'SalesOrder''. The JDBC driver returned the following error message: 'com.microsoft.sqlserver.jdbc.SQLServerException: The statement did not return a result set.'. For details, contact your database server vendor.
    what is the problem? any idea to anyone...
    regards
    Ramesh

    hi Dharamveer,
    I am not getting below statement for your reply
    Try to use Refrence Cursor it will return u reference of resultset.
    I mention SP like this
    exec SapgetNextEntity 'SalesOrder'
    SapgetNextEntity -
    > SP Name
    SalesOrder----
    > Parameter I am passing...
    regards
    Ramesh

  • Error while executing a stored procedure from forms6i

    When I execute a STORED PROCEDURE from ORACLE DB 10g this procedure works perfectly fine.
    But when I execute the same from the FORMs 6i I get the following error:
    PDE-PLU022 Don't have access to the stored program unit
    XMLPARSERCOVER in schema CARE.
    where XMLPARSERCOVER is the class and
    CARE is the schema.
    Regards,
    Jignesh S

    I have tried this with both the owner of the schema and the intended user, -from both forms and directly.
    All rights was granted on the stored procedure. Since posting I have found that one of the tables that the procedure might insert into, was not explicitly granted to the intended user, and after rectifying that the error message went away.
    -however, the procedure now silently "finishes" without any evidence that it ever ran, if invoked from the forms application. When invoked from SQL Plus (or JDev, or Toad) it runs as expected.
    I have no public synonym for the procedure, -is that necessary?
    The stored procedure in question is implemented in java, and published as a stored procedure. It does rather heavy lifting, when running, using a view against another server , updating local tables and quite a lot of data validation/cleansing, and logging. All recourses are within the same schema.
    Any ideas?

  • Error while executing Multiple Stored Procedure through .sql file

    Hi Guru's.
    I am new to ORACLE. I am facing problem while creating Stored Procedure through .sql file.
    I have one test.sql file with Stored Procedure is like,
    CREATE OR REPLACE PROCEDURE skeleton1
    AS
    BEGIN
         DBMS_Output.Put_Line('skeleton1');
    END skeleton1;
    CREATE OR REPLACE PROCEDURE skeleton2
    AS
    BEGIN
         DBMS_Output.Put_Line('skeleton2');
    END skeleton2;
    Now when i try to execute this test.sql file through SQL PLUS it gives me Error like this
    I am opening test.sql file from SQL PLUS,
    SQL>
    1 CREATE OR REPLACE PROCEDURE skeleton1
    2 AS
    3 BEGIN
    4 DBMS_Output.Put_Line('skeleton1');
    5 END skeleton1;
    6 /
    7 CREATE OR REPLACE PROCEDURE skeleton2
    8 AS
    9 BEGIN
    10 DBMS_Output.Put_Line('skeleton2');
    11* END skeleton2;
    SQL> /
    Warning: Procedure created with compilation errors.
    SQL> show errors;
    Errors for PROCEDURE SKELETON1:
    LINE/COL ERROR
    6/1 PLS-00103: Encountered the symbol "/"
    SQL>
    Please suggest how to create multiple CREATE PROCEDURE using single .sql script file....
    Regards,
    Shatrughan

    Hi,
    Try this
    CREATE OR REPLACE PROCEDURE skeleton1
    AS
    BEGIN
    DBMS_Output.Put_Line('skeleton1');
    END ;
    CREATE OR REPLACE PROCEDURE skeleton2
    AS
    BEGIN
    DBMS_Output.Put_Line('skeleton2');
    END;
    /Save the file and call it.
    Regards,
    Bhushan

  • Error while executing java stored procedure from a pl/sql procedure

    We have a requirement where we need to execute JAVA code stored in an Oracle database (Java Stored Procedure). This code uses some JAR files which we have already loaded without any errors in the database.
    The class file was also loaded in the database without any errors. But when we execute the method of this class (JAVA code), it gives the following error:
    ORA-29532: Java call terminated by uncaught Java exception:
    java.lang.NoClassDefFoundError
    Is there any way of debugging the code and getting to know where exactly the problem is? Or, any tool/software available for doing the same.
    Any pointers would be of great help!
    Thanks in advance

    Hi Uday,
    My guess is that there is a problem with your java stored procedure that is causing the "ExceptionInInitializer" error to be thrown. According to the javadoc:
    is thrown to indicate that an exception occurred during
    evaluation of a static initializer or
    the initializer for a static variable
    Since I didn't see any of your code in your post, I can't help you much more, I'm afraid. Perhaps if you would provide some more details, I may be able to help you some more. I think the following details would be helpful:
    1. Complete error message and stack trace you are getting.
    2. The section of your java code that you think is causing the problem.
    3. Oracle database version you are using.
    Good Luck,
    Avi.

  • Error while executing Java Stored Procedure.

    Hi,
    When I'm trying to execute my java stored procedure i'm getting the following error:
    ORA-29532: Java call terminated by uncaught Java exception: java.lang.ExceptionInInitializerError
    Does anybody has idea why this error comes and how can be resolved.
    Thanks in advance.
    Uday

    Hi Uday,
    My guess is that there is a problem with your java stored procedure that is causing the "ExceptionInInitializer" error to be thrown. According to the javadoc:
    is thrown to indicate that an exception occurred during
    evaluation of a static initializer or
    the initializer for a static variable
    Since I didn't see any of your code in your post, I can't help you much more, I'm afraid. Perhaps if you would provide some more details, I may be able to help you some more. I think the following details would be helpful:
    1. Complete error message and stack trace you are getting.
    2. The section of your java code that you think is causing the problem.
    3. Oracle database version you are using.
    Good Luck,
    Avi.

  • Error while executing the stored procedure

    Hi All,
    When I try to execute the store procedure .The store procedure does not have parameter. I am getting the following error. The store procedure has been successfully complied.
    Thanks for all your help.
    uday
    ORA-01422: exact fetch returns more than requested number of rows
    01422. 00000 - "exact fetch returns more than requested number of rows"
    *Cause:    The number specified in exact fetch is less than the rows returned.
    *Action:   Rewrite the query or change number of rows requested                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Hi All,
    Here is the store proc and version. I do not have much exposure to pl sql store proc .
    Thanks for all your support and help.
    uday
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    PL/SQL Release 11.2.0.3.0 - Production
    "CORE     11.2.0.3.0     Production"
    TNS for IBM/AIX RISC System/6000: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production
    Here is the store proc .
    create or replace
    PROCEDURE TEST AS
    R_REGION VARCHAR2(5);
    R_listing2rifs_count number;
    R_listing2rifs number;
    listing2iag_count number; /* mentioned already: rp0428 */
    listing2iag number;
    R_rod2iag_count number;
    R_rod2iagnumber;
    R_rod2ra_count number;
    R_rod2ra number;
    begin
    select Region,
    sum(listing2rifs_count) as listing2rifs_count,
    round((sum(listing2rifs) / sum(listing2rifs_count))/30.4,1) as listing2rifs,
    sum(listing2iag_count) as listing2iag_count,
    round((sum(listing2iag) / sum(listing2iag_count))/30.4,1) as listing2iag,
    sum(rod2iag_count) as rod2iag_count,
    round((sum(rod2iag) / sum(rod2iag_count))/30.4,1) as rod2iag,
    sum(rod2ra_count) as rod2ra_count,
    round((sum(rod2ra) / sum(rod2ra_count))/30.4,1) as rod2ra
    into R_REGION,R_listing2rifs_count,R_listing2rifs,listing2iag_count,listing2iag,
    R_rod2iag_count,R_rod2iag,R_rod2ra_count,R_rod2ra
    from (select site.FK_REF_REGION_CODE Region,
    site.site_id,
    site.EPA_ID,
    site.name site_name,
    FEDERAL_FACILITY_DETER_CODE,
    NPL_STATUS_CODE,
    site.BRAC_TYPE_NAME,
    sis.FT_FLAG,
    listing_action,
    rifs_action,
    iag_action,
    rod_action,
    ra_action,
    listing.ACTUAL_COMPLETION_DATE as listing_date,
    iag.ACTUAL_COMPLETION_DATE as iag_date,
    first_rifs.ACTUAL_START_DATE as first_rifs_start_date,
    first_rod.ACTUAL_COMPLETION_DATE as first_rod_date,
    ra_start.ACTUAL_START_DATE as first_ra_start_date,
    case when first_rifs.ACTUAL_START_DATE is not null
    and listing.ACTUAL_COMPLETION_DATE is not null
    then 1
    else 0
    end as listing2rifs_count,
    first_rifs.ACTUAL_START_DATE - listing.ACTUAL_COMPLETION_DATE as listing2rifs,
    case when first_rifs.ACTUAL_START_DATE is not null
    and listing.ACTUAL_COMPLETION_DATE is not null
    then 1
    else 0
    end as listing2iag_count,
    iag.ACTUAL_COMPLETION_DATE - listing.ACTUAL_COMPLETION_DATE as listing2iag,
    case when first_rifs.ACTUAL_START_DATE is not null
    and listing.ACTUAL_COMPLETION_DATE is not null
    then 1
    else 0
    end as rod2iag_count,
    iag.ACTUAL_COMPLETION_DATE - first_rod.ACTUAL_COMPLETION_DATE as rod2iag,
    case when first_rifs.ACTUAL_START_DATE is not null
    and listing.ACTUAL_COMPLETION_DATE is not null
    then 1
    else 0
    end as rod2ra_count,
    ra_start.ACTUAL_START_DATE - first_rod.ACTUAL_COMPLETION_DATE as rod2ra
    from site
    LEFT OUTER JOIN
    (select fk_site_id,
    SPECIAL_INITIATIVE_CODE as FT_FLAG
    from SPECIAL_INITIATIVE_SITE sppi
    where SPECIAL_INITIATIVE_CODE = 'FT'
    ) SIS
    ON site.site_id = sis.fk_site_id
    LEFT OUTER JOIN
    (select fk_site_id,
    TYPE_SEQUENCE_CODE as listing_action,
    ACTUAL_COMPLETION_DATE
    from action
    where TYPE_CODE = 'NF'
    and (ANOMALY_CODE is null or ANOMALY_CODE not in ('PC','PB','OA','OC','TO','TT'))
    and ACTUAL_COMPLETION_DATE is not null
    and TO_CHAR(action.ACTUAL_COMPLETION_DATE,'YYYYMMDD') || action.TYPE_SEQUENCE_CODE =
    (SELECT min(TO_CHAR(ACTUAL_COMPLETION_DATE,'YYYYMMDD') || B.TYPE_SEQUENCE_CODE)
    from action b
    WHERE ACTION.FK_SITE_ID = b.FK_Site_ID
    and b.TYPE_CODE = 'NF'
    and b.ACTUAL_COMPLETION_DATE is not null
    ) listing
    ON SITE.SITE_ID = LISTING.FK_site_id
    LEFT OUTER JOIN
    (select FK_site_id,
    TYPE_SEQUENCE_CODE as rifs_action,
    ACTUAL_START_DATE,
    ACTUAL_COMPLETION_DATE
    from action
    where TYPE_CODE in ('NH','LW') /*('RI','NA','NH','FS','NK','NI','CO','BD','LW') */
    and LEAD_CODE = 'FF'
    and (ANOMALY_CODE is null or ANOMALY_CODE not in ('PS','PB','OA','OS','TN','TT'))
    and ACTUAL_START_DATE is not null
    and TO_CHAR(action.ACTUAL_START_DATE,'YYYYMMDD') || TYPE_SEQUENCE_CODE =
    (SELECT min(TO_CHAR(ACTUAL_START_DATE,'YYYYMMDD') || B.TYPE_SEQUENCE_CODE)
    from action b
    WHERE ACTION.FK_SITE_ID = b.FK_Site_ID
    and b.TYPE_CODE in ('NH','LW') /*('RI','NA','NH','FS','NK','NI','CO','BD','LW') */
    and b.ACTUAL_START_DATE is not null
    ) first_rifs
    ON site.site_id = first_rifs.FK_site_id
    LEFT OUTER JOIN
    (select FK_site_id,
    TYPE_SEQUENCE_CODE as iag_action,
    ACTUAL_COMPLETION_DATE
    from action
    where TYPE_CODE = 'FI'
    and action.LEAD_CODE = 'FE'
    and (ANOMALY_CODE is null or ANOMALY_CODE not in ('PC','PB','OA','OC','TO','TT'))
    and ACTUAL_COMPLETION_DATE is not null
    and TO_CHAR(action.ACTUAL_COMPLETION_DATE,'YYYYMMDD') || action.TYPE_SEQUENCE_CODE =
    (SELECT min(TO_CHAR(ACTUAL_COMPLETION_DATE,'YYYYMMDD') || B.TYPE_SEQUENCE_CODE)
    from action b
    WHERE ACTION.FK_SITE_ID = b.FK_Site_ID
    and b.TYPE_CODE = 'FI'
    and b.ACTUAL_COMPLETION_DATE is not null
    ) iag
    ON site.site_id = iag.FK_site_id
    LEFT OUTER JOIN
    (select FK_site_id,
    TYPE_SEQUENCE_CODE as rod_action,
    ACTUAL_COMPLETION_DATE
    from action
    where TYPE_CODE = 'RO'
    and (ANOMALY_CODE is null or ANOMALY_CODE not in ('PC','PB','OA','OC','TO','TT'))
    and ACTUAL_COMPLETION_DATE is not null
    and TO_CHAR(action.ACTUAL_COMPLETION_DATE,'YYYYMMDD') || action.TYPE_SEQUENCE_CODE =
    (SELECT min(TO_CHAR(ACTUAL_COMPLETION_DATE,'YYYYMMDD') || B.TYPE_SEQUENCE_CODE)
    from action b
    WHERE ACTION.FK_SITE_ID = b.FK_Site_ID
    and b.TYPE_CODE = 'RO'
    and b.ACTUAL_COMPLETION_DATE is not null
    ) first_rod
    ON site.site_id = first_rod.FK_site_id
    LEFT OUTER JOIN
    (select FK_site_id,
    TYPE_SEQUENCE_CODE as ra_action,
    ACTUAL_START_DATE
    from action
    where TYPE_CODE = 'LY'
    and (ANOMALY_CODE is null or ANOMALY_CODE not in ('PS','PB','OA','OS','TN','TT'))
    and ACTUAL_START_DATE is not null
    and TO_CHAR(action.ACTUAL_START_DATE,'YYYYMMDD') || action.TYPE_SEQUENCE_CODE =
    (SELECT min(TO_CHAR(ACTUAL_START_DATE,'YYYYMMDD') || B.TYPE_SEQUENCE_CODE)
    from action b
    WHERE ACTION.FK_SITE_ID = b.FK_Site_ID
    and b.TYPE_CODE = 'LY'
    and b.ACTUAL_START_DATE is not null
    ) ra_start
    ON site.site_id = ra_start.FK_site_id
    WHERE site.FEDERAL_FACILITY_DETER_CODE = 'Y'
    and site.NPL_STATUS_CODE in (/*'P',*/'F','D','A')
    ) durations
    group by Region
    order by 1;
    end;
    errors:
    ORA-01422: exact fetch returns more than requested number of rows
    01422. 00000 - "exact fetch returns more than requested number of rows"
    *Cause: The number specified in exact fetch is less than the rows returned.
    *Action: Rewrite the query or change number of rows requested                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Error ORA-04031 while executing a stored procedure from Pro C++ code

    I am getting the error ORA-04031(Unable to allocate 4096 bytes of shared memory("Shared Pool",.....)) while trying to execute a stored procedure from my pro*C application. This happens only after a few hours since the application has been running. I am closing the cursor after every database call.
    Does anyone know why it is happening and any possible solutions?
    TIA
    Srithaj.

    One thing that can be done is to flush the shared pool before starting the application.
    alter system flush shared pool;
    Another is to increase the shared pool size by setting the parameter shared_pool_size in init_sid.ora file.
    null

  • Geeting TIMEOUT while executing a Stored Procedure.

    Hi Gurus,
    Am facing a TimeOut  issue while executing the Sql Stored Procedure.
    I have changed a settings of Execution TimeOut to Zero (which is unlimited ), Am still unable to execute the Stored Procedure.
    Should i have to add any TimeOut Command in my Sql Stored Procedure. If please suggest me.
    Thanks in advance.

    Time out is the client who throws the error  not SQL Server. Please read Erland's article
    http://www.sommarskog.se/query-plan-mysteries.html
    Are you sure there is blocking/locking? Is that possible someone run BEGIN TRAN and did not properly specify COMMIT TRAN?
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • Error while calling a stored procedure using SQLJ

    I am calling a stored procedure defined inside a package through a SQLJ script. The first parameter of that procedure is a IN OUT parameter which is used as a ROWID for creating a cursor. That ROWID value is the same for every record in the table, thereby enabling us to create a cursor.
    When I give a hard-coded value as a parameter, I get an error stating that the assignment is not correct as the query is expecting a variable and not a literal. Hence I removed the hard-coded value and included a dymanic value in the SQLJ call.
    String strVal = "A";
    #sql{CALL ASSIGNMENTS_PKG.INSERT_ROW :{strVal},'SALARY_CODE_GROUP','BU',3,105,sysdate,1,sysdate,1,1)};
    Here "ASSIGNMENTS_PKG" is a package name and INSERT_ROW is the procedure.
    When the SQLJ program is run, I get an error stating:
    "PLS-00201: identifier 'A' must be declared"
    I read the error message, but I am not able to understand where I need to give the GRANT permission to.

    If you're using Oracle Provider for OLE DB (OraOLEDB) to execute this stored procedure, you need to set PLSQLRSet attribute. This attribute can be set in registry, connection string, or command object. Please refer to User Documentation for more information.

  • Error while calling a stored procedure with OUT parameter.

    Hi,
    I am trying to call a Stored Procedure(SP) with an OUT parameter(Ref Cursor) from a third party tool. It is called using OLE-DB Data provider. In one database the procedure works fine but when I change the database the procedure call is giving following error.
    Distribution Object:     COM Error. COM Source: OraOLEDB. COM Error message: IDispatch error #3092. COM Description: ORA-06550: line 1, column 7:
         PLS-00306: wrong number or types of arguments in call to 'TEST1'
         ORA-06550: line 1, column 7:
         PL/SQL: Statement ignored.
    I am not able to find as to why is this happening. Please let me know any clues /help to solve this problem.
    Thanks in advance.

    If you're using Oracle Provider for OLE DB (OraOLEDB) to execute this stored procedure, you need to set PLSQLRSet attribute. This attribute can be set in registry, connection string, or command object. Please refer to User Documentation for more information.

  • While executing java stored procedure i got an error

    I have used this command to load java source into data base
    loadjava -user ENCORA/ENCORA C:\framework\Packages\testdevelopement\HOST.java
    but while executing i got an error.
    SQL> create or replace function run_cmd(p_cmd in varchar2) return number
    2 as
    3 language java
    4 name 'HOST.RunThis(java.lang.String[]) return integer';
    5 /
    Function created.
    SQL> create or replace procedure RC(p_cmd in varchar2)
    2 as
    3 x number;
    4 begin
    5 x := run_cmd(p_cmd);
    6 end;
    7 /
    Procedure created.
    SQL> set serveroutput on size 1000000
    SQL> exec dbms_java.set_output(1000000)
    PL/SQL procedure successfully completed.
    SQL> exec rc('/usr/bin/ps -ef');
    BEGIN rc('/usr/bin/ps -ef'); END;
    ERROR at line 1:
    ORA-29540: class HOST does not exist
    ORA-06512: at "ENCORA.RUN_CMD", line 0
    ORA-06512: at "ENCORA.RC", line 5
    ORA-06512: at line 1
    can any one suggest me how can i resolve this problem?

    Hi Uday,
    My guess is that there is a problem with your java stored procedure that is causing the "ExceptionInInitializer" error to be thrown. According to the javadoc:
    is thrown to indicate that an exception occurred during
    evaluation of a static initializer or
    the initializer for a static variable
    Since I didn't see any of your code in your post, I can't help you much more, I'm afraid. Perhaps if you would provide some more details, I may be able to help you some more. I think the following details would be helpful:
    1. Complete error message and stack trace you are getting.
    2. The section of your java code that you think is causing the problem.
    3. Oracle database version you are using.
    Good Luck,
    Avi.

  • ORA-03111 - JCA Binding error while invoking a stored procedure in DB

    Hi,
    We are facing this problem for one interface alone.
    Need expert advice to fix this problem..
    This is scheduled to run once in a day and fails daily for past 2 weeks..
    We receive below error as response..
    Same interface worked fine for past 1 yr..
    Also it works fine if we reprocess the batch in next day morning...
    Exception occured when binding was invoked. Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'DB_Legacy_To_EBS_Invoice_Conversion' failed due to: Stored procedure invocation error. Error while trying to prepare and execute the IRSOA.AR_SOA_INVOICE.TRN_GET_CUST_INV_RAW_TO_STAGE API. An error occurred while preparing and executing the IRSOA.AR_SOA_INVOICE.TRN_GET_CUST_INV_RAW_TO_STAGE API. Cause: java.sql.SQLException: ORA-03111: break received on communication channel ". The invoked JCA adapter raised a resource exception. Please examine the above error message carefully to determine a resolution.
    AND
    Exception occured when binding was invoked. Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'DB_Legacy_To_EBS_Invoice_Conversion' failed due to: Stored procedure invocation error. Error while trying to prepare and execute the IRSOA.AR_SOA_INVOICE.TRN_GET_CUST_INV_RAW_TO_STAGE API. An error occurred while preparing and executing the IRSOA.AR_SOA_INVOICE.TRN_GET_CUST_INV_RAW_TO_STAGE API. Cause: java.sql.SQLException: ORA-01013: user requested cancel of current operation ORA-06512: at "IRSOA.XXIR_AR_SOA_CUSTOMER_INVOICE", line 213 ORA-06512: at line 1 ". The invoked JCA adapter raised a resource exception. Please examine the above error message carefully to determine a resolution
    Thanks,
    Sundaram

    Looks like the SQL might be taking a longer time to execute and might be timing out.
    Please refer the following:
    Re: ORA-01013: user requested cancel of current operation
    http://www.dba-oracle.com/t_ora_01013_user_requested_cancel_of_current_operation.htm
    Additionally, ORA-06512 indicates that there is a mismatch of the with the data length that is being processed. Refer http://www.techonthenet.com/oracle/errors/ora06512.php
    Hope this helps.
    Thanks,
    Patrick

  • Error while running a stored procedure in SBO

    Hi all,
    i have a stored procedure that i run in my sbo.  When i run the stored procedure i get the following error :
    1). [Microsoft][SQL Server Native Client 10.0][SQL Server]Warning: Null value is eliminated by an aggregate or other SET operation.
    'Servicecontracten' (OCTR)    05/10/2011  18:03:36  -1
    i launch my sp like this :
    exec [spu_DS_HistProjektUserVeldenViewBetalingen]  (i pass no parameters while testing.  i put them fix in my sp)
    my stored procedure looks like this :
    USE [def1]
    GO
    /****** Object:  StoredProcedure [dbo].[spu_DS_HistProjektUserVeldenViewBetalingen]    Script Date: 10/05/2011 18:03:05 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    -- Batch submitted through debugger: SQLQuery2.sql|8|0|C:\Users\kvanhauwaert\AppData\Local\Temp\~vs2A98.sql
    ALTER PROCEDURE [dbo].[spu_DS_HistProjektUserVeldenViewBetalingen]
              /* @project_number varchar(20),
              @billperiod_type varchar(10) */
    AS
    BEGIN
         SELECT isnull(lijnnr,0) as lijnnr, isnull(fase,'') as fase, isnull(factuurbedrag,0) as factuurbedrag,
         isnull(billperiod_type,'') as billperiod_type
         INTO #tempDS_HistProjektUserVeldenViewBetalingen
         FROM DS_HistProjektUserVeldenViewBetalingen t1
         WHERE project_number = '08053A'
         SELECT  isnull(lijnnr,0) as lijnnr, isnull(fase,'') as fase , isnull(factuurbedrag,0) as factuurbedrag,
              (select sum(isnull(factuurbedrag,0)) from #tempDS_HistProjektUserVeldenViewBetalingen where lijnnr <= t1.lijnnr) as lijntotaal,
              (select sum(isnull(factuurbedrag,0)) from #tempDS_HistProjektUserVeldenViewBetalingen where lijnnr <= t1.lijnNr and billperiod_type = '110-01' ) as lijntotaalKetting
         FROM #tempDS_HistProjektUserVeldenViewBetalingen t1
         WHERE fase,'') is not null
         ORDER BY t1.fase
         DROP TABLE #tempDS_HistProjektUserVeldenViewBetalingen
    END
    GO
    Somebody has a clue what i'm doing wrong ?
    thnx

    Thanks Gordon for your reply.
    i've changed my sp to :
    USE [def1]
    GO
    /****** Object:  StoredProcedure [dbo].[spu_DS_HistProjektUserVeldenViewBetalingen]    Script Date: 10/05/2011 18:56:34 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    -- Batch submitted through debugger: SQLQuery2.sql|8|0|C:\Users\kvanhauwaert\AppData\Local\Temp\~vs2A98.sql
    CREATE PROCEDURE [dbo].[spu_DS_HistProjektUserVeldenViewBetalingen]
              /* @project_number varchar(20),
              @billperiod_type varchar(10) */
    AS
    BEGIN
         SELECT isnull(lijnnr,0) as lijnnr, isnull(fase,'') as fase, isnull(factuurbedrag,0) as factuurbedrag,
         isnull(billperiod_type,'') as billperiod_type
         INTO #tempDS_HistProjektUserVeldenViewBetalingen
         FROM DS_HistProjektUserVeldenViewBetalingen t1
         WHERE isnull(project_number,'') = '08053A'
         SELECT  isnull(lijnnr,0) as lijnnr, isnull(fase,'') as fase , isnull(factuurbedrag,0) as factuurbedrag,
              (select sum(isnull(factuurbedrag,0)) from #tempDS_HistProjektUserVeldenViewBetalingen where isnull(lijnnr,0) <= isnull(t1.lijnnr,0)) as lijntotaal,
              (select sum(isnull(factuurbedrag,0)) from #tempDS_HistProjektUserVeldenViewBetalingen where isnull(lijnnr,0) <= isnull(t1.lijnNr,0) and isnull(billperiod_type,'') = '110-01' ) as lijntotaalKetting
         FROM #tempDS_HistProjektUserVeldenViewBetalingen t1
         WHERE isnull(fase,'') <> ''
         ORDER BY t1.fase
         DROP TABLE #tempDS_HistProjektUserVeldenViewBetalingen
    END
    GO
    but that didn't solved my problem.  Any other idea's ?
    kind regards.
    Kurt

  • I am getting ORA-01403: no data found error while calling a stored procedur

    Hi, I have a stored procedure. When I execute it from Toad it is successfull.
    But when I call that from my java function it gives me ORA-01403: no data found error -
    My code is like this -
    SELECT COUNT(*) INTO L_N_CNT FROM TLSI_SI_MAST WHERE UPPER(CUST_CD) =UPPER(R_V_CUST_CD) AND
    UPPER(ACCT_CD)=UPPER(R_V_ACCT_CD) AND UPPER(CNSGE_CD)=UPPER(R_V_CNSGE_CD) AND
    UPPER(FINALDEST_CD)=UPPER(R_V_FINALDEST_CD) AND     UPPER(TPT_TYPE)=UPPER(R_V_TPT_TYPE);
         IF L_N_CNT >0 THEN
              DBMS_OUTPUT.PUT_LINE('ERROR -DUPlicate SI-1');
              SP_SEL_ERR_MSG(5,R_V_ERROR_MSG);
              RETURN;
         ELSE
              DBMS_OUTPUT.PUT_LINE('BEFORE-INSERT');
              INSERT INTO TLSI_SI_MAST
                   (     CUST_CD, ACCT_CD, CNSGE_CD, FINALDEST_CD, TPT_TYPE,
                        ACCT_NM, CUST_NM,CNSGE_NM, CNSGE_ADDR1, CNSGE_ADDR2,CNSGE_ADDR3,
                        CNSGE_ADDR4, CNSGE_ATTN, EFFECTIVE_DT, MAINT_DT,
                        POD_CD, DELVY_PL_CD, TRANSSHIP,PARTSHIPMT, FREIGHT,
                        PREPAID_BY, COLLECT_BY, BL_REMARK1, BL_REMARK2,
                        MCC_IND, NOMINATION, NOTIFY_P1_NM,NOTIFY_P1_ATTN , NOTIFY_P1_ADDR1,
                        NOTIFY_P1_ADDR2, NOTIFY_P1_ADDR3, NOTIFY_P1_ADDR4,NOTIFY_P2_NM,NOTIFY_P2_ATTN ,
                        NOTIFY_P2_ADDR1,NOTIFY_P2_ADDR2, NOTIFY_P2_ADDR3, NOTIFY_P2_ADDR4,
                        NOTIFY_P3_NM,NOTIFY_P3_ATTN , NOTIFY_P3_ADDR1,NOTIFY_P3_ADDR2, NOTIFY_P3_ADDR3,
                        NOTIFY_P3_ADDR4,CREATION_DT, ACCT_ATTN, SCC_IND, CREAT_BY, MAINT_BY
                        VALUES(     R_V_CUST_CD,R_V_ACCT_CD,R_V_CNSGE_CD,R_V_FINALDEST_CD,R_V_TPT_TYPE,
                        R_V_ACCT_NM,R_V_CUST_NM ,R_V_CNSGE_NM, R_V_CNSGE_ADDR1,R_V_CNSGE_ADDR2, R_V_CNSGE_ADDR3,
                        R_V_CNSGE_ADDR4,R_V_CNSGE_ATTN,     R_V_EFFECTIVE_DT ,SYSDATE, R_V_POD_CD,R_V_DELVY_PL_CD,R_V_TRANSSHIP ,R_V_PARTSHIPMT , R_V_FREIGHT,
                        R_V_PREPAID_BY ,R_V_COLLECT_BY ,R_V_BL_REMARK1 ,R_V_BL_REMARK2,R_V_MCC_IND,
                        R_V_NOMINATION,R_V_NOTIFY_P1_NM, R_V_NOTIFY_P1_ATTN, R_V_NOTIFY_P1_ADD1, R_V_NOTIFY_P1_ADD2,
                        R_V_NOTIFY_P1_ADD3, R_V_NOTIFY_P1_ADD4, R_V_NOTIFY_P2_NM, R_V_NOTIFY_P2_ATTN, R_V_NOTIFY_P2_ADD1,
                        R_V_NOTIFY_P2_ADD2, R_V_NOTIFY_P2_ADD3, R_V_NOTIFY_P2_ADD4, R_V_NOTIFY_P3_NM, R_V_NOTIFY_P3_ATTN,
                        R_V_NOTIFY_P3_ADD1, R_V_NOTIFY_P3_ADD2, R_V_NOTIFY_P3_ADD3, R_V_NOTIFY_P3_ADD4,
                        SYSDATE,R_V_ACCT_ATTN,R_V_SCC_IND,R_V_USER_ID,R_V_USER_ID
                        DBMS_OUTPUT.PUT_LINE(' SI - REC -INSERTED');
         END IF;

    Hi,
    I think there is a part of the stored procedure you did not displayed in your post. I think your issue is probably due to a parsed value from java. For example when calling a procedure from java and the data type from java is different than expected by the procedure the ORA-01403 could be encountered. Can you please show the exact construction of the call of the procedure from within java and also how the procedure possible is provided with an input parameter.
    Regards, Gerwin

Maybe you are looking for

  • Reversed Receipt Handling in CE Open Interface

    Oracle Support has stated that in 11.0.3, it is not possible to interface reversed receipts (NSF, etc.) from an external system through the reconciliation open interface. Does anyone know if there are plans to enable this functionality, as cash manag

  • Serial numbers for subcontracting process

    Hello Experts, We are using SAP ECC 6.0 and trying to implement the subcontracting process with serial numbers. This scenario is focused on those materials that we need to keep track on how many times it has gone to repair (for example, a motor) by s

  • How do I upload a PDF file?

    How do i upload a PDF file please? I have to convert to a Word document and urgently need assistance. Thank you!

  • Trying to use signal in and signal out but couldn't pass parameters

    Hi all,            I am trying to use Signal out from 1st iview and trying to get the same parameters to the second iview where this iview gets populated when i click a button in result of first iview. I have created these two iviews in same model an

  • Roll out of parent child hierarchy

    Hello There is a parent-child hierarchy of the structure below : A01    A11 A01    A21 A11    A111 A11    A112 A21    A121 A121  A1211 I need to convert it into hierarchy of the following structure 01              A01 0101          A11 0102