Problem when trying the Stored Procedures in JDBC receiver side

Hi,
I am facing some problem when i am trying to configure a scenario in the receiver side of JDBC adpater.
We have never got stored procedures to work as messages go in 'Delivering'   status always. It's as if control never gets back to the adapter engine after the stored procedure call is made by the JDBC adapter. Then I went to checkt in the IE where the message has successfuly sent. Then I went to check
in AE where the message is in "Delivering" state for long time.
So checked the Default trace File and Thread dumps.
In Thread dumps, i found a strange thing like one thread is hanging on condition wait at the below location :
  at java/lang/StringCoding.getEncoder(StringCoding.java:331(Compiled Code))
  at java/lang/StringCoding.encode(StringCoding.java:472(Compiled Code))
  at java/lang/String.getBytes(String.java:651(Compiled Code))
  at com/sap/aii/adapter/jdbc/SAXHandler.constructResponseStream(xml2sql.java:841(Compiled Code))
  at com/sap/aii/adapter/jdbc/SAXHandler.SQLcallStmt(xml2sql.java:988)
Can you please help me in solving this issue as it is very critical to me ?
Thanks,
Prakash.

Dear Prakash,
   There are number of reasons for SAX error. May be structure is not well defined, statement is not written correctly. These following links help you to solve your issue.
     SQL Queries(JDBC sendor CC)
     Oracle DB - XI - SQL DB
     JDBC Scenerio.
Regards,
JP.

Similar Messages

  • Java Stored Procedure / connection JDBC / Server Side / Client Side

    Hi,
    I would like to know if we can know at the runtime with a JDBC api if the stored procedure is running in client side or in server side ?
    THANKS

    You wrote
    "Java stored procedures -- by definition - are stored in the 8i rdbms. !!"
    From the Oracle8i Java Stored Procedures Developer's Guide
    Release 8.1.5
    A64686-01
    "If you create Java class files on the client side, you can use loadjava to upload them into the RDBMS. Alternatively, you can upload Java source files and let the Aurora JVM compile them. In most cases, it is best to compile and debug programs on the client side, then upload the class files for final testing within the RDBMS"
    This means that you can create shared classes that are used on both the client and server side. The source does not need to reside within the server (according to their documentation). Please also note the following from the Oracle8i JDBC Developer's Guide and Reference Release 8.1.5 A64685-01 for using the getConnection() method on the server:
    "If you connect to the database with the DriverManager.getConnection() method, then use the connect string jdbc:oracle:kprb:. For example:
    DriverManager.getConnection("jdbc:oracle:kprb:");
    Note that you could include a user name and password in the string, but because you are connecting from the server, they would be ignored."
    So if you're coding a shared class that is to run on both the client and server side, you might do something like this:
    Connection conn =
    DriverManager.getConnection(
    System.getProperty("oracle.server.version") == null
    ? "jdbc:oracle:thin:@hostname:1521:ORCL"
    : "jdbc:oracle:kprb:"),
    "youruserid","yourpassword");
    As stated earlier, the userid and password are supposedly ignored for server connections retrieved in this manner. I haven't tried this yet, but it is documented by Oracle.
    Regards,
    Steve
    null

  • How to modify oracle stored procedure for JDBC Receiver Adapter?

    Hi all.
    This is Urgent.
    Scenario is
      SELECT a TABLE with procedure and update column with it,
      then send data to SAP System with RFC Adapter.
    When I executed a sync bpm, scenario was finished internal error.
    Pls, let me know how to correct procedure using JDBC Receiver Adapter?
    Regrds all.
    Procedure Code -
    SET SERVEROUTPUT ON
    CREATE OR REPLACE PROCEDURE zwtn2
    IS
       v_seller_company      wtnivhd.seller_company%TYPE;
       v_invoice_no      wtnivhd.invoice_no%TYPE;
       v_report_date     wtnivhd.report_date%TYPE;
       v_customs_date     wtnivhd.customs_date%TYPE;
       v_ap_post_date     wtnivhd.ap_post_date%TYPE;
       v_gr_date          wtnivhd.gr_date%TYPE;
    CURSOR l_cursor IS
       SELECT seller_company,
              invoice_no,
              report_date,
              customs_date,
              ap_post_date,
              gr_date
         FROM wtnivhd
        WHERE wtn_send_flag = 'N'
          AND rownum < 31
    FOR UPDATE;
    BEGIN
       OPEN l_cursor;
       LOOP
         FETCH l_cursor
          INTO v_seller_company,
               v_invoice_no,
               v_report_date,
               v_customs_date,
               v_ap_post_date,
               v_gr_date;
         EXIT WHEN l_cursor%NOTFOUND;
         UPDATE wtnivhd
            SET wtn_send_flag = 'Y' 
           WHERE CURRENT OF l_cursor;
       END LOOP;
    CLOSE l_cursor;
    END zwtn2;

    Hi Alex,
    plz have a look to Runtime Workbench / Adapter Monitoring to find an error message.
    Regards,
    Udo

  • Problem in invoking the stored procedure

    Hi,
    I am trying to invoke a stored procedure thru java jdbc. The SP works if I execute it directly.
    declare P_RECORDSET1 SYS_REFCURSOR := null;
    begin
    USER1.USER_DELEGATE_PKG.GET_ACCOUNTS (P_RECORDSET1,'APP',74908,null,'Y',null);
    end;
    In the java code, I do the following
    final String sql = "{CALL USER1.USER_DELEGATE_PKG.GET_ACCOUNTS(?,?,?,?,?,?)}"
    cstmt = conn.prepareCall(sql);
    cstmt.registerOutParameter(1, OracleTypes.CURSOR);
    cstmt.setString(2, "APP");
    cstmt.setInt(3, 74908);
    cstmt.setObject(4, null);
    cstmt.setString(5, "Y");
    cstmt.setObject(6, null);
    When I execute this query, I get the Invalid SQL exception. Not really able to make out whats wrong with this query...Any clues?
    Thanks

    Alright, now I am able to atleast invoke the SP, but getting the error
    Failed to execute GET_ACCOUNTS.Message is ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'GET_ACCOUNTS'
    The procedure declaration is PROCEDURE get_accounts (
    param1 OUT T_CURSOR,
    param2 IN VARCHAR2,
    param3 IN NUMBER,
    param4 IN APP.KEY_ARRAY_T,
    param5 IN VARCHAR2,
    param6 IN APP.KEY_INT_ARRAY_T

  • Problem in executing the stored procedure

    I am trying to execute the following procedure which is used to capture data from 4 different tables:
    The table structure is as follows with the sample data:
    AREA
    ======
    area_id area_type preferred_name
    A1 Country India
    A2 State AP
    A3 Country Finland
    A4 State Finland's State
    A5 Country USA
    T_CREATE_STAGE
    =============
    we_name we_num country_nm state_nm operator
    B1 C1 A1 A2 O1
    B1 C2 A3 A4 O1
    ASSOCIATE
    ==========
    ba_name busi_associate
    ABC O1
    XYZ O2
    The IN-Paremeters of the procedure takes the Country name & State name (Prefered Name in table AREA) Operator Name (ba_name in table ASSOCIATE), at a time at least one parameter would come as Input and that could also be a Wild Card search.
    The problem is that in the following procedure the query is taking the first match and returning it infinite times. Please suggest a suitable way to run the query in the procedure so that it returns the appropriate result.
    CREATE OR REPLACE PROCEDURE proc_new_search (
    p_recordset OUT sys_refcursor,
    countryName VARCHAR2 ,
    stateName VARCHAR2 ,
    opName VARCHAR2 ,
    fieldName VARCHAR2
    AS
    BEGIN
    DECLARE
    BEGIN
    OPEN p_recordset FOR 'select b.preferred_name,d.preferred_name,a.we_name,a.we_num,c.ba_name,'
    || 'a.fluid_type,e.preferred_name FROM T_CREATE_STAGE a, AREA b,AREA d,AREA e,ASSOCIATE c '
    || 'where (upper('''||countryName||''') IS NULL or instr(b.preferred_name, upper('''||countryName||''') ) > 0) AND a.country_nm = b.area_id AND b.area_type=''COUNTRY'' AND b.active_ind=''Y'''
    ||' AND (upper('''||opName||''') IS NULL or instr(c.ba_name,upper('''|| opName||''') ) > 0) AND a.operator = c.busi_associate'
    ||' AND (upper('''||stateName||''') IS NULL or instr(d.preferred_name,upper('''|| stateName ||''') ) > 0) AND a.province_state = d.area_id AND d.area_type=''STATE_PROVINCE'' AND d.active_ind=''Y'''
    || ' AND (upper('''||fieldName||''') IS NULL or instr(a.field, upper('''||fieldName||''' )) > 0) ';
    END;
    Thanks in advance,
    Regards,
    Priya

    OK, I have extracted the SQL from the code you posted. I notice that there are FIVE tables in the FROM clause of the SQL:
    FROM T_CREATE_STAGE a,
           AREA b,
           AREA d,
           AREA e,
           ASSOCIATE cwhereas there are only THREE join-conditions joining FOUR tables [5th table AREA e has not been joined with any of the tables]:
    /* other conditions in the WHERE clause are filters, not table joins */
           AND a.country_nm = b.area_id
           AND a.operator = c.busi_associate
           AND a.province_state = d.area_idIn order to get valid expected result from a query involving FIVE tables, at least FOUR joins are required. *[ in a query involving N tables, at least N-1 joins are required ]*. Otherwise, the result will have duplication and hence will not be valid/as-expected.
    So add a join involving AREA e table with other(s) and see if this improves the result.
    HTH

  • 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

  • Store procedure in JDBC Receiver adapter

    Hi,
    I am calling stored procedure using jdbc reeciver adapter . showing below error. In oracle database it is under functions not in the procedure. functions and stored procedure are same? is it should be create under procedure?
    error message:
    Message processing failed. Cause: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'GET_ALL_SALESREPINFO' (structure 'statement'): java.sql.SQLException: ORA-06550: line 1, column 7: PLS-00221: 'GET_ALL_SALESREPINFO' is not a procedure or is undefined ORA-06550: line 1, column 7: PL/SQL: Statement ignored
    Sql query:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns1:TerritoriesAndSalesRepsRequest xmlns:ns1="http://allergan.com/TerritoriesAndSalesRepsServiceList/1.0">
    <statement><GET_ALL_SALESREPINFO action="EXECUTE">
    <P_REP_LOGIN isInput="1" type="VARCHAR">sdfsfd</P_REP_LOGIN>
    </GET_ALL_SALESREPINFO>
    </statement></ns1:TerritoriesAndSalesRepsRequest>
    oracle function
    DECLARE
         RETURN_VALUE BEACONDM_ETL.ACCT_TABLE_TYPE;
         P_ZIP_CODE VARCHAR2(2000) := '-';
    BEGIN
         RETURN_VALUE := BEACONDM_ETL.GET_ACCT_INFO(P_ZIP_CODE);
         --DBMS_OUTPUT.PUT('RETURN_VALUE: ');
         --DBMS_OUTPUT.PUT_LINE(RETURN_VALUE);
         DBMS_OUTPUT.PUT('P_ZIP_CODE: ');
         DBMS_OUTPUT.PUT_LINE(P_ZIP_CODE);
    END;
    GO
    DECLARE
         RETURN_VALUE BEACONDM_ETL.SALESREP_TABLE_TYPE;
         P_REP_LOGIN VARCHAR2(2000) := '-';
    BEGIN
         RETURN_VALUE := BEACONDM_ETL.GET_ALL_SALESREPINFO(P_REP_LOGIN);
         --DBMS_OUTPUT.PUT('RETURN_VALUE: ');
         --DBMS_OUTPUT.PUT_LINE(RETURN_VALUE);
         DBMS_OUTPUT.PUT('P_REP_LOGIN: ');
         DBMS_OUTPUT.PUT_LINE(P_REP_LOGIN);
    END;
    GO
    Please send me if you have any blogs for calling stored procedure using jdbc receiver adapter.

    Hi Madhu,
    >>>I am calling stored procedure using jdbc reeciver adapter . showing below error. In oracle database it is under functions not in the procedure. functions and stored procedure are same? is it should be create under procedure?
    Of course there is difference between Oracle functions & Stored procedures:
    Re: Populating DropdownByKey by accessing backend
    As far as i know and have configured and used Stored procedures with the JDBC adapter, it can be used with Oracle stored procedures (leave it to the experts to comment on the Oracle functions part). So if you change it to stored procedure then it should work fine.
    You may then define your Message structure as follows:
    http://help.sap.com/saphelp_nw73/helpdata/en/44/7b72b2fde93673e10000000a114a6b/content.htm
    And you may also like to refer the following blog on stored procedures:
    PI  JDBC Stored Procedure test scenario
    Hope this helps. Regards, Gaurav

  • 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

  • Error while executing the stored procedure through sender JDBC adapter

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

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

  • I got problem when trying to contact my iphone 4 using facetime,it did ringing,but my iphone 4 did not receive that call as if nothing happen.But,when the call ended,that call appeared in the missed call list.fyi both are connected to internet.

    i got problem when trying to call my iphone 4 using facetime with my Macbook Pro 13',it did ringing,but my iphone 4 did not receive that call as if nothing happen.But,when the call ended,that call appeared in the missed call list.fyi both are connected to internet.Help!! thank you in advance

    i got problem when trying to call my iphone 4 using facetime with my Macbook Pro 13',it did ringing,but my iphone 4 did not receive that call as if nothing happen.But,when the call ended,that call appeared in the missed call list.fyi both are connected to internet.Help!! thank you in advance

  • I am having the problem when trying to take a panorama picture.   It may only take the first frame or doesn't even start at all when I press the shutter button. even though when i  hold the phone straight up and down, so that camera is at the top

    I am having the problem when trying to take a panorama picture. 
    It may only take the first frame or doesn't even start at all when I press the shutter button.
    even though when i  hold the phone straight up and down, so that camera is at the top on the back and the home button is on the bottom on the front.
    This problem is irritating me....?

    To take panorama
    - ensure that the panorama option is on
    - press the shutter button once
    - you will see a line with an arrow
    - move around in a circle  ( I keep the camera steady and turn myself around in a circle)
    - as you do this you will see the arrow moving across the screen as it captures pictures
    - at the end of the capture, you will be able to see your panorama picture
    I hope that this helps, do report back.

  • How do i deactivate a device through icloud if the device is broken and i am unable to turn on find my iphone? Also i do not own a apple id as ive been using a family members due to problems when trying to make one?

    How do i deactivate a device through icloud if the device is broken and i am unable to turn on find my iphone? Also i do not own a apple id as ive been using a family members due to problems when trying to make one?

    Hey tyjox,
    Thanks for the question. After reviewing your post, it sounds like you need to deactivate Find My iPhone on a device that does not work. You will need to work with the family member of the account the iPhone is registered with. I would recommend that you use this article to help you resolve or isolate the issue.
    iCloud: Remove your device from Find My iPhone
    http://support.apple.com/kb/PH2702
    Remove an iOS device you no longer have
    If you no longer have the iOS device because you gave it away or sold it, you need to remotely erase it before you can remove it.
    Sign in to icloud.com/#find with your Apple ID (the one you use with iCloud).If you’re using another iCloud app, click the app’s name at the top of the iCloud.com window, then click Find My iPhone.
    Click All Devices, then select the device.
    Click Erase [device], then enter your Apple ID password. Because the device isn’t lost, don’t enter a phone number or message.If the device is offline, the remote erase begins the next time it’s online. You’ll receive an email when the device is erased.
    When the device is erased, click Remove from Account.All your content is erased and someone else can now activate the device.
    Thanks for using Apple Support Communities.
    Have a nice day,
    Mario

  • I am using Lightroom 5 and am hapy about it, but recently I hav encountered a problem when trying to edit an image in another program, i.e. Elements. I used the clone tool, saved the result and went back to Lightroom to open the image there. I did find a

    I am using Lightroom 5 and am hapy about it, but recently I hav encountered a problem when trying to edit an image in another program, i.e. Elements. I used the clone tool, saved the result and went back to Lightroom to open the image there. I did find a second copy, but this is identic with the one I already had in Lightroom, and I can see noe result of the clone process.

    At the moment I would say it is uncertain whether Acrobat is completely ignoring the change, or whether the changes you are making aren't affecting the ink density. I have a suggestion for a test you could make to see which is the case.
    When editing in Photoshop just add a box or mark on the image, for your tests.
    - If this box does not appear in Acrobat, you know Acrobat is not seeing the edit
    - If this box does appear in Acrobat, you know the problem is that your tool for changing ink densities is not taking effect.

  • I'm getting this problem when trying to update my iphone 3gs it says that the iphone software could not be contacted and I went on youtube got some advise to go into my hard drive to fix the error I have nothing in my host file please help me if you can

    I'm getting this problem when trying to update my iphone 3gs it says that the iphone software could not be contacted and I went on youtube got some advise to go into my hard drive to fix the error I have nothing in my host file please help me if you can this is all new to me.

    Read this: iOS 4: Updating your device to iOS 5 or later
    ... oh I think it is a 3gs or a 3
    This makes a difference. What does it say in Settings > General > About?

  • Invalid Object when Calling Stored Procedure from JDBC Adapter

    JDBC Outbound adapter in XI 2.0 connected to SQL Server.  I've coded my mapping to format the XSL mapping properly but the Adapter appears to not be able to find the Stored Procedure.  Error message returned is "Invalid Object spStoredProcedureName".
    Does anybody have any clue as to what I'm missing???

    I know this is trivial, but did you use the "full" name of the SP as <schema>.<procname>???
    HTH

Maybe you are looking for

  • Hp Pavilion Dv6 7029wm my recovery is no longer a program its just a folder

    I was going to use my recovery but it is no longer usable its just a folder called recovery inside the D drive  please help...

  • How to manage plug-ins in Mail

    At some point, I have installed an application (Antidote) which help to correct a french text. When I start my computer I have a message from Mail saying "Incompatible Plug-in disabled, Antidote - PJ". Mail won't start until I click on OK to acknowle

  • Force eject a cd

    a CD is stuck in my macbook pro, it keeps running and there is no reaction when I press the eject key..... How can I force/eject the CD?

  • Laptop pads/coolers recommendations

    I use my laptop primarily on my lap (hense the term laptop) but with the macbook it gets a little toasty after a few hours of use. I have not gotten up the nerve to reapply the thermal grease, void the warranty and based upon this link the results ar

  • Updating from a lower SKU to a higher SKU; do you uninstall?

    At work I've got VS 2013 Professional. I might be going to 2013 Ultimate (hopefully). Assuming I do what's the correct procedure for upgrading from an lower VS SKU to a higher VS SKU? Should I uninstall the Professional before installing Ultimate? Or