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

Similar Messages

  • Error when calling a stored procedure from a SQL Script

    Apologies if this is a really dumb question but I can't seem to call a procedure in package from a SQL script. I have a simple package.procedure containing a loop to populate a table. I would like to include a call to this procedure from my database install script, that also includes my CREATE and INSERT statements. I run the script using "@install_databae" and the CREATE and INSERT statements run fine. The script gives an error when it reaches the line below:
    exec lazarus.PopulateGridPositions;
    and gives the error.....
    BEGIN lazarus.PopulateGridPositions; END;
    ERROR at line 1:
    ORA-04063: package body "LAZARUS.LAZARUS" has errors
    ORA-06508: PL/SQL: could not find program unit being called: "LAZARUS.LAZARUS"
    ORA-06512: at line 1
    The procedure and package have both compiled without errors and the statement on its own works fine in SQL*Plus.
    I've obviously missed some fundamental concept with scripts and SQL. Please can anybody help me?

    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

  • No method found error when calling java stored procedured

    hi:
    i am rather confused about this. i have written several
    java stored procedures and all of them work fine. but when i tried another one , the error message 'no method found 'occurs
    when i call the procedure from sqlplus.
    it' s a simple procedure . but it's very strange and happens
    from time to time
    my compile shell as following
    javac -classpath $ORACLE_HOME/jdbc/lib/classes12.zip GenFiles.java
    $ORACLE_HOME/bin/loadjava -u zw/zw@aixtest GenFiles.class
    and
    my definition as following
    create or replace procedure files(chargeCyckeID varchar2, cycleStart varchar2,cycleEnd varchar2,
    loginName varchar2, filePath varchar2, start1 number, end1 number, step number)
    AS LANGUAGE JAVA
    NAME 'GenFiles.genFile(String , String , String , String , String , int , int , int )';
    and my java code is here :
    import java.sql.*;
    import java.io.*;
    import oracle.jdbc.driver.*;
    public class GenFiles{
         public static void main(String[] args){
              04UU<F7QV\FZ#,V\FZ?*J<#,V\FZ=aJx#,5GB<C{#, ND<~B7>6#,Pr:E?*J<#,Pr:E=aJx#,2=3$#(Iz3IND<~5D<GB<J}#)
         public static void genFile(String chargeCycleID, String cycleStart, String cycleEnd, String loginName, String filePath, int start, int end, int step){
         try{
              String sqllist = "select customer_id,contract_code,     usercode,ani,ord,"
                        + " agent_code,linkman, customer_name , postcode,paymethod_category_id ,"
                        + " ltrim(to_char(cost,'999999990.99')) cost,call_duration,from listani_file where ord> ? and ord<? order by contract_code";
              String sqlcalls1 = "select a.ani || ',' || a.PASS || ',' || to_char(a.START_TIME,'yyyy-mm-dd hh24:mi:ss') stime || ',' || trunc(a.CALL_DURATION/60)||':'||ltrim(to_char(mod(a.CALL_DURATION,60),'09')) CALL_DURATION || ',' || ltrim(to_char((CALL_AMOUNT/ceil(CALL_DURATION/60)),'999999990.99')) RATE || ',' || ltrim(to_char(a.CALL_AMOUNT,'999999990.99')) CALL_AMOUNT"
                        +" from call_fact_mind a "
                        +" where a.usercode=?"
                        + " and a.ani=? "
                        + " and a.period_key<='" + end + "'"
                        + " and a.period_key>='" + start + "'"
                        + " and a.charge_flag='Y' "
                        + " and a.CALL_DURATION>6"
                        + " and a.CALL_AMOUNT>0"
                        +" order by a.period_key";                    
              String sqlcalls2 = "select a.ani || ',' || a.PASS || ',' || to_char(a.START_TIME,'yyyy-mm-dd hh24:mi:ss') stime || ',' || trunc(a.CALL_DURATION/60)||':'||ltrim(to_char(mod(a.CALL_DURATION,60),'09')) CALL_DURATION || ',' || ltrim(to_char((CALL_AMOUNT/ceil(CALL_DURATION/60)),'999999990.99')) RATE || ',' || ltrim(to_char(a.CALL_AMOUNT,'999999990.99')) CALL_AMOUNT "
                        + " from call_fact_mind a "
                        + " where a.usercode=?"
                        + " and a.period_key<='" + end + "'"
                        + " and a.period_key>='" + start + "'"
                        + " and a.charge_flag='Y' "
                        + " and a.CALL_DURATION>6"
                        + " and a.CALL_AMOUNT>0"
                        +" order by a.period_key";                    
              Connection con = new OracleDriver().defaultConnection();
              try{
                   int i = start;
                   //8y>]2=3$Q-;7
                   while( true){
                        if( i>=end ) break;
                        genFile(con, i , i+step, chargeCycleID, loginName, filePath, sqllist, sqlcalls1, sqlcalls2);
                        i += step;
              }catch(Exception ex){
              }finally{
                   if( con != null) con.close();
         }catch(Exception exx){}
              8y>]2=3$Iz3IND<~
         private static void genFile(Connection con, int start, int end, String chargeCycleID, String loginName, String filePath, String sqllist, String sqlcalls1, String sqlcalls2) throws Exception{
              PreparedStatement ps1 = null;
              PreparedStatement ps2 = null;
              PreparedStatement ps3 = null;
              ResultSet rs1 = null;
              ResultSet rs2 = null;
              String fileName = filePath + System.getProperty("file.separator") + start + "_" + end + ".txt";
              BufferedWriter writer = null;
              try{
                   writer = new BufferedWriter(new FileWriter(fileName));
                   ps1 = con.prepareStatement(sqllist);
                   ps2 = con.prepareStatement(sqlcalls1);
                   ps3 = con.prepareStatement(sqlcalls2);
                   ps1.setInt(1, start);
                   ps1.setInt(2, end);
                   rs1 = ps1.executeQuery();
                   //Iz3Ibuffer,V;SPR;6(<GB<J12EP4HkND<~
                   StringBuffer strBuffer = new StringBuffer();
                   int i =0;
                   //Q-;7:OM,=a9{</
                   String preContractCode = "";
                   String currentContractCode = "";
                   while( rs1.next()){
                        currentContractCode = rs1.getString("contract_code");
                        if( rs1.getString("ani") == null){
                             ps2.setString( 1, rs1.getString("usercode"));
                             rs2 = ps2.executeQuery();
                        }else{
                             ps1.setString(1, rs1.getString("usercode"));
                             ps1.setString(2, rs1.getString("ani"));
                             rs2 = ps1.executeQuery();
                        //Hg9{3vOVPB5D:OM,:E#,<SHk:OM,OnM7,contract_costJG:OM,On7QSC
                        if( ! preContractCode.equals(currentContractCode)){                     
                             //TZG0Cf<SHk?UPP
                             strBuffer.append("\r\n");
                             String contractHead = "\"1\"" + ",\"" + rs1.getString("linkman") + "\",\"" + rs1.getString("customer_name")
                                            + "\",\"" + rs1.getString("contract_code") + "\",\"" + rs1.getString("agent_code")
                                            + "\",\"" + chargeCycleID + "\",\"" + rs1.getString("contract_cost") + "\"";
                             strBuffer.append(contractHead);
                        while( rs2.next()){
                             if( i<1000){
                                  i++;
                                  strBuffer.append("\"2\"" + rs2.getString(1));
                             }else{
                                  String str = strBuffer.toString();
                                  writer.write(str, 0, str.length());
                                  strBuffer = new StringBuffer();
                                  strBuffer.append(rs2.getString(1));
                                  i = 1;
                        //<SHk7QSC:O<F
                        if( rs1.getString("ani") == null){
                             String trail = "\"2\"" + ",\"" + "ani: " + "\",\"" + rs1.getString("ani") + "\",\"" + "Total Amount: " + "\",\"" + rs1.getString("cost") + "\"\r\n";
                             strBuffer.append(trail);
                        }else{
                             String trail = "\"2\"" + ",\"" + "usercode: " + "\",\"" + rs1.getString("usercode") + "\",\"" + "Total Amount: " + "\",\"" + rs1.getString("cost") + "\"\r\n";
                             strBuffer.append(trail);
                        preContractCode = currentContractCode;     
                        writer.close();
                        rs2.close();
              }catch(Exception ex){
              }finally{
                   if( rs1 != null) rs1.close();
                   if( rs2 != null) rs2.close();
                   if( ps1 != null) ps1.close();
                   if( ps2 != null) ps2.close();
    i need your help!
    regards
    daniel wang

    Hi again, Daniel,
    I'm only guessing here, but unless you've made lots of mistakes when
    you copied your code to your post to the forum, your method signatures
    don't match. The definition of "genFile" in your java class is quite
    different to what you wrote in your PL/SQL wrapper.
    Also, you have defined "genFile" to be a private method -- I think it
    needs to be public.
    Also, I think the "main" method doesn't need to be in the "GenFiles"
    class -- perhaps you should remove it.
    Also, I think in your PL/SQL wrapper you need to use fully qualified
    names, so use "java.lang.String" and not just "String".
    Lastly, I think you should use the "-force" and "-resolve" flags
    with the "loadjava" command.
    Good Luck,
    Avi.

  • ORA-21700 Error when running C# stored procedure to do a spatial query

    Hi All
    I'm having trouble running a C# stored procedure that (via another object) that falls over running a spatial query with the following error.
    OAR-21700 object does not exist or is marked for delete
    If I take the sql of the spatial query out and run it separately in SqlPlus it runs as expected.
    If I use the object that executes the spatial query via NUnit (i.e. executed on the client, rather than the server) it also works as expected.
    Can anyone help? Is there some issue using Oracle Spatial queries with the Oracle Database Extensions for .NET?

    I can indeed. Here is a slightly simplified version:
    SELECT secondary_catch.mi_prinx AS primarykey
    FROM mapinfo_data.secondary_catch
    WHERE sdo_relate (secondary_catch.geoloc,
    (SELECT geoloc
    FROM training_6.building_polygons
    WHERE building_id = 10002507117),
    'mask=anyinteract querytype=WINDOW'
    ) = 'TRUE'
    Interestingly, if I attempt to run this query inside a C# stored procedure using the implicit context connection (i.e. OracleConnection.ConnectionString = "context connection=true") it fails with the error I described above.
    If however I create a new connection and connect as a regular user on my database, the query works correctly.
    So in that sense I have a workaround, but I'd like to avoid using it if I can as creating a new explicit connection is an overhead I can do without.

  • ODBC 8.1.7 Error when calling a stored procedure that owned by an other user

    I am testing my application VB for certified to use the
    Client 8 with ODBC Driver 8.1.7.0 , because today this application
    have been working with Client 7 and ODBC driver 7.3 version 2.5.
    But i have some surprises:
    Set qy = con.CreateQuery("", "{CALL OFS.INSERT_DEPT (?,?,?)}")
    OFS is the owner of the proc
    (other combinations {BEGIN ...;END;} also doesn't work, except the owner executes the stmt)
    qy(0) = "6"
    qy(1) = "ABCDEF"
    qy(2) = "L88"
    at this point it gives an VB error:
    40041 Object Collection: Couldn't find item indicated by text.
    PS: With previous ODBC Driver 7.3 v2.5 this error doesn4t occur.
    I have the rights to execute the procedure
    GRANT EXECUTE ON OFS.DEPT TO OFS_USERS;
    Is there any other way to get this procedure work? Its a BUG ?
    My Procedure:
    create or replace procedure INSERT_DEPT(
    in_deptno in number,
    in_dname in varchar2,
    in_loc in varchar2)
    is
    begin
    insert into dept(deptno, dname, loc)
    values(in_deptno, in_dname, in_loc);
    end;
    show errors;
    GRANT EXECUTE ON OFS.INSERT_DEPT TO OFS_USERS;
    Environment:
    Client:
    VB 5.0 SP3 (using RDO 2.0)
    NT 4.0 SP6
    Oracle8i Client 8.1.7.0.0
    Oracle ODBC Driver 8.1.7.0.0
    PS: This error already occured with Oracle ODBC Driver 8.1.7.7.0
    Server:
    Oracle8i Enterprise Edition Release 8.1.7.4.1
    Win 2000 SP2
    Thanks in advance.

    I have no problem executing that statement from ODBCTest on my machine
    Client:
    Win2k,
    Oracle ODBC driver 8.1.7.7
    Oracle client 8.1.7.0
    Server:
    Oracle 8.1.7.0
    First, can you try replacing the ?'s with explicit parameters? I can't imagine that an error binding the variables would cause an error like this, but I'd just like to rule it out.
    Second, can you grab the ODBC SDK from Microsoft <http://www.microsoft.com/data> if you haven't already and try that statement from within the ODBCTest sample application? If that works for you, then there must be something in the layers between your application and the ODBC driver which are confusing things. Which API are you actually using from VB? I'm guessing ADO, but I'd like confirmation on that.
    Third, did you set any parameters to non-default values when you configured your DSN? I left everything as-is on my machine, so I'll try to replicate any changes you might have made to see if that changes anything.
    Finally, can you post the connection string you're using?
    Justin

  • ORA-28868 error when calling Web service over HTTPS from PL/SQL utl_http

    I am getting error message ORA-28868 error when calling Web service over HTTPS from PL/SQL utl_http PL/SQL package,
    when browsed through some of the messages they point to setting Oracle Wallet Manager.
    I am trying to connect
    Any idea on how to resolve this issue ?
    your input is appreciated.
    Thanks
    Ravi

    Duplicate post ... please ignore.

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

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

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

  • 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

  • SQL Developer Bug: NVL() function error when debug/run stored procedure

    Version:
    SQL Developer: 1.5.3 (build main-5783)
    Oracle DB connected: Oracle9i Enterprise Edition Release 9.2.0.6.0
    Stored procedure code like this:
    procedure search(V_STATUS_IN IN CHAR(1)) is
    begin
    declare
    V_STATUS CHAR(1) := NULL;
    begin
    V_STATUS := NVL(V_STATUS_IN, '%'); -- error line
    end;
    end;
    The stored procedure runs well (I mean no oracle exception) when called through Java code (and in TOAD). But when debug/run in SQL Developer, following error at the error line:
    $Oracle.EXCEPTION_ORA_6502:
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    --------------------------------------------------*/

    What parameter are you passing in? It is possible you are trying to cram a multibyte character into a singlebyte container. What are the nls settings for the database and for sqldeveloper?

  • ORA-03115 error when accessing CLOB in servlet

    hi, all
    I stored some html files in Oracle as CLOB, I need to select one file out. I did this in normal java file, it worked pretty well, I can print this file out to terminal. Now I tried to use servlet to do this, post this file in browser, I got this error when I tried executeQuery("select *.. "):
    java.sql.SQLException: ORA-03115: unsupported network datatype or representation
    I guess this is JDBC driver problem, I used Tomcat3.2.4. Can anyone give me some hint? Thanks a lot!

    you can try the lastest one to see if that helps
    http://otn.oracle.com/software/tech/java/sqlj_jdbc/content.html

  • Ora-04021 error while compiling a stored procedure

    Hi Gurus,
    I am getting a ora-04021 timeout error while trying to compile a stored procedure. My Oracle version is 9i on Unix.
    Thanks
    Amitava.

    amitavachatterjee1975 wrote:
    Hi Gurus,
    I am getting a ora-04021 timeout error while trying to compile a stored procedure. My Oracle version is 9i on Unix.
    Thanks
    Amitava.
    my car won't go.
    tell me how to make my car go.
    How do I ask a question on the forums?
    https://forums.oracle.com/forums/thread.jspa?threadID=2174552#9360002
    [oracle@localhost ~]$ oerr ora 4021
    04021, 00000, "timeout occurred while waiting to lock object %s%s%s%s%s"
    // *Cause:  While waiting to lock a library object, a timeout occurred.
    // *Action: Retry the operation later.
    [oracle@localhost ~]$

  • Getting error while Calling Oracle Stored Procedure with output Parameter

    HI All,
    From long days i am working on this but i unable to solve it.
    Even i have studied so many forums in SAP but i didn't find the solution.
    I am calling Oracle Store procedure with 3 inputs and 1 output without cursor.
    Store Procedure:-
    CREATE OR REPLACE PROCEDURE PDS.send_rm
    IS
    proc_name           VARCHAR2(64) := 'send_rm';
    destination_system  VARCHAR2(32) := 'RAWMAT';
    xml_message         VARCHAR2(4000);
    status_code         INTEGER;
    status_message      VARCHAR2(128);
    debug_message       VARCHAR2(128);
    p_ret               INTEGER;
    BEGIN
      DBMS_OUTPUT.PUT_LINE( proc_name || ' started' );
      xml_message := '<RAW_MATERIAL>'||
                     '<BAR_CODE>10000764601</BAR_CODE>'||
                     '<MATERIAL>1101448</MATERIAL>'||
                     '<VENDOR_CODE/>'||
                     '<PRODUCTION_DATE>0000-00-00</PRODUCTION_DATE>'||
                     '<EXPIRE_DATE>0000-00-00</EXPIRE_DATE>'||
                     '<BATCH/>'||
                     '<PO_NUM/>'||
                     '<MATERIAL_DESCRIPTION>POWER SUPPLY</MATERIAL_DESCRIPTION>'||
                     '<SPEC_NAME/>'||
                     '<STOCK_CODE>BSW-JH</STOCK_CODE>'||
                     '<INSPECTION_LOT>00</INSPECTION_LOT>'||
                     '<USAGE_DECISION_CODE/>'||
                     '<MATERIAL_GROUP>031</MATERIAL_GROUP>'||
                     '</RAW_MATERIAL>';
          dbms_output.put_line('XML '||xml_message);
    --      vp_interface.load_rawmat@cnprpt1_pds(SYSDATE, destination_system,
    --                   xml_message, p_ret);
          vp_interface.load_rawmat(SYSDATE, destination_system,
                       xml_message, p_ret);
          dbms_output.put_line('Return Code '||p_ret);
          COMMIT;
    EXCEPTION
      WHEN OTHERS THEN
        status_code := SQLCODE;
        status_message := SUBSTR(SQLERRM, 1, 64);
    --    Extract_Error_Logger(proc_name, 'LOCAL', SYSDATE, -999,
    --                         status_message, 0, debug_message);
        ROLLBACK;
    END send_rm;
    And while i am calling this Store procedure in MII, I am facing error.
    I have tried different ways but didnt solved
    In SQL Query, i kept mode as: FixedQueryOutput
    Can anyone tell me or send code for calling above store procedure
    And onemore thing, While creating store procedure in Oracle for MII. Do we need to Create output parameter as cursor or normal.  
    Thanks,
    Kind Regards,
    Praveen Reddy M

    Hi Praveen
    Our wrapper was created because we could not modify the procedure we call (it was not returning a cursor).
    CREATE OR REPLACE PROCEDURE CHECK_PUT_IN_USE
    (STRCMPNAME in varchar2,
    STRSCANLABEL in varchar2,
    RCT1 out SYS_REFCURSOR
    AS
      charDispo          Char(1);
      charStatus          Char(1);
      intCatNo          Integer;
      charCatDispo     Char(1);
      strCatQual          VarChar2(2);
      strCatDesc          VarChar2(30);
      strMsg          VarChar2(128);
    BEGIN
    qa.check_put_in_use@AR(STRCMPNAME,
                                              STRSCANLABEL,
                                              charDispo,
                                              charStatus,
                                              intCatNo,
                                              charCatDispo,
                                              strCatQual,
                                              strCatDesc,
                                              strMsg);
    OPEN RCT1
    FOR Select charDispo,charStatus,charDispo,charStatus,intCatNo,charCatDispo,strCatQual,strCatDesc,strMsg from Dual;
    END;
    Hope this helps
    Regards
    Amrik
    then with a FixedQueryWithOutput
    call mixar.qasap.wrapper_update_put_in_use('[Param.1]','[Param.2]',[Param.3],?)
    Hope this helps.

  • ORA-06502 Error When Calling Function

    Hi,
    We have upgraded Oracle Database Server 9i to 11.1.0.7 and we are now using ODP.NET version 2.112.2.0 instead of 9.2.0.4 dll.
    After the migration, we encountered ORA-06502 problem when we are calling a function from .NET application. We investigated and found that we have to set the parameter size for the return value parameter (varchar2). But there is a strange case that how do we guess the return value size, it can be 5 characters or 5.000 characters. Before 11g Oracle.DataAccess, we do not have that such problem. We were setting the parameter size 225 by default, but ODP.NET was returning 500 characters without any error.
    The question is that how do we guess or know the actual parameter size when we are passing a Return Value parameter to the function?
    Or is there a solution for this behaviour of ODP.NET?
    Thanks.

    Is there a reason you can not set it to the default maximum size for a varchar2 of 32k?
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using Oracle.DataAccess.Client;
    using System.Data;
    namespace test_function2
    class Program
    static void Main(string[] args)
    OracleConnection con = new OracleConnection("Data Source=UTF8;User ID=scott;Password=tiger");
    OracleCommand cmd = new OracleCommand("test_return", con);
    cmd.CommandType = CommandType.StoredProcedure;
    OracleParameter test_return = new OracleParameter("test_return", OracleDbType.Varchar2, 32000);
    test_return.Direction = ParameterDirection.ReturnValue;
    cmd.Parameters.Add(test_return);
    OracleParameter test_input = new OracleParameter("test_input", OracleDbType.Varchar2);
    test_input.Direction = ParameterDirection.Input;
    test_input.Value = "blah";
    cmd.Parameters.Add(test_input);
    try
    con.Open();
    cmd.ExecuteNonQuery();
    con.Close();
    Console.WriteLine("{0}", test_return.Value);
    Console.WriteLine("Press Enter to Continue");
    Console.ReadLine();
    catch (OracleException e)
    Console.WriteLine(e.Number);
    Console.WriteLine(e.Message);
    Console.WriteLine("test failed\nPress Enter to Continue");
    Console.ReadLine();
    create or replace function test_return(in_var in varchar2)
    return varchar2 is
    begin
    return lpad(in_var, 4000, 'TEST test') || lpad(in_var, 4000, 'DONE done');
    end test_return;
    /

Maybe you are looking for