JDBC sender adapter - driver problems

Hi.
Iu2019m struggling with a little problem regarding the JDBC sender adapter, querying an Oracle database.
Iu2019m making a simple SELECT statement, where one of the fields is of the typeu201DTIMESTAMP(0) WITH LOCAL TIMEu201D.
Making the query in a SQL client works just fine, but in the JDBC sender adapter, it generates this error u201DError during conversion of query result to XML: java.sql.SQLException: Session Time Zone not set!u201D
Iu2019ve searched for answers on numerous forums, and found one place, where the following where the solution:
>>> Hi. The issue is that the driver itself needs to have a time zone
>>> set. You have to call setSessionTimeZone() on the connection object.
Unfortunately it is a bit hard to call this function in the adapter.
Any of you guys have an idea what to do?
I can add, that making a query, where no date fields are selected, works fine in the adapter.
Regards...
Peter

Problem solved...
Put a conversion (CONCAT, SUBSTR, TO_CHAR, etc.) around the date field you are about to fetch, and it works just fine.

Similar Messages

  • Problem with JDBC Sender adapter

    hi guys!
    I´ve problem in PI 7.0, with the JDBC Sender Adapter, execute select sentence and update status in Oracle database.
    In RWB Message Monitoring and SXMB_MONI I can't see any message.
    Someone have any idea how to fix it?
    Thanks in advance.

    Hi David,
    First check on the sender communication channel, if no data has been picked up by PI on channel,
    then check the configuration of channel in the ID, especially select query.
    If that is ok, then ask the sender application team(oracle database team) to run the query on their side
    and to check if they are getting any data.
    There could be the possibility of error in data also.
    -Supriya.

  • JDBC Sender Adapter to Oracle Server

    Hi Friends,
    Iam using JDBC Sender Adapter to connect to Oracle Server. I have mentioned all the parameters in the Configuration(sender communication channel) correctly.My Adapter Monitoring in RWB shows a message that "Processing finished successfully"...But I cannot see the data in SXMB_MONI. I mean the data is not getting picked from the Database..I have worked on the similar scenario previously and it was working fine...
    I have specified the datatype structure correctly.
    resultset
    >row
    >>field1
    >>field2
    wat is the problem.
    regards,
    raju...

    Hi,
    Can you check the following,
    1. Check the SELECT query in your Sender JDBC adapter. Does it actually return any rows?
    2. The values enterd for Documentname and DocumentNamespace in your Sender JDBC adapter. You have to enter the name of the Datatype and the namespace in these fields.
    3.Have you enterd these details while doing the  adapter configuration,
    <b>jdbc:oracle:thin:@<IP adress>:<listener port>:<instance name (database name)>
    Driver oracle.jdbc.driver.OracleDriver</b>
    Regards,
    Bhavesh

  • JDBC Sender Adapter - Records sent one at a time

    Hello everyone,
    Here's a summary of my scenario JDBC > XI > RFC.
    My select statement (JDBC) looks like this:
    SELECT * FROM BATCH WHERE STATUS='Y'
    The problem is, whenever it returns multiple rows, the RFC can only accept one record at a time (1...1), so I need to pick up the records from the DB and send them one at a time.
    Currently, this is how the output XML looks like:
    <?xml version="1.0" encoding="utf-8" ?>
      <ns:SQL_RESP_MT xmlns:ns="http://www.pharmaindustries.com">
      <row>
      <number>200000000472</number>
      <status>Y</status>
      </row>
      <row>
      <number>200000000473</number>
      <status>Y</status>
      </row>
      <row>
      <number>200000000474</number>
      <status>Y</status>
      </row>
    </ns:SQL_RESP_MT>
    Instead, I need each row to be picked up and sent one at a time.
    <?xml version="1.0" encoding="utf-8" ?>
      <ns:SQL_RESP_MT xmlns:ns="http://www.pharmaindustries.com">
      <row>
      <number>200000000472</number>
      <status>Y</status>
    </ns:SQL_RESP_MT>
    <?xml version="1.0" encoding="utf-8" ?>
      <ns:SQL_RESP_MT xmlns:ns="http://www.pharmaindustries.com">
      <number>200000000473</number>
      <status>Y</status>
      </row>
    </ns:SQL_RESP_MT>
    <?xml version="1.0" encoding="utf-8" ?>
      <ns:SQL_RESP_MT xmlns:ns="http://www.pharmaindustries.com">
      <number>200000000474</number>
      <status>Y</status>
      </row>
    </ns:SQL_RESP_MT>
    Does anyone know the changes I need to make in my current SELECT statement or the JDBC Sender Adapter to make this possible.
    Thanks in advance!
    Glenn

    Thank you all for your replies. I'll check out your link in a bit, Phani. Thanks!
    A SpliByValue won't work since the BAPI Header is (1...1).
    Luckily, during testing, I found out that the BAPI (BAPI_PRODORDCONF_CREATE_TT) handles multiple lines in one of the subelements of the header so that was where I mapped the Rows.
    I might need to trigger multiple BAPIs in the future, so I'll take a good look at your suggestions, but for now, I'm marking this question answered.
    Warm regards,
    Glenn

  • PI 7.1 JDBC sender adapter huge load from DB select

    Hi,
    We have the problem that the JDBC sender adapter is selecting a huge amount of data from a Oracle DB. The Adapter seems to be able to cope the load but when sending to the integration server it causes problems. We found values to adjust but I dont think increasing them is a good solution.
    My question is:
    Is there any way to send the data in blocks with using the PI standard JDBC adapter ?
    Thank you and regards,
    Andreas

    Hi,
    You can use the below parameter in JDBC sender.
       Specify additional Parameter Names and Parameter Values in the table.
    Due to messages of large size it may cause issue
    Following are the parameters to be set in the table to limit the message size per polling:
    ●      msgLimit :
    ●      maxMsgSize :  SAP note 1253826.
    ●      maxRowSize : SAP note 1253826.
    Additional parameters are published in SAP Note 801367.
    Refer the link.
    Defining Additional Parameters in Advanced mode
    http://help.sap.com/saphelp_nw73/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/content.htm

  • JDBC sender adapter outofmemory error

    Dear friends,
    We are getting following error on JDBC sender Adapter: Error during conversion of query result to XML: java.lang.OutOfMemoryError: Java heap space (failed to allocate 1073741848 bytes)
    I have read blogs where there have been suggestions to limit the amount of data picked by using WHERE condition and not using SELECT *
    In our scenario we are creating GL IDOCs . In SQL when PI picks it up it needs to get all the corresponding Header and line items together. We cannot randomly pick 1000 records at a time. The SQL table has 500,000 rows in the following format
    H H H  L1 L1 L1
    H H H L2 L2 L2
    H H H  L3 L3 L3
    H1 H1 H1 L1 L1 L1
    H1 H1 H1 L2 L2 L2
    H1 H1 H1 L3 L3 L3
    Please let me know how can we solve this issue?
    Thank you,
    Teresa
    Edited by: Teresa lytle on Sep 27, 2011 3:13 PM

    If you are using oracle database, uses ROWNUM field to fetch first set of records and you can update those records with the flag as true.
    similarly If you are using MS SQL database, uses SELECT TOP command to fetch first set of records and you can update those records with the flag as true.
    Like File/FTP adapter, the next poll interval would be as scheduled. The Administrator can then alter the table contents, to ensure lesser no of records are picked up.
    Here You need to limit the no of rows if you again face the problem. Please chec the SAP Note
    https://websmp230.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=1296819

  • JDBC Sender Adapter Error

    HI Friends,
    I have configured the JDBC Sender Adapter with parameters as
    Driver : oracle.jdbc.driver.OracleDriver
    Connection : jdbc:oracle:thin:system:netweaver:@172.25.4.221:1521
    But Iam getting an error in Componenet Monitoring:
    <b>History:
    - 2006-05-30 04:55:36 UTC: Error: Stopped unexpectedly - reconfigure and activate to continue processing. Error: java.lang.NullPointerException
    - 2006-05-30 04:55:36 UTC: Processing started</b>
    How to resolve this??
    Regards,
    Raju

    Hi
    Thanks for the reply.
    I tried with <b>jdbc:oracle:thin:@172.25.4.221:1521:netweaver</b> and
    <b>jdbc:oracle:thin:@172.25.4.221:1521:system</b>
    Now Iam getting another error.
    <b>Sender Adapter v2108 for Party '', Service 'TBIT40_XI_LEGACY_BS_04':
    Configured at 2006-05-30 05:12:30 UTC
    History:
    - 2006-05-30 05:13:00 UTC: Retry interval started. Length: 20.000 s
    - 2006-05-30 05:13:00 UTC: Error: Accessing database connection 'jdbc:oracle:thin:@172.25.4.221:1521:system' failed: DriverManagerException: Cannot establish connection to URL 'jdbc:oracle:thin:@172.25.4.221:1521:system': SQLException: Io exception: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=153093376)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4))))
    - 2006-05-30 05:13:00 UTC: Processing started</b>
    Can U please solve it..
    regards,
    Raju

  • JDBC Sender select/update problem

    Hi all,
    we have a serious problem. We are running the scenario JDBC>XI>RFC. In the JDBC sender adapter we do a select statement (select * from table where flag='0') and an update statement (update * from table set flag ='1' where flag='0'). Now, the problem is that when we do the select statement a third party system may insert data in the database, so the update statement updates MORE rows than the select statement has selected.
    Does anyone knows a solution (or a workaround).
    TIA

    Hi peter,
    can you check the transcation isolation level of your Database?
    one option would be to make the database transaction such that the write transaction gets locked when even the READ is being done. So, when your JDBC is trying to select the data from the database, the WRITE will get locked and so, no entries will get selected and then, UPDATE will get executed.
    Though I havent tried this, wouldnt it be possible?
    Also, go through the help documentation and check the Adavanced Setting and the Transaction Isolation and see if any of the XI options can also solve your problem.
    Regards,
    Bhavesh

  • JDBC Sender Adapter - SQL-Statement

    Hi,
    I'm using the JDBC-Sender-Adapter and need to use a SQL-Statement like this:
    SELECT * FROM myTable WHERE myDate = <current_date>
    Is such a dynamic-sql possible, or can I only use static sql-statements. And if yes how can I solve this problem.
    many thx

    Hi Werner,
    inside the <b>Query SQL Statement</b> you can use <b>SQL EXECUTE</b>
    which can execute a stored procedure
    in which you can do
    SELECT * FROM myTable WHERE myDate = <current_date>
    http://help.sap.com/saphelp_nw04/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/content.htm
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions">XI FAQ - Frequently Asked Questions</a>

  • Update- statement in JDBC sender Adapter

    Hi ,
    I have a requirement where I am trying to fetch data from ODS based on some flag and immediately I want to update the flag status . So I used selected and update in JDBC sender adapter .
    But I have one question , in the small timeframe where  XI has done a select and just before  XI could  issue the update statement  if a new record is added to ODS . Then  that new record will also get updated though it wasnot selected in select statement .
    Can someone let me know how to overcome this problem ; as I want to make sure I update only those recrods which are selected in select statement ??
    Thanks & Regards,
    Suvarna

    Hi,
    Check out the following thread. It gives the exact answer to this question.
    JDBC Sender Update Query
    One of the replies in the above thread:
    I put in an OSS note asking this exact question with your specific example, and got a reply. I was referred to OSS note 0000831162, where it is explained very unambiguously that the SELECT and UPDATE queries are run in the same transaction.
    Regards,
    P.Venkat
    Message was edited by:
            Venkataramanan

  • Jdbc sender adapter  hangs and starts showing "Processing Started" forever

    Dear ,
              We are facing some issues with jdbc sender adapter channel on production system
              Environment : XI 3.0 SP 20 + HP-UX 11.23 ia64 + Oracle 10.2
    Sometimes it hangs and starts showing "Processing Started" forever on communication channel monitoring .
    There is no error log for this.
    If i stop it and then start it , no use.
    If i copied this to a new one then it works.
    I have found few SAP note like 1078420,1083488 , but my system is already at higher patch level.
    Can you please advise me something as we are facing in production frequently.
    Regards,
    Sandeep

    Hi Sandeep,
    This problem even we too faced in our project and thought of many stupid things finally found that the JDBC adapter is LOCKED.
    Check in the Visual Admin >Cluster> "LOCKING ADAPTER"
    we get a option of Display Locks .Check for an entry with
    NAME : $XIDBAD.JDBC2XI
    reset the locks and restart the CC ,now it works fine.
    Note 1083488 - XI FTP/JDBC sender channel stop polling indefinitely(04/04S)
    Thanks
    Sudharshan

  • JDBC Sender Adapter -  NOT FETCHING RECORDS -PROCESSING STARTED

    Hello all,
    I have set up a JDBC sender adapter .With polling interval as 30 Seconds. Polling is done successfully
    but it does not fetch the records .
    Valid Data is present in the tables.In the Communication Channel Monitoring log shows :
    "Processing Started"
    after each poll interval.
    Adding to this , it was working fine  with the same parameters two days back.
    I have enabled the Driver Trace but didnot get any information from Trace.
    How to resolve this issue?Any help
    Regards
    Ganga Prasad

    Hello maheshwari,
    Valid Data is there & many records are there to be fetched.
    One more thing  Normally in the Communication Channel Monitoring
    for an JDBC adapter even if there are no records to fetch we get the Log information in detail that :
    Polling interval started.
    Processing finished successfully
    Processing started
    Polling interval started.
    Processing finished successfully
    Processing started
    But here in my case am getting only : (polling interval : is 60 Seconds)
            2/5/08 8:29:19 AM           Processing started
         2/5/08 8:28:19 AM           Processing started
         2/4/08 3:34:54 PM           Processing started
         2/4/08 3:33:54 PM           Processing started
    One more observation is that my poll interval is 60 seconds but now it is polling after every 120sec
           2/5/08 11:17:31 AM           Processing started
         2/5/08 11:15:31 AM           Processing started
         2/5/08 11:13:31 AM           Processing started
         2/5/08 11:11:31 AM           Processing started
    I have tried refreshing Cache but no change .
    Regards
    Prasad

  • JDBC sender adapter: Update before mapping

    Dear all,
    following scenario:
    in a database we have a field called "statpi". We pick all messages that have statpi =  0 and
    update the data record to statpi = 1 via UPDATE function in JDBC sender adapter.
    Every select statement is limited to 100 data records for each message in PI.
    But if one data record is wrong and the mapping failed, of course the complete mapping failed.
    My problem: The update function of the JDBC sender adapter has already updated the
    data records, although they didn't have been send to target system.
    What I need is following thing: The adapter should send the messages and after PI has mapped
    the message and send it to target system, the UPDATE command should be executed.
    In my opinion, this is only possible with BPM, but I am not familiar with Advanced mode in JDBC
    sender adapter and "Transaction isolation level". Is there any workaround for this?
    Thanks
    Regards
    Chris

    Stefan Grube wrote:>
    > What happens, when new values have entered db meanwhile?
    The job that change the DB will be fixed on a certain time. We need to configure
    Availability Time Planning to be sure, that we start our select at another time.

    > > In ideal case the data records are still in statpi=0 and get picked up after
    > > the database team has fixed the problem and the adapter polls again.
    >
    > If the flag is not set, the JDBC adapter would poll the same data again and again.
    The adapter should poll every hour. Of course we will have some errors before the
    support is able to fix this problem, but because of one message each hour this should
    not be the main problem.
    > - You could do following: pass the values with an error flag, so you can handle this in receiver application,
    I am using the function formatNumber for the field that could raised the error. But to chekc if I am able
    to do a workaround here and let the target system fix the error sounds like an interessting possibility.
    > - Do a split mapping and create a file where you drop any wrong lines
    Also interessting. You mean that all "good" record should be mapped to struc1 and the bad one to struc2.
    I am thinking of how to determine which record is wrong. Perhaps with an UDF that checks for this special
    error.
    > - Use XML validation in sender adpter, so the messages are not processed.
    You are full of good ideas. I am not using validation yet and the mentioned field is define as string, but that
    is changeable. A good possibility to check the new capability of 7.1.
    > - use a stored procedure in DB whee you check data quality to send out.
    not sure what this is, but I will discuss with DB team.

  • JDBC sender adapter - 3 calls in PO 7.4

    Hi Experts,
    I have a scenario to fetch database records from ORACLE database using SAP PO 7.4 - JDBC adapter
    There are 3 calls to make in order to fetch the data
    a) Call a procedure before the fetch
    b) fetch the record
    c) Call another procedure after the fetch
    How can we achieve this ?
    thx
    mike

    Hi All,
    I am opening this up for a follow up qs on this topic. Is it true that we can't directly invoke a stored procedure from PI 7.4 sender JDBC adapter for retrieving data from ORACLE DB and we have to rely on table functions.
    I was looking at some blogs on sender JDBC stored procedure calls for SAP PI 7.1/7.3/7.4
    Executing stored procedure from Sender adapter in SAP PI 7.1
    Oracle Table Functions and JDBC Sender Adapter
    And the note Michael was referring to 941317 - XI / PI JDBC Adapter: Known Problems / Incompatibilities  has the following piece of code for invoking a stored procedure from a package function returning collection of elements.
               ---------- pkg1 ----------
    CREATE PACKAGE pkg1 AS
      TYPE numset_t IS TABLE OF NUMBER;
      FUNCTION f1(x NUMBER) RETURN numset_t PIPELINED;
    END pkg1;
    CREATE PACKAGE BODY pkg1 AS
    -- FUNCTION f1 returns a collection of elements (1,2,3,... x)
    FUNCTION f1(x NUMBER) RETURN numset_t PIPELINED IS
      BEGIN
        FOR i IN 1..x LOOP
          PIPE ROW(i);
        END LOOP;
        RETURN;
      END;
    END pkg1;
    ---------- pkg1 ----------
               This function has to be invoked from the sender channel configuration (SELECT statement) as follows:
               SELECT * FROM TABLE(pkg1.f1(5));
    If I can't call stored procedure directly from PI sender JDBC adapter in 7.4,
    I have to ask the Oracle DB guy to write a stored procedure which wraps all 3 procedures into one and again wrap it up using the package functions as well if required. So, please let me know.
    thx
    mike

  • Fundamnental question on jdbc sender adapter

    Hi ,
    I have a scneario like
    DB System „³ JDBC Adapter „³ XI  -„³ RFC Adapter „³ SAP R/3 --„³ True „³ response thru same RFC adapter „³ XI BPM will call JDBC Apdapter with Update statement
                                                                                    False „³ response thru same RFC Adapter „³ XI BPM will call File adapter with Append
    now when i use send jdbc adapter , i wld need to have a status flag in my database which would be update when ever data is transmitted sucessfully else the same data would always be picked up .
    i want to know do i need to create a reciever jdbc adapater too for this . because when ever i use sender jdbc adapter and this must be a very common situation . that i have to update the table so that the rows are not picked up again . jdbc senser  has an update statement . writtng an updtae query will it not solve my problem.

    Hi Amit,
    A JDBC sender adapter has 2 essential fields,
    1. SQL Statement
    2. Update Statement
    Your SQL statement will contain your SELECT statement and once your SQL statement is executed, UPDATE statement is executed. This is done so that records that have been selected by the SQL statement should not be selected again as the JDBC sender adapter will poll over the database for every poll interval.
    If you want to SELECT something from your Database, then you will have to go for a JDBC sender adapter.
    But, if you want to insert/update your Database, then you can go for a JDBC receiver adapter.
    Multiple insertions are possible for a JDBC receiver, but multiple Selection queries (different select queries) are not possible for a single JDBC sender adapter.
    Just check these links to understand how JDBC adapters work,
    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/content.htm">Configuring the Sender JDBC Adapter</a>
    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/content.htm">Configuring the Receiver JDBC Adapter</a>
    A few initial steps required to be followed for your Scenario are:
    1. Then create a sender agreement using jdbc o/b interface.
    In receiver determination specify ur bpm as receiver.
    In interface determination specify the abstract interface tht u created for jdbc.
    (u should copy the jdbc interface and then create abstarct interfce of it)
    No receiver agreement required for BPM.
    2. Create receiver determination, using BPM and the abstract interface for legacy tht u created,
    Receiver as legacy system.
    Create Interface determination and receiver agreements.
    Also see through this blog which talks about <a href="/people/saravanakumar.kuppusamy2/blog/2005/01/19/rdbms-system-integration-using-xi-30-jdbc-senderreceiver-adapter sender and receiver adapters</a>
    Regards,
    Abhy

Maybe you are looking for