Problem with Stored procedure in JDBC Synch scenario

Hello Experts,
I am working on the scenario which is from HTTP <-> to <-> JDBC. It is a synchronouse scenario. We are using Stored procedure in this scenario.
1) Please send the response structure for it.
2) here when i am sending request to the Database it is giving me below error :
Delivery of the message to the application using connection JDBC_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'TCS.PKG_BMF_MANAGE_SERVICE_DATA.PROC_GET_ACTIVE_MF_ESIIDS' (structure 'statement'): java.sql.SQLException: Oracle CLOB Helper: java.lang.AbstractMethodError: java/sql/Clob.setString(JLjava/lang/String;)I. Setting message to status failed.
One of the field in Database stored procedure is of type CLOB. So can you ppl guide me that what might be the solution for this.
Any help appriciated.
Thanks,
Hetal

I am using Stored procedure and that is working fine in Oracle
This is my XI Request structure :
<?xml version="1.0" encoding="UTF-8" ?>
- <ns0:read_PROC_GET_ACTIVE_ESIIDS xmlns:ns0="http://reliant.com/xi/BMFR2">
- <statement>
- <PROC_GET_ACTIVE_ESIIDS action="EXECUTE">
  <table>TCS.PKG_BMF_MANAGE_SERVICE_DATA.PROC_GET_ACTIVE_MF_ESIIDS</table>
  <in_bmf_partner_id isInput="true" type="VARCHAR">994</in_bmf_partner_id>
  <in_esids isInput="true" type="CLOB">1008901001155950587100:1008901001155950545100:1008901001155950671100:1008901001155950114100</in_esids>
  </PROC_GET_ACTIVE_ESIIDS>
  </statement>
  </ns0:read_PROC_GET_ACTIVE_ESIIDS>
This is oracle Stored procedure signature :
PROCEDURE PROC_GET_ACTIVE_ESIIDS
in_bmf_partner_id           IN   kss_activity_stg_curr_stat.BMF_PARTNER_ID%TYPE,
in_esids                    IN   CLOB,
out_recordset               OUT  sys_refcursor
Let me know if you need any further information.
Thanks,
Hetal

Similar Messages

  • Weird Problem calling Stored Procedure using JDBC

    Scenario is..
    I have J2EE application and calling stored procedure using JDBC.
    My application connects to instance "A" of testDB.
    Schema "A" does NOT own any packages/procedure but granted execute on oracle packages/procedures that reside in schema "B" of testDB.
    In java code I call procedure(proc1) in package(pac1) which internally calls procedure(proc2) in package(pac2).
    The problem occurs when procedure pac2.proc2 is modified. After the modification, my java code fails and throws an exception "User-Defined Exception" and I am also getting "ORA-06508: PL/SQL: could not find program unit being called". This clears up only if I bounce the web container. (This doesn't happen if I modify pac1.proc1 and run my application)
    Has any one faced this problem? Please suggest if any thing can be changed in jdbc code to fix this problem.
    Thanks

    Hi,
    I assume these are PL/SQL packages and that the changes are made at the package specification level?
    If so, it looks like you are hitting the PL/SQL dependencies rules. In other words, if the spec of proc2 is changed, then proc1 is invalidated, since proc1 still depends on the old version of proc2's spec. As a result, if you try to run proc1, its spec must either be explicitly rewritten before it could run again or implicitly recompiled first, if the (implicit) recompilation fails, it won’t run.
    Kuassi http://db360.blogspot.com

  • Problem With Stored Procedure

    Post Author: Ranjith.403
    CA Forum: General
    Hi,
    Am new to crystal reports with stored procedures
    am created a report using a stored procedure in oracle. In that Stored Procedure am Using a temporary table.
    After inserting values into the table am assigning to ref cursor.
    Refcursor having fields like item,onhandstock,purchase rate
    This report working fine in oracle version 9.2.0.1.0 where comes to oracle version 9.2.0.8.0 it's giving the varchar values correctly.
    The Number values are showing as 0.
    Help me to solve it.
    Thanks in Advance,
    Ranjith

    Try modularising this large procedure into smaller procedures and functions, and determine which part is causing you trouble.

  • Problem with Stored Procedure exection in Sender and Receiver side of JDBC

    Hi All,
    I am facing problem while executing Stored Procedures using sender and receiver sides of JDBC adapter.
    Here is my SP in Oracle DB :
    PROCEDURE EMP                           
    ( ID IN VARCHAR2,NAME IN VARCHAR2,PROCESSED IN VARCHAR2  ) AS                                                          
    BEGIN                                                         
       INSERT INTO EMPLOYEE VALUES (ID, NAME, PROCESSED);COMMIT;END EMP;
    Now I want to execute this SP using sender JDBC channel and receiver JDBC channel.
    Can anyone please help me executing this SP?
    Regards,
    Soorya

    Hi Soorya,
    The receiver Data type should be like this:
    <StatementName>
    <storedProcedureName action=u201D EXECUTEu201D>
        <table>realStoredProcedureeName</table>
    <param1 [isInput=u201Dtrueu201D] [isOutput=true] type=SQLDatatype>val1</param1>
    </storedProcedureName >
      </StatementName>
    Check the link http://help.sap.com/saphelp_nw04/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/frameset.htm
    Which DB  are you using?? The sender structure will be like
    <resultset>
    <row>
    <field1></field1>
    <field2></field2>
    <field3></ field3>
    </row>
    </resultset>
    Search SDN you will get lot of examples
    Regards
    Suraj

  • Problem with Stored Procedure and inout parameter and jdbc-odbc bridge

    create or replace procedure test_proc( para in out number) as
    begin
    if para = 1 then
    para := 11111;
    else
    para := 22222;
    end if;
    end;
    public static void main(String args[]) throws Exception{
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    String url = "jdbc:odbc:test3";
    String uid = "scott";
    String pwd = "tiger";
    Connection conn = DriverManager.getConnection(url,uid,pwd);
    CallableStatement cstmt = conn.prepareCall("{call test_proc(?)}");
    cstmt.registerOutParameter(1,Types.INTEGER);
    cstmt.setInt(1,1);
    cstmt.execute();
    System.out.println("para = " + cstmt.getInt(1));
    cstmt.close();
    conn.close();
    I get the following errors:
    Exception in thread "main" java.lang.NumberFormatException:
    at java.lang.Integer.parseInt(Integer.java:426)
    at java.lang.Integer.<init>(Integer.java:540)
    at sun.jdbc.odbc.JdbcOdbcCallableStatement.getInt(JdbcOdbcCallableStatement.java:385)
    at test_proc.main(test_proc.java:11)
    How can i get the correct result: 1111
    Note: The Oracle jdbc driver can gets the correct result.
    Pls help me! Thanks!

    Hello,
    I presume you have created the stored procedure with an INOUT parameter?

  • Probleme with stored procedure in oracle 10 g

    I create a stored procedure for archiving successfully compile but when I select t_sql_statement i have 0 rows :( :(
    create or replace
    PROCEDURE p_archive_test(piv_owner varchar2)
    is
    lv_stmt varchar2(2000) := 'insert /*+ append */ into TABLE1 (COLUMNS)
                                                                     select INS_COLUMNS
                                                                     from TABLE2 tab2@db1
                                                                     where not exists (select null
                                                                                         from TABLE1 tab1
                                                                                         where PKCOLUMNS
    cursor c_tab is
    select tab.table_name,'ERR$_'||tab.table_name ERR_TABLE
    from all_tables tab
              where tab.owner = piv_owner
    -- and tab.table_name = 'action'
    --order by atb.TABLE_ORDER
    -- For each table get the primary key columns     
    cursor c_pk(civ_table_name in all_tables.TABLE_NAME%type)
    is
    select acl.COLUMN_NAME
    from all_cons_columns acl
    ,all_constraints acn
    where acn.OWNER = piv_owner
    and acn.CONSTRAINT_TYPE = 'P'
    and acn.TABLE_NAME = civ_table_name
    and acl.OWNER = acn.OWNER
    and acl.TABLE_NAME = acn.table_name
    and acl.CONSTRAINT_NAME = acn.CONSTRAINT_NAME
    order by acl.POSITION;
    -- For each table get the corresponding table columns names
    cursor c_ins_cols(civ_table_name in all_tab_columns.TABLE_NAME%type)
    is
    select 'tab2.'||atc.COLUMN_NAME column_name
    from all_tab_columns atc
    where atc.OWNER = piv_owner
    and atc.TABLE_NAME = civ_table_name
    order by atc.COLUMN_ID;
    -- For each table get the columns names excluding the primary key columns
    cursor c_upd_cols(civ_table_name in all_tab_columns.TABLE_NAME%type)
    is
    select 'tab1.'||atc.COLUMN_NAME||'=tab2.'||atc.column_name column_name
    from all_tab_columns atc
    where atc.OWNER = piv_owner
    and atc.TABLE_NAME = civ_table_name
    and not exists (select 1
    from all_cons_columns acl
    ,all_constraints acn
    where acl.OWNER = atc.owner
    and acl.TABLE_NAME = atc.TABLE_NAME
    and acl.column_name = atc.column_name
    and acn.OWNER = acl.OWNER
    and acn.TABLE_NAME = acl.TABLE_NAME
    and acn.constraint_type = 'P')
    order by atc.COLUMN_ID;
    -- For each table get the columns names
    cursor c_cols(civ_table_name in all_tab_columns.COLUMN_NAME%type)
    is
    select
    --'tab1.'||
    atc.COLUMN_NAME column_name
    from all_tab_columns atc
    where atc.owner = piv_owner
    and atc.TABLE_NAME = civ_table_name
    order by atc.COLUMN_ID;
    lv_cols varchar2(4000);
    lv_pk_cols varchar2(4000);
    lv_ins_cols varchar2(4000);
    lv_upd_cols varchar2(4000);
    BEGIN
    for r_tab in c_tab
    loop
    lv_cols := '';
    lv_pk_cols := '';
    lv_ins_cols := '';
    lv_upd_cols := '';
    for r_pk in c_pk(civ_table_name => r_tab.table_name)
         loop
    lv_pk_cols := lv_pk_cols||'tab1.'||r_pk.column_name||'=tab2.'||r_pk.column_name||' and ';
    end loop r_pk_loop;
    lv_pk_cols := substr(str1 => lv_pk_cols
    ,pos => 1
    ,len => length(ch => lv_pk_cols) - 5);
    for r_ins_cols in c_ins_cols(civ_table_name => r_tab.table_name)
    loop
    lv_ins_cols := lv_ins_cols||r_ins_cols.column_name||',';
    end loop r_ins_cols_loop;
    lv_ins_cols := substr(str1 => lv_ins_cols
    ,pos => 1
    ,len => length(ch => lv_ins_cols) - 1);
    for r_upd_cols in c_upd_cols(civ_table_name => r_tab.table_name)
         loop
    lv_upd_cols := lv_upd_cols||r_upd_cols.column_name||',';
    end loop r_upd_cols_loop;
    lv_upd_cols := substr(str1 => lv_upd_cols
    ,pos => 1
    ,len => length(ch => lv_upd_cols) - 1);
    for r_cols in c_cols(civ_table_name => r_tab.table_name)
         loop
    lv_cols := lv_cols||r_cols.column_name||',';
    end loop r_cols_loop;
    lv_cols := substr(str1 => lv_cols
    ,pos => 1
    ,len => length(ch => lv_cols) - 1);
    lv_stmt := replace(replace(replace(replace(replace(replace(replace(lv_stmt
    ,'TABLE1'
    ,r_tab.table_name)
    ,'TABLE2'
    ,'DIST_'||r_tab.table_name)
    ,'PKCOLUMNS'
    ,lv_pk_cols)
    ,'UPD_COLUMNS'
    ,lv_upd_cols)
    ,'INS_COLUMNS'
    ,lv_ins_cols)
    ,'COLUMNS'
    ,LV_COLS)
    ,'TABLE3'
    ,R_TAB.ERR_TABLE);
    -- here It highy advisable to store the sql statement that will be submitted
    -- to the SQL engine before executing it dynamically
    insert into t_sql_statement values (lv_stmt);
    execute immediate lv_stmt;
    end loop ;
    commit;
    exception
    when others then
    rollback;
    raise;
    end p_archive_test;

    Welcome to the forum!
    Unfortunately you have posted to the wrong forum. This question is not about sql developer and is more appropriate for the sql and pl/sql forum
    PL/SQL
    Please
    1. repost the question in the SQL and PL/SQL forum
    2. edit this question to tell people to followup in the other forum - post the link to the question in the other forum
    3. mark this question answered so people will followup in the other forum.
    Read the FAQ in the other forum (there will be link at the top right of the page) for how to post a question and the information you need to provide. In particular use 'code' tags (see FAQ for explanation) before and after posted code and always provide your 4 digit Oracle version (result of SELECT * FROM V$VERSION).
    Before you post the new thread I suggest you perform some additional testing by
    1. Modify your code so that it creates the statements but does not execute them. With dynamic sql the most common problem is incorrect syntax and until you have verified that the syntax is both correct and exactly what you want it is a waste of time to execute the statements.
    2. Modify your code to only create one statement (add WHERE ROWNUM = 1 to the main query). If the syntax is wrong it will be wrong for all of the statements so until the code works correctly for one loop it is a waste of time perform 10's or 100' of loops.
    3. Currently you are not committing the creation of the statement itself but only after it is executed. Thus if the execution fails the query that failed won't be available for you to examine. Either commit the INSERT or, at a minimum capture the query into a global variable and add a DBMS_OUTPUT to the exception handler to display the failed query so you can examine and test it to fix any problem.
    Also, by just blindly using the data in ALL_TAB_COLS you are not taking into account that Oracle creates hidden (see the hidden column) and virtual columns that will cause your processing to fail for any tables that use them since you cannot use them directly in queries like you are creating.

  • Problem with stored procedure usage when Toplink api is used

    In one of our applications we used the combination of JBoss4.0.2 application server, Oracle Toplink 10g (9.0.4.5), JDBC Driver Version is ..... 10.1.0.2.0, Database Product Version is Oracle9i Enterprise Edition Release 9.2.0.6.0, j2sdk1.4.2_08
    We faced problem in the application when it is trying to call stored procedure using Oracle Toplink api
    code snippet:
    public ByteArrayOutputStream baos = new ByteArrayOutputStream();
    public PrintStream pos = new PrintStream(baos);
    public String delete(String Id)
    String procedureName = "abc";
    try
    UnitOfWork uow = PersistenceManager.getCurrent().getUnitOfWork();
    StoredProcedureCall call = new StoredProcedureCall();
    call.setProcedureName(procedureName);
    call.addUnamedArgumentValue(Id);
    uow.executeNonSelectingCall(call);
    uow.commit();
    catch (Exception e)
    message = e;
    e.printStackTrace(pos);
    message = message+ baos.toString();
    return message;
    Stack Trace:
    Exception [TOPLINK-4002] (OracleAS TopLink - 10g (9.0.4.5) (Build 040930)): oracle.toplink.exceptions.DatabaseException Exception Description: java.sql.SQLException: ORA-06550: line 1, column 7: PLS-00201: identifier 'abc' must be declared ORA-06550: line 1, column 7: PL/SQL: Statement ignored Internal Exception: java.sql.SQLException: ORA-06550: line 1, column 7: PLS-00201: identifier 'abc' must be declared ORA-06550: line 1, column 7: PL/SQL: Statement ignored Error Code: 6550Local Exception Stack: Exception [TOPLINK-4002] (OracleAS TopLink - 10g (9.0.4.5) (Build 040930)): oracle.toplink.exceptions.DatabaseException Exception Description: java.sql.SQLException: ORA-06550: line 1, column 7: PLS-00201: identifier 'abc' must be declared ORA-06550: line 1, column 7: PL/SQL: Statement ignored Internal Exception: java.sql.SQLException: ORA-06550: line 1, column 7: PLS-00201: identifier 'DELETE_LOADED_RESULT_SET' must be declared ORA-06550: line 1, column 7: PL/SQL: Statement ignored Error Code: 6550 at oracle.toplink.exceptions.DatabaseException.sqlException(DatabaseException.java:227) at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:733) at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeNoSelect(DatabaseAccessor.java:781) at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:642) at oracle.toplink.publicinterface.UnitOfWork.executeCall(UnitOfWork.java:1400) at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(CallQueryMechanism.java:131) at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(CallQueryMechanism.java:115) at oracle.toplink.internal.queryframework.CallQueryMechanism.executeNoSelectCall(CallQueryMechanism.java:164) at oracle.toplink.internal.queryframework.CallQueryMechanism.executeNoSelect(CallQueryMechanism.java:143) at oracle.toplink.queryframework.DataModifyQuery.execute(DataModifyQuery.java:41) at oracle.toplink.queryframework.DatabaseQuery.execute(DatabaseQuery.java:493) at oracle.toplink.publicinterface.Session.internalExecuteQuery(Session.java:1958) at oracle.toplink.publicinterface.UnitOfWork.internalExecuteQuery(UnitOfWork.java:2236) at oracle.toplink.publicinterface.Session.executeQuery(Session.java:1086) at oracle.toplink.publicinterface.Session.executeQuery(Session.java:1038) at oracle.toplink.publicinterface.Session.executeNonSelectingCall(Session.java:816) at com.abc.de.fg.model.resultSet.ResultSetProvider.delete(ResultSetProvider.java:150) at
    Could anyone please let me know what might be the problem in this case.

    Tried and couldn't reproduce the problem using 9.0.4.7.
    Here's the code:
        System.out.println("storedProcedureUnamedValueTest");
        StoredProcedureCall call = new StoredProcedureCall();
        String lastName = "Jones";
        call.setProcedureName("STOREDPROCEDURE_IN");
        call.addUnamedArgumentValue(lastName);
        session.executeNonSelectingCall(call);stored procedure definition in data base:
    CREATE OR REPLACE  PROCEDURE "TEST_904"."STOREDPROCEDURE_IN"  (
         IN_PARAM VARCHAR2) AS
    BEGIN
      UPDATE EMPLOYEE SET F_NAME = 'Indiana' WHERE (L_NAME = IN_PARAM);
    END;log:
    storedProcedureUnamedValueTest
    DatabaseSession(15)--Execute query DataModifyQuery()
    DatabaseSession(15)--Connection(16)--BEGIN STOREDPROCEDURE_IN('Jones'); END;
    DatabaseSession(15)--Connection(16)--reconnecting to external connection poolAndrei

  • Problem with stored procedure in DB2

    Hi,
    Rigth now im havin a little problem trying to CALL a DB2 SP
    I have a DB2 SP, something like this:
    CREATE PROCEDURE ordenes.XXMOR_GuardaEncabezado
    in p_ORDID     INTEGER,
    in p_ADVID     CHAR     (6),
    in p_ACCTHDRID     CHAR     (6),
    in p_STNID     CHAR     (6),
    in p_ORDTYP     SMALLINT,
    in p_STRDT     varchar(10),
    in p_EDT     char(10),
    in p_MCONTID     CHAR     (16),
    in p_AGYESTNUM     CHAR     (20),
    IN p_PRDID1 CHAR(4),
    in p_RTCRD     CHAR     (6),
    in p_USRFLD1     CHAR     (6),
    in p_USRFL10     SMALLINT,
    in p_TOTSPTORD     INTEGER,
    in p_CMT char(136),
    in p_ROTID CHAR(20),
    in p_Aux1 varchar(15),
    in p_Aux2 varchar(15),     
    in p_Aux3 varchar(15),      
    in p_Aux4 varchar(15),
    in p_Aux5 varchar(15),
    out o_ORDID varchar(15)
    And i calling the SP from my AppModuleImpl java class like this:
    getDBTransaction().createStatement(0).getConnection().prepareCall("CALL ordenes.XXMOR_Ords(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
    i am using this convention to pass the parameters:
    Integer = setInt
    Smallint = setShort
    Char and Varchar = setString
    and getString for the output:
    But i only recibe this exception everytime i try to run the SP: java.sql.SQLException: Parameter type not valid.
    Can anyone help me ! ?
    Ty, regards from Mexico.

    I am using Stored procedure and that is working fine in Oracle
    This is my XI Request structure :
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:read_PROC_GET_ACTIVE_ESIIDS xmlns:ns0="http://reliant.com/xi/BMFR2">
    - <statement>
    - <PROC_GET_ACTIVE_ESIIDS action="EXECUTE">
      <table>TCS.PKG_BMF_MANAGE_SERVICE_DATA.PROC_GET_ACTIVE_MF_ESIIDS</table>
      <in_bmf_partner_id isInput="true" type="VARCHAR">994</in_bmf_partner_id>
      <in_esids isInput="true" type="CLOB">1008901001155950587100:1008901001155950545100:1008901001155950671100:1008901001155950114100</in_esids>
      </PROC_GET_ACTIVE_ESIIDS>
      </statement>
      </ns0:read_PROC_GET_ACTIVE_ESIIDS>
    This is oracle Stored procedure signature :
    PROCEDURE PROC_GET_ACTIVE_ESIIDS
    in_bmf_partner_id           IN   kss_activity_stg_curr_stat.BMF_PARTNER_ID%TYPE,
    in_esids                    IN   CLOB,
    out_recordset               OUT  sys_refcursor
    Let me know if you need any further information.
    Thanks,
    Hetal

  • Problem with Stored Procedure exection in Oracle DB

    Hi,
    I am facing some problem while creating and executing a store procedure.
    Please help me solving my problem.
    Here are the details :
    My Store Procedure :
    PROCEDURE EMP2
    (PROCESSED IN VARCHAR2 ) AS
    BEGIN
    SELECT * FROM EMPLOYEE WHERE PROCESSED ='NO'
    UPDATE EMPLOYEE SET PROCESSED='YES' WHERE PROCESSED='NO'
    COMMIT;END EMP;
    Now I want to execute this SP with the statement,
    EXECUTE EMP2('NO');
    But When I execute this statement, it prompts with this error :
    Error: java.sql.SQLException: ORA-00900: invalid SQL statement
    , SQL State: 42000, Error Code:
    Please help me to solve this issue with high priority.
    Regards,
    Vara.

    surely this is not the case :)
    SQL> create or replace PROCEDURE EMP_PROC
    (P_PROCESSED IN VARCHAR2 ) AS
    BEGIN
    for i in (SELECT * FROM EMP WHERE PROCESSED = P_PROCESSED)
    loop
         UPDATE EMPLOYEE SET PROCESSED='YES' WHERE PROCESSED='NO' and employee.empno=i.empid;
    end loop;
    COMMIT;
    END;
    /  2    3    4    5    6    7    8    9   10 
    Procedure created.
    SQL> exec EMP_PROC('NO');
    PL/SQL procedure successfully completed.

  • JDBC Sender With Stored Procedure & Context Handeling

    Hi All,
    In my scenario i am using stored Procedure in JDBC sender adapter for Fetching data,
    I am fetching data from 3 tables kepping a one key element Exampkle  <matnr> for each value in this <matnt> in table 1 i will fetch the corresponding records in table 2 and 3 ...
    how can i use context in mapping such a sender structure to hendle the emplty value ...give me some idea...
    if any one has come across such situation plz help me ....it very urgent .
    thanks
    Shakif

    Hi,
    Follow this
    /people/siva.maranani/blog/2005/05/21/jdbc-stored-procedures
    JDBC adapter
    /people/saravanakumar.kuppusamy2/blog/2005/01/19/rdbms-system-integration-using-xi-30-jdbc-senderreceiver-adapter
    stored procedure
    /people/sriram.vasudevan3/blog/2005/02/14/calling-stored-procs-in-maxdb-using-sap-xi
    Helpful link
    http://help.sap.com/saphelp_nw04/helpdata/en/45/023c41325fa831e10000000a1550b0/frameset.htm
    Might help you..
    vasanth.

  • Calling Stored Procedures through JDBC

    Hello!
    I would like to implement a call to a stored procedure through JDBC. This call I suppose to embed in JavaBean to import Bean as model.
      A) Shoud this call be implemented inside ordinaly JavaBean or inside EJB?
      B) How can I determine DataSource? Is it possible through JNDI?
      C) Is there any tutorials or examples?
      D) Could anybody give some code texts on this theme?

    we use quite a similar architecture here (2 ORACLE DBs, a DB link from one instance to the other). However, we use the db links in functions (not in stored procedures). but a simple select using the db link also works with JDBC. do you use the very same db instances / schemas / users+passwords on all your different test environments? so far, we havent' noticed any problems with ORACLE queries (stored procedures, functions, etc.) that work in sqlplus/worksheet but not with JDBC. do you use the latest ORACLE JDBC drivers (9.2.0.3)?

  • How to use Stored Procedures in JDBC sender side and receiver side

    Hello,
    Can anyone explain how to use stored procedures in configuring the scenario using JDBC adapter at bothe sides sender nad receiver..
    Thanks,
    Soorya

    Hi,
    Refer the below link:
    JDBC:
    Receiver JDBC scenario MS access - /people/sameer.shadab/blog/2005/10/24/connecting-to-ms-access-using-receiver-jdbc-adapter-without-dsn
    /people/sap.user72/blog/2005/06/01/file-to-jdbc-adapter-using-sap-xi-30 --> for jdbc receiver: file -JDBC
    Stored Procedures-
    /people/siva.maranani/blog/2005/05/21/jdbc-stored-procedures
    http://www.ics.com/support/docs/dx/1.5/tut6.html
    /people/sriram.vasudevan3/blog/2005/02/14/calling-stored-procs-in-maxdb-using-sap-xi
    http://www.ics.com/support/docs/dx/1.5/tut6.html
    http://java.sun.com/docs/books/tutorial/jdbc/basics/sql.html
    http://www.sqlteam.com/article/stored-procedures-an-overview
    HI in the message mapping structure u need to specify the different action and also u need to specify the procedure name.
    refer the below link which has all the associated action
    http://help.sap.com/saphelp_nw04s/helpdata/en/22/b4d13b633f7748b4d34f3191529946/frameset.htm
    Chirag

  • How to call pl/sql stored procedure in JDBC query dialogbox

    Hi,
    how to call pl/sql stored procedure in JDBC query dialogbox(reports 9i) .
    Cheers,
    Raghu

    please refer : Re: problem If you have more doubts, please ask in that question.

  • Creating and calling stored procedure using jdbc

    When I try to create and call a stored procedure using JDBC a very confusing error message about non-existence of the procedure just created is thrown. Using Informix database (IDS 10). Any pointers to point out what am doing wrong would be great!
    Thanks
    import java.io.FileNotFoundException;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    import java.sql.Statement;
    import java.util.Scanner;
    public class CreateStoredProc {
    public static void main(String args[]){
    if (0 == args.length)
    return;
    try {
    Class.forName("com.informix.jdbc.IfxDriver");
    Connection conn = DriverManager.getConnection("jdbc:informix-sqli://10.76.244.120:30000/sampledb:INFORMIXSERVER=krisunda;user=root;password=cisco");
    String q = " create procedure runproc() "+
    " define i int; "+
    " let i = 0; "+
    " end procedure; "+
    " execute procedure runproc(); ";
    Statement stmt = conn.createStatement ();
    stmt.execute (q);
    } catch (Exception e) {
    e.printStackTrace();
    The stack trace:
    java.sql.SQLException: Routine (runproc) can not be resolved.
    at com.informix.jdbc.IfxSqli.a(IfxSqli.java:3204)
    at com.informix.jdbc.IfxSqli.E(IfxSqli.java:3518)
    at com.informix.jdbc.IfxSqli.dispatchMsg(IfxSqli.java:2353)
    at com.informix.jdbc.IfxSqli.receiveMessage(IfxSqli.java:2269)
    at com.informix.jdbc.IfxSqli.executeExecute(IfxSqli.java:2157)
    at com.informix.jdbc.IfxSqli.executeExecute(IfxSqli.java:2132)
    at com.informix.jdbc.IfxResultSet.b(IfxResultSet.java:378)
    at com.informix.jdbc.IfxStatement.a(IfxStatement.java:1299)
    at com.informix.jdbc.IfxStatement.executeImpl(IfxStatement.java:1269)
    at com.informix.jdbc.IfxStatement.c(IfxStatement.java:989)
    at com.informix.jdbc.IfxStatement.execute(IfxStatement.java:875)
    at CreateStoredProc.main(CreateStoredProc.java:37)
    Caused by: java.sql.SQLException
    at com.informix.util.IfxErrMsg.getSQLException(IfxErrMsg.java:373)
    at com.informix.jdbc.IfxSqli.E(IfxSqli.java:3523)
    ... 10 more

    DriverManager.getConnection("jdbc:informix-sqli://10.76.244.120:30000/sampledb:INFORMIXSERVER=krisunda;user=root;password=cisco");check with ur sys admin wheather the particular user in the database has >execute privilage(rights) also.i mean execute the SP in the DB level.I guess that a root user will have the enough right.
    String q = " create procedure runproc() "+
    " define i int; "+<" let i = 0; "+
    " end procedure; "+
    " execute procedure runproc(); ";
    Statement stmt = conn.createStatement ();
    stmt.execute (q);Try to use the following code:
    String q = " create procedure runproc() "+
    " define i int; "+
    " let i = 0; "+
    " end procedure; "
    Statement stmt = conn.createStatement ();
    stmt.execute (q);
    q=" execute procedure runproc(); ";
    stmt.execute (q);
    Because maybe the driver failed to precompile your sql once, so that nothing happen.

  • Problem with storing and retriving a different langauge font in mysql

    hi,
    i have problem with storing and retriving a different character set in
    mysql database ( for example storing kannada font text in database)
    it simply store what ever typed in JTextField in database in the
    formate ??????????? and it showing ???????? .
    please what can i do this problem.
    thanks
    daya

    MySQL does not know about what type of Font you use or store. that is applicatioon specific. All it knows is the character set that you are storing and the data type and data. THere are something you should know when working with database and Java:
    1. make sure you know what character set is used for the database table.
    2. make sure you know what character set is used by Java (default to UTF-8 ..
    sort off - there are few character that it cannot save). You can enforce the
    character set being sent to the database by the String's getBytes(String charsetName) method.
    3. make sure the application you use to view the table use the correct character set
    if it use a different character set, then any character that it does not recogized
    will be replaced with a quetion mark '?'....eventhough the data is correct.

Maybe you are looking for