JDBC adapter Commit/Rollback

Hi Guys, I got a question regarding JDBC adapter auto commit. Hopefully you guys can help me :). Until now, when my XI calling a storedprocedure in ORACLE using JDBC adapter, it will automatically commit the calling. When i see my configuration for the JDBC adapter receiver, the checkbox for Enable Autocommit is thicked. My question is, is there anyway that we handle the commit or rollback ourself. How we can handle that? Is it from the BPM or just from the Configuration.
Thank you very much in advance for all replies, advices and answer. Cheers guys..

Hi
Try this out
You can programmatically set auto commit to true as in follows
// Load the Oracle JDBC driver
DriverManager.registerDriver(new oracle.jdbc.OracleDriver());
// Connect to the database
// You can put a database hostname after the @ sign in the connection URL.
Connection conn =
      DriverManager.getConnection ("jdbc:oracle:oci:@", "scott", "tiger");
// It's faster when auto commit is off
<b>conn.setAutoCommit (true); </b>
// Create a Statement
Statement stmt = conn.createStatement ();
regards
krishna

Similar Messages

  • JDBC Adapter-Implicit COMMIT--Need to have 1 Transaction

    Hi,
    I am on XI 3,SP9. We are trying to delete all the records from the table first and then Insert Records into the table.
    I have definted seperate Statements for the Database Table Delete and INSERT in my XML Schema for the Receiver JDBC Adapter.
    The Problem: After Deleting if there is an Error in the INSERT the Adapter does NOT do a Rollback but it Auto-commits.
    Can someone tell me how do I stop this? I want to bundle both the Delete and Insert into 1 transaction.
    Here is the output XML from the adpater:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns:root xmlns:ns="urn:genentech:xi:fin_int_056:costcenters:sap_to_adaytum">
    - <StatementName1>
      <FI_OUT_COST_CENTER action="DELETE" />
      </StatementName1>
    + <StatementName2>
    - <FI_OUT_COST_CENTER action="INSERT">
    - <access>
      <COST_CENTER_ID>0001</COST_CENTER_ID>
      <COST_CENTER_NAME>Standard Hierarchy CO Area 0001</COST_CENTER_NAME>
      <PARENT_ID />
      <ELEMENT_LEVEL>0</ELEMENT_LEVEL>
      <TYPE>G</TYPE>
      <START_DATE>19970101</START_DATE>
      <CLIENT>200</CLIENT>
      </access>
      </FI_OUT_COST_CENTER>
      </StatementName2>
    - <StatementName2>
    + <FI_OUT_COST_CENTER action="INSERT">
    - <access>
      <COST_CENTER_ID>0001-1</COST_CENTER_ID>
      <COST_CENTER_NAME>Administration</COST_CENTER_NAME>
      <PARENT_ID>0001</PARENT_ID>
      <ELEMENT_LEVEL>1</ELEMENT_LEVEL>
      <TYPE>G</TYPE>
      <START_DATE>19970101</START_DATE>
      <CLIENT>200</CLIENT>
      </access>
      </FI_OUT_COST_CENTER>
      </StatementName2>
    - <StatementName2>
    - <FI_OUT_COST_CENTER action="INSERT">
    + <access>
      <COST_CENTER_ID>0001-1-1</COST_CENTER_ID>
      <COST_CENTER_NAME>Executive</COST_CENTER_NAME>
      <PARENT_ID>0001-1</PARENT_ID>
      <ELEMENT_LEVEL>2</ELEMENT_LEVEL>
      <TYPE>G</TYPE>
      <START_DATE>19970101</START_DATE>
      <CLIENT>200</CLIENT>
      </access>
      </FI_OUT_COST_CENTER>
      </StatementName2>
    + <StatementName2>
    - <FI_OUT_COST_CENTER action="INSERT">
    - <access>
      <COST_CENTER_ID>SAP-DUMMY</COST_CENTER_ID>
      <COST_CENTER_NAME>SAP dummy</COST_CENTER_NAME>
      <PARENT_ID>0001-1-1</PARENT_ID>
      <ELEMENT_LEVEL>3</ELEMENT_LEVEL>
      <TYPE>C</TYPE>
      <START_DATE>19970101</START_DATE>
      <CLIENT>200</CLIENT>
      </access>
      </FI_OUT_COST_CENTER>
      </StatementName2>
    Thanks
    Ashish

    If an exception occurs in XI 3.0 the JDBC adapter doesn't actually issue a ROLLBACK. It just closes the connection. The problem is that Oracle will then  COMMIT this since the connection was explicitly closed (as opposed to dropped) even if Auto-commit is turned off at the DB level.
    SAP has let us know that they will fix this by including the ROLLBACK. It will be included in SP11.
    Thanks,
    J

  • RECEIVER JDBC ADAPTER----ROLLBACK IN XI

    Hi Gurus,
    I have a scenario with the receiver as JDBC adapter.If there is any error in updating to Database during the interface flow,how do Rollback occurs in XI???
    Please help......
    Regards,
    Sriparna

    Hi Sripam1,
    select SQL statement 'batch mode' ,
    i.e,
    see
    8. Defining Parameters in Advanced Mode
       6. If you want to collect SQL statements in a batch, select Batch Mode.
    of the SAP online help
    [Configuring the Receiver JDBC Adapter|http://help.sap.com/saphelp_nwpi711/helpdata/en/48/465581929734d9e10000000a42189d/content.htm]
    Also ensure that 'Database Auto-Commit-Enabled (No Transaction Handling)' is not enabled.
    Regards
      Kenny

  • SOA does not commit to database using type 4 JDBC adapter.

    We are using Oracle SOA suite 11.1.1.3 and have successfully configured a type 4 JDBC adapter "ViaServ" to enable polling. These kinds of adapter are configured in the SOA suite as non X Data Source adapters and transaction has been set to "Supports Global" with the Logging Last Resource option.
    We also created the connection pool to for this Data sources. The Polling SQL for logical delete (SELECT) is working great and the After read SQL Update is happening successfully. Some how the updates are not being committed to the database. The process is not throwing any exceptions/errors etc.
    I shall really appreciate help.
    thanks

    SOLVED:
    1.) The JDBC type 4 adapter was installed in the WLS HOME/lib directory and SOA server/modules/ext directory.
    2.) Change the setComEnv.sh, modify the WLS_CLASSPATH variable to point to the WLS_HOME/lib/jadbcjarfile.jar
    3.) Restart admin servers and managed server.

  • UPDATE statement in Receiver JDBC adapter

    Hi all,
    I would like to use UPDATE statement in my receiver JDBC adapter and would like to know how this UPDATE statement works in following case.
    1) If i have 10 records to be updated in database, whether Commit happens at the end of all 10 records updation OR it will be for every record update?
    Regards

    Hi,
    Then let me construct my query this way...
    i have 10 records that needs to be updated to database, say For Ex: 7 records are updated successfully and 8th record has issue in updating the table.
    In this case i would like to ROLLBACK entire 10 records with out committing any thing.
    So if i use your 2nd option, it should perform as i expected right?
    Regards

  • DatabaseTransaction Handling--JDBC Adapter

    Hi,
    I am on XI 3,SP9. We are trying to delete all the records from the table first and then Insert Records into the table.
    I have definted seperate Statements for the Database Table Delete and INSERT in my XML Schema for the Receiver JDBC Adapter.
    The Problem: After Deleting if there is an Error in the INSERT the Adapter does NOT do a Rollback but it Auto-commits.
    Can someone tell me how do I stop this? I want to bundle both the Delete and Insert into 1 transaction. Any help would be appreciated.
    Here is the output XML from the adpater:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns:root xmlns:ns="urn:genentech:xi:fin_int_056:costcenters:sap_to_adaytum">
    - <StatementName1>
    <FI_OUT_COST_CENTER action="DELETE" />
    </StatementName1>
    + <StatementName2>
    - <FI_OUT_COST_CENTER action="INSERT">
    - <access>
    <COST_CENTER_ID>0001</COST_CENTER_ID>
    <COST_CENTER_NAME>Standard Hierarchy CO Area 0001</COST_CENTER_NAME>
    <PARENT_ID />
    <ELEMENT_LEVEL>0</ELEMENT_LEVEL>
    <TYPE>G</TYPE>
    <START_DATE>19970101</START_DATE>
    <CLIENT>200</CLIENT>
    </access>
    </FI_OUT_COST_CENTER>
    </StatementName2>
    - <StatementName2>
    + <FI_OUT_COST_CENTER action="INSERT">
    - <access>
    <COST_CENTER_ID>0001-1</COST_CENTER_ID>
    <COST_CENTER_NAME>Administration</COST_CENTER_NAME>
    <PARENT_ID>0001</PARENT_ID>
    <ELEMENT_LEVEL>1</ELEMENT_LEVEL>
    <TYPE>G</TYPE>
    <START_DATE>19970101</START_DATE>
    <CLIENT>200</CLIENT>
    </access>
    </FI_OUT_COST_CENTER>
    </StatementName2>
    - <StatementName2>
    - <FI_OUT_COST_CENTER action="INSERT">
    + <access>
    <COST_CENTER_ID>0001-1-1</COST_CENTER_ID>
    <COST_CENTER_NAME>Executive</COST_CENTER_NAME>
    <PARENT_ID>0001-1</PARENT_ID>
    <ELEMENT_LEVEL>2</ELEMENT_LEVEL>
    <TYPE>G</TYPE>
    <START_DATE>19970101</START_DATE>
    <CLIENT>200</CLIENT>
    </access>
    </FI_OUT_COST_CENTER>
    </StatementName2>
    + <StatementName2>
    - <FI_OUT_COST_CENTER action="INSERT">
    - <access>
    <COST_CENTER_ID>SAP-DUMMY</COST_CENTER_ID>
    <COST_CENTER_NAME>SAP dummy</COST_CENTER_NAME>
    <PARENT_ID>0001-1-1</PARENT_ID>
    <ELEMENT_LEVEL>3</ELEMENT_LEVEL>
    <TYPE>C</TYPE>
    <START_DATE>19970101</START_DATE>
    <CLIENT>200</CLIENT>
    </access>
    </FI_OUT_COST_CENTER>
    </StatementName2>
    Thanks
    Ashish

    Hi,
    I have XI 3.0 with SP10 Installed.
    We do not have the JDBC Transaction handling enabled.
    So how did it work for you? I do not have the Auto-Commit  checkbox enabled.
    Here is my sample xml:
    If there is any error in the INSERT, THE DELETE does NOT rollback. Please advice.
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns18:root xmlns:ns18="urn:genentech:xi:fin_int_010:wbs:sap_to_adaytumroot">
    - <statement1>
    - <db_fi_out_wbs action="DELETE">
      <table>FI_OUT_WBS</table>
      </db_fi_out_wbs>
      </statement1>
    - <statement2>
    - <db_fi_out_wbs action="UPDATE_INSERT">
      <table>FI_OUT_WBS</table>
    - <access>
      <OBJECT_TYPE>P</OBJECT_TYPE>
      <PROJECT_TYPE />
      <ELEMENT_ID>100</ELEMENT_ID>
      <ELEMENT_NAME>ASHISH SINGH</ELEMENT_NAME>
      <PARENT_ID />
      <SEARCH1 />
      <SEARCH2 />
      <KRON />
      <LABR />
      <CLIENT>200</CLIENT>
      <DATE_CREATED>28-Feb-2005</DATE_CREATED>
      </access>
    - <key>
      <OBJECT_TYPE>P</OBJECT_TYPE>
      <ELEMENT_ID>100</ELEMENT_ID>
      <CLIENT>200</CLIENT>
      </key>
      </db_fi_out_wbs>
      </statement2>
    - <statement2>
    - <db_fi_out_wbs action="UPDATE_INSERT">
      <table>FI_OUT_WBS</table>
    - <access>
      <OBJECT_TYPE>P</OBJECT_TYPE>
      <PROJECT_TYPE />
      <ELEMENT_ID>1000</ELEMENT_ID>
      <ELEMENT_NAME />
      <PARENT_ID />
      <SEARCH1 />
      <SEARCH2 />
      <KRON />
      <LABR />
      <CLIENT>200</CLIENT>
      <DATE_CREATED>28-Feb-2005</DATE_CREATED>
      </access>
    - <key>
      <OBJECT_TYPE>P</OBJECT_TYPE>
      <ELEMENT_ID>1000</ELEMENT_ID>
      <CLIENT>200</CLIENT>
      </key>
      </db_fi_out_wbs>
      </statement2>
    - <statement2>
    - <db_fi_out_wbs action="UPDATE_INSERT">
      <table>FI_OUT_WBS</table>
    - <access>
      <OBJECT_TYPE>P</OBJECT_TYPE>
      <PROJECT_TYPE />
      <ELEMENT_ID>10000</ELEMENT_ID>
      <ELEMENT_NAME>SY Test</ELEMENT_NAME>
      <PARENT_ID />
      <SEARCH1 />
      <SEARCH2 />
      <KRON />
      <LABR />
      <CLIENT>200</CLIENT>
      <DATE_CREATED>28-Feb-2005</DATE_CREATED>
      </access>
    - <key>
      <OBJECT_TYPE>P</OBJECT_TYPE>
      <ELEMENT_ID>10000</ELEMENT_ID>
      <CLIENT>200</CLIENT>
      </key>
      </db_fi_out_wbs>
      </statement2>
    - <statement2>
    - <db_fi_out_wbs action="UPDATE_INSERT">
      <table>FI_OUT_WBS</table>
    - <access>
      <OBJECT_TYPE>W</OBJECT_TYPE>
      <PROJECT_TYPE>01</PROJECT_TYPE>
      <ELEMENT_ID>10000</ELEMENT_ID>
      <ELEMENT_NAME>SY Test</ELEMENT_NAME>
      <PARENT_ID />
      <SEARCH1 />
      <SEARCH2 />
      <KRON />
      <LABR />
      <CLIENT>200</CLIENT>
      <DATE_CREATED>28-Feb-2005</DATE_CREATED>
      </access>
    - <key>
      <OBJECT_TYPE>W</OBJECT_TYPE>
      <ELEMENT_ID>10000</ELEMENT_ID>
      <CLIENT>200</CLIENT>
      </key>
      </db_fi_out_wbs>
      </statement2>
    - <statement2>
    - <db_fi_out_wbs action="UPDATE_INSERT">
      <table>FI_OUT_WBS</table>
    - <access>
      <OBJECT_TYPE>W</OBJECT_TYPE>
      <PROJECT_TYPE>01</PROJECT_TYPE>
      <ELEMENT_ID>10000.01</ELEMENT_ID>
      <ELEMENT_NAME>SY Test</ELEMENT_NAME>
      <PARENT_ID>10000</PARENT_ID>
      <SEARCH1>U Field 2</SEARCH1>
      <SEARCH2 />
      <KRON />
      <LABR />
      <CLIENT>200</CLIENT>
      <DATE_CREATED>28-Feb-2005</DATE_CREATED>
      </access>
    - <key>
      <OBJECT_TYPE>W</OBJECT_TYPE>
      <ELEMENT_ID>10000.01</ELEMENT_ID>
      <CLIENT>200</CLIENT>
      </key>
      </db_fi_out_wbs>
      </statement2>
    - <statement2>
    - <db_fi_out_wbs action="UPDATE_INSERT">
      <table>FI_OUT_WBS</table>
    - <access>
      <OBJECT_TYPE>W</OBJECT_TYPE>
      <PROJECT_TYPE>01</PROJECT_TYPE>
      <ELEMENT_ID>10000.01.0001</ELEMENT_ID>
      <ELEMENT_NAME>SY Test</ELEMENT_NAME>
      <PARENT_ID>10000.01</PARENT_ID>
      <SEARCH1>U Field 2</SEARCH1>
      <SEARCH2 />
      <KRON />
      <LABR />
      <CLIENT>200</CLIENT>
      <DATE_CREATED>28-Feb-2005</DATE_CREATED>
      </access>
    - <key>
      <OBJECT_TYPE>W</OBJECT_TYPE>
      <ELEMENT_ID>10000.01.0001</ELEMENT_ID>
      <CLIENT>200</CLIENT>
      </key>
      </db_fi_out_wbs>
      </statement2>
    - <statement2>
    - <db_fi_out_wbs action="UPDATE_INSERT">
      <table>FI_OUT_WBS</table>
    - <access>
      <OBJECT_TYPE>W</OBJECT_TYPE>
      <PROJECT_TYPE>01</PROJECT_TYPE>
      <ELEMENT_ID>10000.01.0001.0001</ELEMENT_ID>
      <ELEMENT_NAME>SY Test</ELEMENT_NAME>
      <PARENT_ID>10000.01.0001</PARENT_ID>
      <SEARCH1>U Field 2</SEARCH1>
      <SEARCH2 />
      <KRON />
      <LABR />
      <CLIENT>200</CLIENT>
      <DATE_CREATED>28-Feb-2005</DATE_CREATED>
      </access>
    - <key>
      <OBJECT_TYPE>W</OBJECT_TYPE>
      <ELEMENT_ID>10000.01.0001.0001</ELEMENT_ID>
      <CLIENT>200</CLIENT>
      </key>
      </db_fi_out_wbs>
      </statement2>
    - <statement2>
    - <db_fi_out_wbs action="UPDATE_INSERT">
      <table>FI_OUT_WBS</table>
    - <access>
      <OBJECT_TYPE>P</OBJECT_TYPE>
      <PROJECT_TYPE />
      <ELEMENT_ID>10001</ELEMENT_ID>
      <ELEMENT_NAME>2H7 Immunology</ELEMENT_NAME>
      <PARENT_ID />
      <SEARCH1 />
      <SEARCH2 />
      <KRON />
      <LABR />
      <CLIENT>200</CLIENT>
      <DATE_CREATED>28-Feb-2005</DATE_CREATED>
      </access>
    - <key>
      <OBJECT_TYPE>P</OBJECT_TYPE>
      <ELEMENT_ID>10001</ELEMENT_ID>
      <CLIENT>200</CLIENT>
      </key>
      </db_fi_out_wbs>
      </statement2>
    - <statement2>
    - <db_fi_out_wbs action="UPDATE_INSERT">
      <table>FI_OUT_WBS</table>
    - <access>
      <OBJECT_TYPE>P</OBJECT_TYPE>
      <PROJECT_TYPE />
      <ELEMENT_ID>10002</ELEMENT_ID>
      <ELEMENT_NAME>SY Test</ELEMENT_NAME>
      <PARENT_ID />
      <SEARCH1 />
      <SEARCH2 />
      <KRON />
      <LABR />
      <CLIENT>200</CLIENT>
      <DATE_CREATED>28-Feb-2005</DATE_CREATED>
      </access>

  • DuplicateMessageExc in Snder JDBC Adapter although succesfull in SXMB_MONI

    Hi Experts,
    I am getting "com.sap.engine.interfaces.messaging.api.exception.DuplicateMessageException: Message Id 5b72a60b-b0e2-48f0-3701-cdb67ac1c5b2(OUTBOUND) already exists in duplicate check table: com.sap.sql.DuplicateKeyException: ORA-00001: unique constraint (SAPSR3DB.SYS_C00149397) violated  "  as well as   "Error during commit or rollback of database transaction: 'com.sap.aii.af.service.util.transaction.api.TxManagerException: Unable to commit transaction: The transaction has been rolled back: com.sap.engine.services.ts.transaction.TxRollbackException'   in the Sender JDBC Adapter. 
    The message is processed successfully in ABAP stack . I have stopped and started the relevant Communication channel from RWB however the message is   continually processed by the adapter with error.  Please assist , how to cancel the message.

    This error relates to a  JDBC sender adapter on a SAP PI 7.11 SP6 system.
    We have identified a problem with this particular interface. CC_JDBC_Send_FrontOffice_RJ35_NFE_CREATE. A specific message, b72a60b-b0e2-48f0-3701-cdb67ac1c5b2, continues to be sent. SAP PI is then rejecting the message as its unable to commit the record processing to an internal table and rolling back the transaction.
    When checking NWA Java logs we found the following error:
    Module Exception 'com.sap.aii.af.lib.mp.module.ModuleException: senderChannel 'ce6444c858cb3a9baef6b39c35f79106': Catching exception calling messaging system' found, cause: com.sap.engine.interfaces.messaging.api.exception.DuplicateMessageException: Message Id 5b72a60b-b0e2-48f0-3701-cdb67ac1c5b2(OUTBOUND) already exists in duplicate check table: com.sap.sql.DuplicateKeyException: ORA-00001: unique constraint (SAPSR3DB.SYS_C00149397) violated
    So it appears that SAP PI attempts to update an internal table with the status of the message and fails due to duplicate records. In other words SAP PI knows its already processed the message. This message continues to be sent to the adapter for processing and continues to fail.
    How can we stop this message being procesed?

  • The Question Set about JDBC Adapter

    Hello Experts,
    I have some confusion about the JDBC Adapter as below, pls help me :
    1. While the JDBC Sender Channel is executing the select statement then I interrupt it, if the ResultSet ought to have 5000
        records, so I stop the Channel that it just can select 3000 records.
        I wanna know if the 3000 records will go ahead to the Receiver Channel ?
    2.If there are 7000 records ought to insert DB via JDBC Receiver Channel, but I interrupt the Receiver Channel when it is
       running, now there are 4000 records have be insert DB (I know it doesnt commit, because I dont choose the option of
       u201CAuto-Commit-Enabledu201D in the Communication Channel), then what will occur ??
       a rollback? or commit? or other circs?
    3.By the way, the sender channel have sent some Msgs but the receiver channel is stopped now, I dont wanna the
       Receiver Channel getting the Msgs when start the Receiver channel, how can I get the goal?
    THX for ur time and effort,
    Brian

    Hi Brain,
    3.By the way, the sender channel have sent some Msgs but the receiver channel is stopped now, I dont wanna the
    Receiver Channel getting the Msgs when start the Receiver channel, how can I get the goal?
    In order to achieve this go to RWB --> Message Monitoring --> Search your Messages and Cancel all the Messages before you START the Reciever Channel.
    Once the messages are canceled.....you can START the Reciver Channel it will not receive them.
    Cheers
    Dhwani

  • Error in JDBC Adapter Configuration....

    Hi,
      My scenario is like this FTP->XI->Oracle Database.
    The problem is that the files are not getting posted to the database though it is running well.
    In XI receiver comm channel in JDBC adapter, I have provided the Connection path as   jdbc:oracle:thin:@esealmw275.al.sw.ericsson.se:1521:S14. Whereas in channel monitoring it is taking jdbc:oracle:THIN:@esealmw275.al.sw.ericsson.se:1521:S14. Please note it is taking THIN as in caps.
    Can anybody suggest me is this the proposed error for that, if it is so, then pls provide me the suitable solution for that.
    BR
    Soumya

    Hi Soumya,
    Have a look at ths blog...
    <a href="/people/sap.user72/blog/2005/06/01/file-to-jdbc-adapter-using-sap-xi-30 to JDBC Adapter using SAP XI 3.0</a> by Anirban Ghatak
    Also have a look at this wiki
    https://wiki.sdn.sap.com/wiki/display/XI/JDBCTOJDBC
    Regards
    Santi
    <a href="Remember to set the thread to solved when you have received a solution to set the thread to solved when you have received a solution</a>
    Where There is a <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/weblogs?blog=/weblogs/topic/16">blog</a> there is a Way.

  • JDBC adapter - no UPDATE to database

    Hi,
    I have the scenario ABAP Proxy to XI to JDBC to read some data from a database and return some info back to BW. Is it mandatory to UPDATE the selected records in some way or can the UPDATE part of the adapter be disabled by putting something in the UPDATE parameter on the comm channel ?
    Cheers
    Colin.

    Hi Colin,
    if you are talking about a sender JDBC adapter: you can put <TEST> in the update statement.
    See this snippet from the help:
    <i>Update SQL Statement
    You have the following options:
    Enter a valid SQL statement that is to be applied to the database once the data (determined from the Query SQL Statement) has been successfully sent to the Integration Server/PCK.
    It must be an INSERT, UPDATE, or DELETE statement.
    In place of the SQL statement, you can also enter <TEST>. Once the data determined from Query SQL Statement has been successfully sent, the data in the database remains unaltered.
    This is recommended if the data has not only been read, but also changed by a stored procedure entered under Query SQL Statement.</i>
    http://help.sap.com/saphelp_nw04/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/content.htm
    If you want to synchronously call a receiver JDBC adapter, i think you can use action=SELECT without an update.
    Regards
    Christine

  • JDBC Adapter Issue

    Hi Experts,
    I have an issue with my XI JDBC adapter.  Once a job gets sent through XI (from nonSAP to XI to SAP), the JDBC adapter is required to write a confirmation in the database that the job was processed in SAP.
    When I go into my Adapter Monitor (http://system:num/AdapterFramework/) I see a red dot beside JDBC and the following error:
    Error: Transform error in xml processor class, rollback:
    ERROR:Processing request: Error when executing statement for table/stored proc. 'stfx.job_copy': com.mysql.jdbc.exceptions.MySQLNonTransientConnectionException: No operations allowed after statement closed.
    Any ideas??

    Hi Bhavesh,
    I update with the XML coming out of XI.  All I need to update is the status.  This XML currently does come out of XI and would be sent back to my database, except for the fact that the JDBC adapter goes down, and I get the originally mentioned error.  The XML looks like:
      <?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:MT_UPDATE_STATUS xmlns:ns0="http://tssi.ycdsb.ca">
    - <STATEMENTNAME>
    - <dbTableName action="UPDATE">
      <TABLE>sfx.job_copy</TABLE>
    - <access>
      <status1>DONE</status1>
      <status2>DONE</status2>
      </access>
    - <key>
      <jobId>00595593</jobId>
      <status1>NEW</status1>
      <messagenm>d3e98e294bfcd2d5d3e98e29</messagenm>
      </key>
      </dbTableName>
      </STATEMENTNAME>
      </ns0:MT_UPDATE_STATUS>
    Any ideas?

  • JDBC Adapter - Sender - Stored Procedure - SQLException Error

    Hi,
         I have created one stored procedure in our Oracle database. I give below that stored procedure.
    CREATE OR REPLACE PROCEDURE sp_stud
    IS
        l_row student%ROWTYPE;
        TYPE t_ref_cursor IS REF CURSOR RETURN l_row%TYPE;
        c_cursor t_ref_cursor;
    BEGIN
        OPEN c_cursor FOR
         SELECT *
         FROM student where readflag= ' ';
        LOOP
         FETCH c_cursor into l_row;
            EXIT WHEN c_cursor%NOTFOUND;
            DBMS_OUTPUT.PUT_LINE(l_row.id || ' : ' || l_row.name);
        END LOOP;
    close c_cursor;
    END;
    This is a procedure to retreive rows from the table student which is having the field read_flag = ' '; (Student table contains the fields ID, NAME, BIRTHYEAR, BIRTHMONTH, READFLAG).
    In JDBC Sender Adapter, I set the values for the following fields under Parameters tab.
    Query SQL Statement: EXECUTE sp_stud
    Update SQL Statement: UPDATE student SET readflag = 'Y' where readflag = ' '
    The scenario is every 5 minutes JDBC adapter checks the table whether any new row is inserted, if it is inserted and commit, it will send that record to File. This is the Scenario.
    In Runtime Workbench, Communication Channel Monitoring, it shows the following error, when JDBC Polls the table.
    Database-level error reported by JDBC driver while executing statement 'EXECUTE sp_stud'. The JDBC driver returned the following error message: 'java.sql.SQLException: ORA-00900: invalid SQL statement '. For details, contact your database server vendor.
    Note : If we execute the Stored Procedure ad SQL command level, it works fine.
    Kindly help friends to solve this, where the error is happened.
    Thanking you,
    Kind regards,
    Jegatheeswaran P.

    Hi,
    Not a Database expert. But , in case you have not seen the note pointed by Deepu,
    <i> The JDK 1.1.x, 1.2 and 1.3 versions (classes111. zip, classes12.zip, classes12.jar) of the driver are not compatible with the SAP XI JDBC Adapter. Use the JDK 1.4 driver (ojdbc14.jar) instead. For details, refer to Oracle MetaLink note # 203849.1.
               <b>Invoking Oracle stored procedures from within a JDBC sender channel is only possible for Oracle DBMS versions >= 10.2.x using so-called table functions:</b>
               Example:
    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 -
            <b>   This function has to be invoked from the sender channel configuration (SELECT statement) as follows:
               SELECT * FROM TABLE(pkg1.f1(5));</i></b>
    Check this, confirm your Oracle DB version and then use the Table Functions as described in this note.
    A Database Expert wil be able to crack this for sure.
    Regards
    Bhavesh

  • JDBC Adapter Quoting of String

    Hi everybody!
    I am posting data to a JDBC Receiver adapter using the JDBC adapter's XML format. I have configured the logging of the adapter to show the SQL commands issued to the adapter, since I received some strange errors from the database.
    I now find entries like:
    INSERT INTO  xxx (field1, field2, field3) VALUES (value1, , value3)
    Notice the "missing" value2 - the field's value is a space character (" "). However, I actually wanted to quote the values in this field, since this SQL command of course gives a syntax error because of the two consecutive commas...
    How can I quote strings in this SQL command?
    Regards, Joerg

    Hi,
    I don't know if I stated my problem clearly enough... Here is the XML document I post to the JDBC adapter:
    <root>
      <insert>
        <xxx action="INSERT">
          <field1>value1</field1>
          <field2> </field2>
          <field3>value1</field3>
        </xxx>
      </insert>
    </root>
    (note the blank character for field2's value). If I understand your answer correctly, I should use the following instead:
    <root>
      <insert>
        <xxx action="INSERT">
          <field1>'value1'</field1>
          <field2>' '</field2>
          <field3>'value1'</field3>
        </xxx>
      </insert>
    </root>
    This is somewhat inconvenient, since there might be <b>NULL</b> values as well and I'd have to code manymany <b>if</b> statements and <b>mapWithDefaults</b>, then. I was wondering if there is something like the config setting "Interpretation of Empty String Values" for NULL values, some switch I set globally in order to <i>always</i> quote a string...
    Regards,  Joerg

  • Sender JDBC Adapter in a synchronous szenario

    Hi,
    i am trying to set up following szenario:
    A JDBC Sender Adapter is polling data from a database, this data is beeing mapped to a synchronous RFC-Call to the R/3 backend. The result from the RFC-Call contains an order-number, which should be stored in the database.
    The query of the DB and the rfc-call works fine. The query is also doing the UPDATE statement to the DB, marking this line of data as beeing processed.
    The QOS in the sender-jdbc-adapter is set to "Best Effort", which should allow a synchronous communication.
    I am mapping the response of the rfc-call to a jdbc-receiver-like structure, in the monitoring i can see the rfc-result and also the message to update the databae. There are no errors in the adapter-monitoring and everything looks fine, except that the database is not beeing updated.
    Is there another messageformat for the synchronous answer to a sender-jdbc-adapter?  Or is it possible, that the commit for the answer is not beeing sent?
    We have an XI3.0 with SP16 installed.
    Thanks for your help.
    Ingo

    hi,
    you cannot use the Sender JDBC adapter to Upate.
    Create a receibver JDBC adapter with the format as mentioned and use it to update the DB.
    the steps in BPM wil be ,
    1. Receive -- for Sender JDBC adapter
    2- Send Synchronous -- RFC call synchrnous
    3 - Send -- using Receievr JDBC adapter to Insert / Update the DB.
    Do let me know if u need further info,
    regards,
    Bhavesh

  • JDBC adapter - update statement

    I have come to the conclusion that there is no direct connection between the select and update statement of a sender JDBC adapter, in terms of commit scope.
    According to SAP documentation:
    "The UPDATE statement must alter exactly those data records that have been selected by the SELECT statement. You can ensure this is the case by using an identical WHERE clause. (See Processing Parameters, SQL Statement for Query, and SQL Statement for Update below)."
    But my point is: if select statement retrieves e.g. 5 rows based on a where condition, then the update statement could find 6 rows to update, if a row was inserted a split second after the select, but before the update. Result : a row is lost...
    I don't think the select statement puts a lock on the table(s) it accesses, and releases this lock after update has been committed. This would ensure integrity between select and update statement.
    Can anybody confirm or deny this ?

    Hi,
    Have you seen the<b> Isolation level for Transaction handling</b> in the sender JDBC adapter?
    Make the Isolation level as Serializable and repeatable Read and the db gets locked  anbd until Update happens, no Insertion can occur in the Split Second!
    http://help.sap.com/saphelp_nw04/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/content.htm
    Regards,
    Bhavesh

Maybe you are looking for

  • Transporting Value mappings

    Hi, We are using the Value Mapping replication functionality to maintain Value Mappings in a PI 7.1 system. How do we transport the values we maintain from Dev to QA and beyond? Will these be visible to transport in the Integration Directory, or shou

  • Where clause with date in db2

    select * from table WHERE column1 = to_date(1998-12-21, 'YYYY-MM-DD') the columns has date in the form of 1998-12-21. I am getting the following error the error is DB2 sql 0171n the datatype, length, or value of argument "1" of routine "to_date" is i

  • Sup Error While Sending Date Parameter to SUP server?

    Hi Every one,    I am developing an iOS app using Sybase Unwired Platform 2.1.3 I am getting error While sending Date parameter to Database. How to send DATE format to the sales_order table for order_date column  from iOS. I tried like this.. @try {

  • How do I launch Premiere Pro?

    How can I make my Adobe Premiere work/launch?

  • How write a field to screen(report list) but don't display it ?

    Hi, All     How write a value to screen(report list) but don't display it ?  Because i will use this value as the user click the current line ,but i don't want to expose this value to the user.