ORABPEL-11809 - call a stored procedure - error in OUT parameter

Hi all.
I have a problem in a BPEL process that calls a stored procedure.
I create a Partner Link that calls a stored procedure in the database. That procedure returns a type that is a table (is defined as a type of the database).
When I deploy the process I have the following error:
<messages>
- <input>
- <WC01_Pesquisa_Ut_InputVariable>
- <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="InputParameters">
- <InputParameters xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/IGIF/WC01/PESQUISA_UT/">
<P_NIR xmlns="">
165968274
</P_NIR>
<P_NOME_COMPLETO xmlns="">
carla diogo
</P_NOME_COMPLETO>
<P_SEXO xmlns="">
Feminino
</P_SEXO>
<P_DATA_NASC xmlns="">
2007-03-01
</P_DATA_NASC>
<P_NATURALIDADE xmlns=""/>
</InputParameters>
</part>
</WC01_Pesquisa_Ut_InputVariable>
</input>
- <fault>
- <remoteFault xmlns="http://schemas.oracle.com/bpel/extension">
- <part name="code">
<code>
17002
</code>
</part>
- <part name="summary">
<summary>
file:/oracle/product/10.1.3/SOA/Integration10131/bpel/domains/default/tmp/.bpel_SaudeIdentificarCidadao_5.0_e3768f57d137443e1ba52d4a6d809426.tmp/WC01_Pesquisa_Ut.wsdl [ WC01_Pesquisa_Ut_ptt::WC01_Pesquisa_Ut(InputParameters,OutputParameters) ] - WSIF JCA Execute of operation 'WC01_Pesquisa_Ut' failed due to: Error registering an out parameter.
An error occurred when registering parameter PESQUISA_UT as an out parameter of the IGIF.WC01.PESQUISA_UT API. Cause: java.sql.SQLException: Io exception: Connection reset [Caused by: Io exception: Connection reset]
; nested exception is:
     ORABPEL-11809
Error registering an out parameter.
An error occurred when registering parameter PESQUISA_UT as an out parameter of the IGIF.WC01.PESQUISA_UT API. Cause: java.sql.SQLException: Io exception: Connection reset [Caused by: Io exception: Connection reset]
Check to ensure that the parameter is a valid IN/OUT or OUT parameter of the API. Contact oracle support if error is not fixable.
</summary>
</part>
- <part name="detail">
<detail>
Internal Exception: java.sql.SQLException: Io exception: Connection resetError Code: 17002
</detail>
</part>
</remoteFault>
</fault>
</messages>
The code of the XSD created when I create the partner link is:
<schema targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/db/IGIF/WC01/PESQUISA_UT/" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:db="http://xmlns.oracle.com/pcbpel/adapter/db/IGIF/WC01/PESQUISA_UT/"
elementFormDefault="unqualified" attributeFormDefault="unqualified">
<element name="InputParameters">
<complexType>
<sequence>
<element name="P_NIR" type="decimal" db:index="1" db:type="NUMBER" minOccurs="0" nillable="true"/>
<element name="P_NOME_COMPLETO" type="string" db:index="2" db:type="VARCHAR2" minOccurs="0" nillable="true"/>
<element name="P_SEXO" type="string" db:index="3" db:type="VARCHAR2" minOccurs="0" nillable="true"/>
<element name="P_DATA_NASC" type="dateTime" db:index="4" db:type="DATE" minOccurs="0" nillable="true"/>
<element name="P_NATURALIDADE" type="string" db:index="5" db:type="VARCHAR2" minOccurs="0" nillable="true"/>
</sequence>
</complexType>
</element>
<element name="OutputParameters">
<complexType>
<sequence>
<element name="PESQUISA_UT" type="db:TABELA_DE_IDS" db:index="0" db:type="Array" minOccurs="0" nillable="true"/>
</sequence>
</complexType>
</element>
<complexType name="TABELA_DE_IDS">
<sequence>
<element name="PESQUISA_UT_ITEM" type="decimal" db:type="NUMBER" minOccurs="0" maxOccurs="unbounded" nillable="true"/>
</sequence>
</complexType>
</schema>
Any ideia?
Thanks in advance.
Carla

I'd suggest that you turn on xml validation on the bpel boundaries to make sure that the xml being passed to the adapter is valid. You do this by logging in to bpel console, go to Manage Domain, at the bottom of the Configuration tab, set validateXml to true.
Then see if it is an xml validation issue - in which case you will have to fix your maps to make sure it is valid indeed.
Assuming your XML is valid and you are still seeing this error, couple of follow up questions:
- are you using synonyms ?
-- note that synonyms are not supported completely by the adapter at this time.
- could you spell out where your types/sp-pkg resides and what are you connecting as at runtime ?
-- just to keep things simple enough to debug, i'd do everything as just one user and slowly go to a scheme that you desire.
HTH

Similar Messages

  • How to call a stored procedure which has out parameter value

    my code is
    public Connection createConnection() {
                   Connection conn = null;
                        try {
                             Class.forName(DRIVER);
                             conn = DriverManager.getConnection(URL,USER,PASS);
                        } catch (ClassNotFoundException cnfe) {
                             System.err.print("Class not found");
                        } catch (SQLException sqle) {
                             System.err.print("SQLException");
                   return conn;
         public static void main(String args[]){
              StroedProcedure stp = new StroedProcedure();
              Connection con = stp.createConnection();
              try {
                   CallableStatement stproc_stmt = con.prepareCall("{call Account_Summary(?,?,?,?,?,?,?,?)}");
                   stproc_stmt.setString(1, "123456");
                   stproc_stmt.setDate(2, null);
                   stproc_stmt.setString(3, null);
                   stproc_stmt.setString(4, null);
                   stproc_stmt.setString(5, null);
                   stproc_stmt.setString(6, null);
                   stproc_stmt.setDate(7, null);
                   stproc_stmt.setDate(8, null);
                   stproc_stmt.registerOutParameter(1,Types.CHAR);
                   stproc_stmt.registerOutParameter(2,Types.DATE);
                   stproc_stmt.registerOutParameter(3,Types.CHAR);
                   stproc_stmt.registerOutParameter(4,Types.CHAR);
                   stproc_stmt.registerOutParameter(5,Types.CHAR);
                   stproc_stmt.registerOutParameter(6,Types.CHAR);
                   stproc_stmt.registerOutParameter(7,Types.DATE);
                   stproc_stmt.registerOutParameter(8,Types.DATE);
                   stproc_stmt.execute();
                   System.out.println("test "+stproc_stmt.getString(1));
                   ResultSet rs = stproc_stmt.executeQuery();
                  while (rs.next()){
                       System.out.println("result "+rs.getString("ACCPK"));
              } catch (SQLException e) {
                        e.printStackTrace();
         }And the stored procedure is
    CREATE OR REPLACE
    procedure Account_Summary (accpk in out char, incdt out date, bcur out char, bmark out char, tarTE out char, numHold out char, stDt out date, AsDt out date)
    is
    begin
    select account_pk, inception_date, base_currency, benchmark  into accpk, incdt, bcur, bmark
    from account a
    where a.Account_pk=accpk;
    select target_te, number_holdings, start_date, as_date into tarTE, numHold, StDt, AsDt
    from acc_summary asum
    where asum.account_pk=accpk;
    end Account_Summary;but it gives a exception ORA-01460: unimplemented or unreasonable conversion requested
    ORA-06512: at "REPRO.ACCOUNT_SUMMARY", line 4
    ORA-06512: at line 1
    i want to execute a stored procedure which has in , inout or out parameter
    but it can not work

    ========================
    In some contects varchar2 variable limit is 32512 characters... October 16, 2003
    Reviewer: Piotr Jarmuz from Poznan, Poland
    Interesting to note is the fact that varchar2 variables as parameters to stored
    procedures (in in/out out) may be "only" 32512 bytes long.
    I've checked this in Java and Perl. 32512 is the last value that works, for any
    bigger it throws:
    Exception in thread "main" java.sql.SQLException: ORA-01460: unimplemented or
    unreasonable conversion requested
    But in PL/SQL as you said 32767
    Regards,
    Piotr
    =================================
    This i got it from ask tom, well it make sense.... try checking your input with small numbers and strings
    Have fun

  • Calling a stored procedure with an XmlType parameter.

    I am attempting to execute a stored function via a named query. The stored procedure has a single parameter of Oracles 'xmltype', and also returns an xmltype. For example this dummy function
    function testXML(xml_in xmltype) return xmltype is
    begin
    return xml_in;
    end;
    Is it possible to make the named query call with an oracle.xdb.XMLType or oracle.xdb.dom.XDBDocument? I cannot find any examples of this being done. I also want the returning xmltype to be converted into a Java class.
    Another question - will I need to work with a conversion manager to achieve this?

    Local Exception Stack:
    Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: Invalid column typeError Code: 17004
    Call:BEGIN ? := TestPackage.testXML(XML_IN=>?); END;
         bind => [=> RESULT, oracle.xml.parser.v2.XMLDocument@1a64732 => XML_IN]
    Query:DataReadQuery()
         at oracle.toplink.exceptions.DatabaseException.sqlException(DatabaseException.java:290)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:570)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:442)
         at oracle.toplink.threetier.ServerSession.executeCall(ServerSession.java:453)
         at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:117)
         at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:103)
         at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeSelectCall(DatasourceCallQueryMechanism.java:174)
         at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeSelect(DatasourceCallQueryMechanism.java:156)
         at oracle.toplink.queryframework.DataReadQuery.executeNonCursor(DataReadQuery.java:118)
         at oracle.toplink.queryframework.DataReadQuery.executeDatabaseQuery(DataReadQuery.java:110)
         at oracle.toplink.queryframework.DatabaseQuery.execute(DatabaseQuery.java:603)

  • How to execute a stored procedure with an out parameter ?

    Guys I am struggling with executing a stored procedure from sql plus.I mean my stored procedure has 2 input parameter and 1 out put parameter (status of the execution).
    MY_PROCEDURE(p_name in varchar2,p_age in number,p_status out varchar2)
    end my_procedure;
    When I say
    EXECUTE MY_PROCEDURE('manohar','Shetty');
    i get insufficient parameters errors.
    please help.

    EXECUTE isn't a valid PL/SQL construct. It's a SQL*Plus command. You don't want to put any SQL*Plus commands in a PL/SQL block.
    You can always execute a stored procedure purely through PL/SQL
    begin
      my_stored_procedure( x, y, z );
    end;SQL*Plus happens to give you the execute command so you can avoid the begin and end statements.
    Justin

  • SSRS Calling a Stored Procedure error : PLS-00306: wrong number or types of arg...

    Hi,
    My Problem is when im adding dataset with stored procedure, im getting this error.
    I Can access database, 
    Could not create a list of fields for the query. Verify that you can connect to the data source and that your query syntax is correct.
    ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'PROCEDURE_NAME' ORA-06550: line 1, column 7: PL/SQL:
    Statement ignored
    stored procedure is simple select :
    CREATE OR REPLACE PROCEDURE [PROCEDURE_NAME](L_CURSOR out SYS_REFCURSOR)
    is
    Begin
    open L_CURSOR for
    SELECT [columnname] FROM
    [tablename]
    End;
    Configuration Details:
    DB: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64biOracle Developer Tools for Visual Studio Copyright (c) 2005,2014 SQL Server Data Tools Type: Oracle , Data Provider : .Net Framework Data Provider For Oracle

    The answer is of inside question. It is about provider. Change my provider ODTwithODAC for 10g (my database version). And problem resolved.
    Thank you for your helps,
    Regards,
    Arda

  • How to call a oracle procedure with in/out parameter frm unix shell script?

    Hi,
    I need to call an oracle stored procedure from unix script. The procedure has 1 input parameter and 2 output parameter. Please send me the syntax for the same. Based on the output values of procedure, I have to execute some more commands in unix script.
    Thanks and regards
    A

    An example :
    TEST@db102 SQL> select ename, job from emp
      2  where empno = 7902;
    ENAME      JOB
    FORD       ANALYST
    TEST@db102 SQL> create or replace procedure show_emp (
      2     v_empno in      number,
      3     v_ename out     varchar2,
      4     v_job   out     varchar2 )
      5  is
      6  begin
      7     select ename, job into v_ename, v_job
      8     from emp
      9     where empno = v_empno;
    10  end;
    TEST@db102 SQL> /
    Procedure created.
    TEST@db102 SQL> exit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    [ora102 work db102]$ IN=7902
    [ora102 work db102]$ set `sqlplus -s test/test@db102 << !
    var out1 varchar2(30);
    var out2 varchar2(30);
    set pages 0
    set feed off
    exec show_emp($IN,:out1,:out2);
    print
    exit
    `[ora102 work db102]$ echo $1 $2
    FORD ANALYST
    [ora102 work db102]$                           

  • MSSQL Stored Procedure has duplicate OUT parameter

    Hi All;
    I am using the WLS MSSQL jdbc driver (mssqlserver4v70rel510sp8) for wls
    5.1 sp 12. The following code generates a duplicate OUT parameter.
    Parameters 4 and 5 are duplicated. I went over the stored procedure in
    ISQL, and the problem is not occurring there. Has anyone seen this sort of
    problem? I noticed this problem does not occur when I have the "?=" in
    front.
    stmt = con.prepareCall("{ ?= call webactivate..ValidatePromoCode(?, ?,
    stmt.registerOutParameter(1, java.sql.Types.INTEGER);
    stmt.setString(2, marketingCode);
    stmt.setString(3, activationData.getRawServiceNumber());
    stmt.registerOutParameter(4, java.sql.Types.VARCHAR);
    stmt.registerOutParameter(5, java.sql.Types.INTEGER);
    stmt.registerOutParameter(6, java.sql.Types.INTEGER);
    stmt.execute();
    Log.putDebug("#1="+stmt.getString(1));
    Log.putDebug("#4="+stmt.getString(4));
    Log.putDebug("#5="+stmt.getString(5));
    Log.putDebug("#6="+stmt.getString(6));
    Paul Rowe

    Thanks Joseph. I was hoping you would get back to me on this. You are the
    king of this newsgroup. Here's what I got, which indicates some type of
    problem on my end:
    Update count = 1
    Update count = 1
    Update count = 1
    Update count = 1
    Update count = 1
    Output status: 4
    Output param 1: 4
    Output param 2: marketingCode activationData.getRawServiceNumber()
    Output param 3: 2
    "Joseph Weinstein" <[email protected]> wrote in message
    news:[email protected]...
    Paul Rowe wrote:
    Hi All;
    I am using the WLS MSSQL jdbc driver (mssqlserver4v70rel510sp8) for
    wls
    5.1 sp 12. The following code generates a duplicate OUT parameter.
    Parameters 4 and 5 are duplicated. I went over the stored procedure in
    ISQL, and the problem is not occurring there. Has anyone seen this sortof
    problem? I noticed this problem does not occur when I have the "?=" in
    front.Hi Paul. Please run this sample program below with the driver you have,and
    let me know the output. it works with the latest driver I have. I get:
    C:\joe\70bugs>java foo
    Update count = 1
    Output status: 4
    Output param 1: marketingCode activationData.getRawServiceNumber()
    Output param 2: 2
    Output param 3: 3
    The code:
    import java.sql.*;
    import java.util.*;
    class foo {
    public static void main(String[] args) throws Exception
    Properties props = new Properties();
    props.put("user", "sa");
    props.put("password", "");
    props.put("server", "natoma");
    try {
    Driver myDriver = (Driver)
    Class.forName("weblogic.jdbc.mssqlserver4.Driver").newInstance();
    Connection con = myDriver.connect("jdbc:weblogic:mssqlserver4",props);
    >
    String proc = "create proc foojoe @bar varchar(60), @qwevarchar(60), "
    + " @asd varchar(60) output, @zxc int output, @ert intoutput "
    + " as select @asd = @bar + @qwe select @zxc = 2 select@ert = 3 "
    + " return 4";
    Statement s = con.createStatement();
    try { s.executeUpdate("drop proc foojoe"); } catch (Exceptionignore){}
    s.executeUpdate(proc);
    CallableStatement stmt = con.prepareCall("{ ?= callfoojoe(?,?,?,?,?) }");
    stmt.registerOutParameter(1, java.sql.Types.INTEGER);
    stmt.setString(2, "marketingCode");
    stmt.setString(3, " activationData.getRawServiceNumber()");
    stmt.registerOutParameter(4, java.sql.Types.VARCHAR);
    stmt.registerOutParameter(5, java.sql.Types.INTEGER);
    stmt.registerOutParameter(6, java.sql.Types.INTEGER);
    stmt.execute();
    while (true) // how to handle any callable statement...
    ResultSet rs = stmt.getResultSet();
    int updateCount = stmt.getUpdateCount();
    // If there are no more results or counts, we're done.
    if (rs == null && updateCount == -1)
    break;
    // Check to see if there is a ResultSet
    if (rs != null) {
    while (rs.next()) {
    System.out.println("Get first resultset col by id:" +rs.getString(1));
    rs.close();
    } // Otherwise, there will be an update count
    else {
    System.out.println("Update count = " + updateCount);
    stmt.getMoreResults();
    // Best to retrieve status and output parameters
    // after all result sets and update counts have been retrieved.
    System.out.println( "Output status: " + stmt.getInt(1));
    System.out.println( "Output param 1: " + stmt.getString(4));
    System.out.println( "Output param 2: " + stmt.getString(5));
    System.out.println( "Output param 3: " + stmt.getString(6));
    catch(Exception e) { e.printStackTrace(); }

  • Stored Procedure with in out parameter of table of records type

    Hi
    I am tring to create a strore procedure inside a package like this:
    procedure name_p(root in table.column%type, tab in out table_of_records_type);
    I get the error:
    PLS-00306: Wrong number or types of arguments in call to 'name_p'
    I am working with oracle 8.1.7.
    I dont really understand why this is happening.
    Can anyone suggest anything.
    Thnx
    Ed

    An example :
    TEST@db102 SQL> select ename, job from emp
      2  where empno = 7902;
    ENAME      JOB
    FORD       ANALYST
    TEST@db102 SQL> create or replace procedure show_emp (
      2     v_empno in      number,
      3     v_ename out     varchar2,
      4     v_job   out     varchar2 )
      5  is
      6  begin
      7     select ename, job into v_ename, v_job
      8     from emp
      9     where empno = v_empno;
    10  end;
    TEST@db102 SQL> /
    Procedure created.
    TEST@db102 SQL> exit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    [ora102 work db102]$ IN=7902
    [ora102 work db102]$ set `sqlplus -s test/test@db102 << !
    var out1 varchar2(30);
    var out2 varchar2(30);
    set pages 0
    set feed off
    exec show_emp($IN,:out1,:out2);
    print
    exit
    `[ora102 work db102]$ echo $1 $2
    FORD ANALYST
    [ora102 work db102]$                           

  • Ssrs 2008 r2 report dataset call a stored procedure

    I am modifying an existing SSRS 2008 r2 report. In a dataset that already exists within the ssrs 2008 r2 report I need execute
    a stored procedure called StudentData and pass 3 parameter values to the stored procedure. The stored procedure will then return 5 values that are now needed for the modified ssrs report. My problem is I do not know how to have the dataset call the stored procedure
    with the 3 parameter values and pass back the 5 different unique data values that I am looking for.
    The basic dataset is the following:
    SELECT  SchoolNumber,
            SchoolName,
            StudentNumber,      
     from [Trans].[dbo].[Student]
     order by SchoolNumber,
              SchoolName,
              StudentNumber
    I basically want to pass the 3 parameters of SchoolNumber, SchoolName, and StudentNumber to the
    stored procedure called StudentData from the data I obtain from the [Trans].[dbo].[Student]. The 3 parameter values will be obtained from the sql listed above.
    The  columns that I need from the stored procedure called  StudentData will return the following data columns
    that I need for the report: StudnentName, StudentAddress, Studentbirthdate, StudentPhoneNumber, GuardianName.
    Thus can you show me how to setup the sql to meet this requirement I have?

    Hi wendy,
    After testing the issue in my local environment, we can refer to the following steps to achieve your requirement:
    Create three multiple parameters named SchoolNumber, SchoolName and StudentNumber in the report. Those available values from the basic dataset SchoolNumber, SchoolName and StudentNumber fields.
    If you want to pass multiple values parameter to stored procedure, we should create a function as below to the database:
    CREATE FUNCTION SplitParameterValues (@InputString NVARCHAR(max), @SplitChar VARCHAR(5))
    RETURNS @ValuesList TABLE
    param NVARCHAR(255)
    AS
    BEGIN
    DECLARE @ListValue NVARCHAR(max)
    SET @InputString = @InputString + @SplitChar
    WHILE @InputString!= @SplitChar
    BEGIN
    SELECT @ListValue = SUBSTRING(@InputString , 1, (CHARINDEX(@SplitChar, @InputString)-1))
    IF (CHARINDEX(@SplitChar, @InputString) + len(@SplitChar))>(LEN(@InputString))
    BEGIN
    SET @InputString=@SplitChar
    END
    ELSE
    BEGIN
    SELECT @InputString = SUBSTRING(@InputString, (CHARINDEX(@SplitChar, @InputString) + len(@SplitChar)) , LEN(@InputString)-(CHARINDEX(@SplitChar, @InputString)+ len(@SplitChar)-1) )
    END
    INSERT INTO @ValuesList VALUES( @ListValue)
    END
    RETURN
    END
    Use the query below to create a stored procedure, then use it to create a dataset to return 5 values:
    create proc proc_test(@SchoolNumber nvarchar(50),@SchoolName nvarchar(50),@StudentNumber nvarchar(50))
    as
    begin
    select StudnentName, StudentAddress, Studentbirthdate, StudentPhoneNumber, GuardianName
    from table7 where SchoolNumber in (SELECT * FROM SplitParameterValues (@SchoolNumber,','))  and SchoolName in(SELECT * FROM SplitParameterValues (@SchoolName,','))  and StudentNumber in (SELECT * FROM SplitParameterValues (@StudentNumber,','))
    end
    Right-click the new dataset to modify the parameter value in the Parameters pane as below:
    =join(Parameters!SchoolNumber.Value,",")
    =join(Parameters!SchoolName.Value,",")
    =join(Parameters!StudentNumber.Value,",")
    For more details about pass multi-value to stored procedure, please see:
    http://munishbansal.wordpress.com/2008/12/29/passing-multi-value-parameter-in-stored-procedure-ssrs-report/
    If there are any other questions, please feel free to ask.
    Thanks,
    Katherine Xiong
    If you have any feedback on our support, please click
    here.
    Katherine Xiong
    TechNet Community Support

  • 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.

  • ORA-03115 error when calling a Stored Procedure

    Hi All,
    I'm in the process of porting a Pro/C app from NT to Linux. I've installed 8.1.5 on our Linux box and patched it up to 8.1.5.02.
    It all kind of works ok, except that I'm sometimes getting ORA-03115 errors when the app calls a stored procedure. The call in question looks like this:
    EXEC SQL BEGIN DECLARE SECTION;
    VARCHAR resprows[50][3998];
    int numret = 0;
    int numrows= 50;
    int done= 0;
    unsigned long resp_id = 0;
    EXEC SQL END DECLARE SECTION;
    EXEC SQL AT DB_NAME EXECUTE
    BEGIN pkg_something.getdata(
    :resp_id, /* IN */
    :numrows, /* IN */
    :done, /* OUT */
    :resprows, /* OUT */
    :numret /* OUT */
    END;
    END-EXEC;
    The stored procedure basically uses the resp_id value to select rows from a table;
    in each row there is a VARCHAR2(4000) column which it copies into the hostarray resprows.
    There may be anything from 1 to numrows returned from the SP.
    Initially, the resprows rows were defined to be size [4000]. Unfortunately, this caused ORA-02005 errors - I then changed the size to [3998], which seemed to fix the 02005's (although I'm unclear as to the reasons why).
    Now I'm getting the 03115 errors when calling the SP. The oracle manual is not very helpful on what this error means.
    This all works chipper on NT.
    Any ideas?
    Thanks in advance,
    Nigel.
    PS: The database the app is talking to is still hosted on NT.
    null

    Histon FTM wrote:
    ORA-04063: package body "LAZARUS.LAZARUS" has errors Above, obviously conflicts with the statement that follows:
    >
    The procedure and package have both compiled without errors and the statement on its own works fine in SQL*Plus.I suggest you take a look in the USER_ERRORS view to see, what the errors are.
    And just checking:
    You have schema called LAZARUS, which holds a package named LAZARUS, which holds a procedure called POPULATEGRIDPOSITIONS?
    Edited by: Toon Koppelaars on Oct 1, 2009 5:55 PM

  • Calling a stored procedure runs into an error

    Hello,
    We are testing the Database Adapter.
    In our database we created the following
    - Table tt
    - Package ttpackage, with a procedure with 1 input and 1 output parameter which inserts a record in the tt table.
    (see scripts at bottom of message)
    We created a Database Adapter based upon this Package (Call a stored procedure or function) and register this Database Adapter with the Integration Server.
    When we invoke this Database Adapter and enter the input, we can see in the database that 4 records are created. The Web Service returns after a minute with an error
    How can we solve this problem?
    Regards Leon Smiers
    ERROR
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Header/><env:Body><env:Fault xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><faultcode>env:Server</faultcode><faultstring>oracle.tip.esb.server.common.exceptions.BusinessEventRetriableException: An unhandled exception has been thrown in the ESB system. The exception reported is: "oracle.tip.esb.server.common.exceptions.BusinessEventRetriableException: An unhandled exception has been thrown in the ESB system. The exception reported is: "java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 0
         at java.util.Vector.get(Vector.java:710)
         at oracle.tip.esb.server.common.wsif.WSIFInvoker.readResponseHeader(Unknown Source)
    SCRIPT
    drop table tt
    drop sequence seq_tt;
    drop package ttpackage;
    create table tt
    (field1 number(10) not null
    ,field2 varchar2(25) not null
    ,status varchar2(1) not null
    ,primary key (field1)
    create sequence seq_tt;
    create or replace package ttpackage is
    procedure insert_tt(
    pi_field2 in tt.field2%type,
    po_status out klacht_data.status%type);
    end;
    show errors
    create or replace package body ttpackage is
    procedure insert_tt(
    pi_field2 in tt.field2%type,
    po_status out klacht_data.status%type) is
    begin
    po_status:='I';
    insert into tt
    (field1, field2,status)
    values(seq_tt.nextval,pi_field2,po_status);
    end insert_tt;
    end;
    show errors
    /

    Hello Dave,
    Thanks for the quick fix.
    I've tested the fix. The 'Array index out of range: 0' disappeared.
    I get, unfortunately, the following error. I already described the steps I take in the first message. Based upon the TTpackage I create a Database adapter, register it with the ESB and invoke the URL from the ESB.
    Regards Leon
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Header/><env:Body><env:Fault xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><faultcode>env:Server</faultcode><faultstring>oracle.tip.esb.server.common.exceptions.BusinessEventRetriableException: An unhandled exception has been thrown in the ESB system. The exception reported is: "oracle.xml.parser.v2.XMLDOMException: Ongeldige naamruimte http://xmlns.oracle.com/pcbpel/adapter/db/OCOP/TTPACKAGE/INSERT_TT/ voor prefix xmlns
         at oracle.xml.parser.v2.XMLElement.setAttributeNS(XMLElement.java:1015)
         at oracle.tip.esb.utils.DOMUtil.copyContentsTo(Unknown Source)
         at oracle.tip.esb.server.service.impl.soap.EventOracleSoapProvider.raiseEvent(Unknown Source)
         at oracle.tip.esb.server.service.impl.soap.EventOracleSoapProvider.processMessage(Unknown Source)
         at oracle.j2ee.ws.server.provider.ProviderProcessor.doEndpointProcessing(ProviderProcessor.java:869)
         at oracle.j2ee.ws.server.WebServiceProcessor.invokeEndpointImplementation(WebServiceProcessor.java:349)
         at oracle.j2ee.ws.server.provider.ProviderProcessor.doRequestProcessing(ProviderProcessor.java:460)
         at oracle.j2ee.ws.server.WebServiceProcessor.processRequest(WebServiceProcessor.java:114)
         at oracle.j2ee.ws.server.WebServiceProcessor.doService(WebServiceProcessor.java:96)
         at oracle.j2ee.ws.server.WebServiceServlet.doPost(WebServiceServlet.java:177)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:711)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:866)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:448)
         at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:216)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
         at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
         at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    </faultstring><faultactor></faultactor></env:Fault></env:Body></env:Envelope>

  • Error calling a stored procedure from C#

    Please help me!
    I'm new in .net technology.
    I have an Oracle 9i server and an application in .net C# language.
    I'm trying to call a stored procedure written in plsql.
    This is the testing procedure:
    CREATE OR REPLACE PROCEDURE TEST_PROC
    par_1 in number
    as
    begin
    insert into tbltestinput (number_col) values (par_1);
    commit;
    end;
    And the calling code is:
    OracleCommand objCmd = new OracleCommand("TEST_PROC",conn);
    objCmd.CommandType = CommandType.StoredProcedure;
    OracleParameter inPar_1 = new OracleParameter();
    inPar_1.OracleType = OracleType.Number;
    inPar_1.Direction = ParameterDirection.Input;
    inPar_1.Value = 123456;
    objCmd.Parameters.Add(inPar_1);
    objCmd.ExecuteNonQuery();
    It returns this error:
    Exception Message: ORA-06550: row 1, column 7: PLS-00306: wrong number or types of arguments in call to 'TEST_PROC' ORA-06550: row 1, column 7: PL/SQL: Statement ignored
    Exception Source: System.Data.OracleClient
    The stored procedure is very very simple to test only the call.
    Anybody can help me.
    Thanks !!!!

    Hello,
    System.Data.OracleClient == Microsoft provider for Oracle (whereas this is the Oracle Data Provider for .NET forum).
    However, the MS provider operates in Bind By Name mode, so you might try adding this to your code:
    inPar_1.ParameterName = "par_1";Perhaps that will help a bit,
    Mark

  • Errors in calling Oracle stored procedure using java CallableStatement

    Hello,
    I have an oracle stored procedure below, it has been tested in PL/SQL without errors. During testing, in_c_file_type="F"; out_n_seqno_freeformat=120139596 and out_n_seqno_commaseprated is null (empty in value column).
    When I run the program in Eclipse (windows xp), error messages is below: (It stopped at line 'cstme.execute();' )
    Message:ORA-06550: line 1, column 26: PLS-00103: Encountered the symbol "" when expecting one of the following:   . ( ) , * @ % & | = - + < / > at in is mod remainder not   range rem => .. <an exponent (**)> <> or != or ~= >= <= <>   and or like LIKE2_ LIKE4_ LIKEC_ as between from using ||   indicator multiset member SUBMULTISET_ The symbol ", was inserted before "" to continue. Error code:6550 SQL statement:65000 {code} Does anyone know what cause the error? It seems like something is missing in the stored procedure. But the stored procedure passes the test in the PL/SQL. The oracla driver I used is Oracle thin driver. Oracle version is 10.2.g Thanks in advance. northcloud {code} create or replace procedure SP_GET_SEQNO_2( in_c_file_type in char, out_n_seqno_freeformat out integer, out_n_seqno_commaseprated out integer) is n_seqno_commaseprated    integer; n_seqno_freeformat        integer; begin if in_c_file_type ='F' THEN  SELECT message_counter.nextval INTO n_seqno_freeformat FROM dual; insert into temp_stroperations (record_id,OUTPUT_STR,INPROCESS_STR) values (n_seqno_freeformat,empty_clob(),empty_clob()); elsif in_c_file_type ='C' THEN  SELECT message_counter.nextval INTO n_seqno_commaseprated FROM dual; insert into temp_stroperations (record_id,OUTPUT_STR,INPROCESS_STR) values (n_seqno_commaseprated,empty_clob(),empty_clob()); else SELECT message_counter.nextval INTO n_seqno_freeformat FROM dual; insert into temp_stroperations (record_id,OUTPUT_STR,INPROCESS_STR) values (n_seqno_freeformat,empty_clob(),empty_clob()); SELECT message_counter.nextval INTO n_seqno_commaseprated FROM dual; insert into temp_stroperations (record_id,OUTPUT_STR,INPROCESS_STR) values (n_seqno_commaseprated,empty_clob(),empty_clob()); end if; out_n_seqno_freeformat        := n_seqno_freeformat; out_n_seqno_commaseprated    := n_seqno_commaseprated; end SP_GET_SEQNO_2; {code} ----- A part of java code I used to call the stored procedure is here. {code} String escapeString = "{call SP_GET_SEQNO_2 (? ? ?)}"; CallableStatement cstme = null; try { cstme = con.prepareCall(escapeString); cstme.setString(1, "F"); cstme.registerOutParameter(2, java.sql.Types.INTEGER); cstme.registerOutParameter(3, java.sql.Types.INTEGER); cstme.execute(); int seqNoFreeformat=0, seqNocommasepreted=0; seqNoFreeformat = cstme.getInt(2); seqNocommasepreted = cstme.getInt(3); System.out.println ("In ConvertXML.processStoredProcedure(), seqNoFreeformat= "+seqNoFreeformat+";seqNocommasepreted="+seqNocommasepreted); } catch (SQLException e) { //System.out.println ("In ConvertXML.processStoredProcedure(), SQLException: "+e); System.err.println("Message:"+e.getMessage()); System.err.println("Error code:"+e.getErrorCode()); System.err.println("SQL statement:"+e.getSQLState()); log.log(Level.INFO, log.getName() + " - SQLException : "+e); } {code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    es5f2000 wrote:
    jschell wrote:
    That works?I dunno. The below definitely works, but like I said, I've only
    ever done it with one output parameter (and that has always
    been a ResultSet).
    String callableQuery = "{?= call my_package.my_call(?, ?)}"
    Yes I have done that and at least in terms of my code it wasn't just a result set.
    But not with two.

Maybe you are looking for

  • Edit in photoshop looks terrible

    i thought i would try the "seamless" editing between LR and photoshop. go to photo, edit in photoshop....CS2 opens up...i can edit, dogde, burn, whatever...how great! then click save....and there are my changes in LR. in a perfect world, this would b

  • Images with attached audio clips and slideshows

    My old Minolta camera could save an audio WAV file with an image, but I've never been successful in using the audio file (same name as the image) in iPhoto.  I'm just starting out playing with Aperature 3 and see that I can import these easily.  Howe

  • ALv drilldown to standard report

    hello, My requirement is to drill down an ALV to access/execute a standard report. KUNNR and BUKRs are displayed in my ALV report, when the user clicks on a line, it has to call RFITEMAR passing the customer and company code and execute it... will i

  • Iphoto won't open, it's continuously "loading" but never opens

    When I open iphoto, or even plug in a device that opens it, I get the screen and the rotating circle, but the program never loads. I can't get to any of my photos this way.  Any troubleshooting tips?  Anyone else have this issue? thank you!

  • BAPI_CONTRACT_CREATEFROMDATA

    Hi, I am using BAPI : BAPI_CONTRACT_CREATEFROMDATA but I am getting an error Ship-To-Party or Bill-To-Party not found. Although I am giving the customer number in partners table provided. Still i am getting this error. Could anybody please provide an