Capturing actual JDBC exception in BPM

I have a scenario wherein i am inserting data in sql server syncronously using the xml insert structure.
I have a BPM in place to do error handling, so that whenver any exception occurs, exception branch is executed,
however, in the exception branch am not able to detect wht the error was. Like was the error related to connectivity or related to DB that something failed because of BD constraint.
How can I trap the actual JDBC error in my exception handling..

Hi,
As you are using BPM and the call is Sync,you can get the response back if everything is fine. If not it will throw exception.
If you want to detect the Application errors, one option is using Stored Procedures in the DB side, so that it will respond you back with insertion failed bacause of duplicate entry etc...
If you want to handle , exceptions for connectivity issuses, you can make use of ALerts configured for JDBC adapters.. So you can create the Alerts like that.
To know more-
http://help.sap.com/saphelp_nw2004s/helpdata/en/33/4a773f12f14a18e10000000a114084/content.htm
Hope this helps
Regards,
Moorthy

Similar Messages

  • ** Throw Exception in BPM - Webservice to JDBC

    Hi friends,
    I am doing Webservice to JDBC scenario using BPM. I am doing insert data in backend system oracle table by passing inputs from WebService. After insert data in table, JBDC returns the response to web service thru response variable 'insert_count = 1' like this. When I try to insert the same record, that is, employee no as primary key in my table,  XI throws an error 'ORA-00001 - unique constraint' in Addtional . We have to pass this information to Web Service. How will we achive this ?
    Presently in our BPM design,
    1) Exception property of the block as 'Error'.
    2) Inside Block, in Sync Send Step (BPM -> JDBC) specified 'Exception/System Error'  as 'Error'.
    3) Inserted one Exception Handler Brach. In this Brach, inserted one control step. In this step, itself we put a Control Step, the action property of this step is 'Throw Exception'. Here , what we need to set for the 'Exception Property' ..?
    Kindly help me friends.

    Hi Mahesh,
    I refered those scenarios. But, our requirment is we want to take 'Additional Text' option from SXMB_MONI and map to WS source structure one element.
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?><!-- Call Adapter --> <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1"><SAP:Category>XIServer</SAP:Category><SAP:Code area="INTERNAL">PL_TIMEOUT</SAP:Code><SAP:P1/><SAP:P2/><SAP:P3/><SAP:P4/><SAP:AdditionalText>TIME OUT REACHED</SAP:AdditionalText><SAP:ApplicationFaultMessage namespace=""/><SAP:Stack>Timeout condition of pipeline reached
    </SAP:Stack><SAP:Retry>N</SAP:Retry></SAP:Error>
    Could you kindly help me ?

  • Control step for exception in BPM

    Hi
    i am tring to learn exception in BPM.
    i inserted this Send step (Synchronous) in exception branch in block. and then inserted control step in exception branch.
    i created Errorsend as abbreviation on exception in block.
    and assigned this to system error under exceptions in send step. and then defined on Exception handler,
    and now <b>i could not define anything</b> on exception in control step for action as Throw Exception, i am not looking at Throw alert.
    i made receiver jdbc error and also mapping error in intentionally. when i see sxmb_moni, i can see jdbc error as normal process like not using exception branch.
    i would like to complete exception branch and control step for finishing touches.
    thanks
    venjamin

    hi,
    send step is for synch and jdbc,,,
    abaproxy to jdbc (sync)
    i made receiver jdbc error intentionaly. can i send back exception log to sender system program or send email to someone?
    when have you been using this function in bpm? if i am not right way.
    thanks
    venjamin

  • Throwing Runtime Exceptions from BPM. How?

    Hi !
    I want to make appear a red flag in the SXMB_MONI as a result of a custom condition inside a BPM. I tried with the control step, but it makes no "red flag".
    Should I make a transform step between 2 dummy message types with a UDF that throws the runtime exception there?? is there another way ?? We want a red flag as a result of a expired deadline while waiting a file adapter transport acknowledgement.
    Thanks !!
    Matias.

    Matias,
    As you said before you want the BPM to be errored out if it reach the deadline, am I right. In control step if u say cancel process it equivalent to logically deleting the work items, so obviously you will get an succesfull message. What I suggest you to do is in  Deadline branch - control branch select throw exception. The exception name has to be defined in Block level. So if you throw an exception it will look for the exception branch in the same block level if not the higher(super)block level, if it couldn't find the exception branch it will run out to error. Actually the exception branch is used to catch that exception and continue the rest of the process, so i think there is no need for defining the exception branch itself.
    Hope it helps you!!!
    Best regards,
    raj.

  • How to Throw/Catch Exceptions in BPM

    Hi All,
    I've seen a couple articles that talk about how to Throw/Catch an execption in a BPM. My question has two parts:
    1) RFC Call: I was able to catch an Fault Message in an exception step when calling an RFC (Synchronous Interface). What I wanted to do is use the fault message (exception) and store it in a DB for later review.
    2) IDOC: I'm sending an IDOC to R3 from a BPM. The send step is enclosed in a block w/ an exception. The send step is throwing an error (IDOC adpater system error), but the exception is never thrown. My question is: when the error occurrs at the adapter level does it still throw an exception in a BPM?
    Thanks for any tip/advice/anything!
    Fernando.

    Hi Fernando,
    1) Define a send step in the exception branch.
    2) If u send a IDoc from R/3 to XI and the IDoc adapter is running to an error of course there cant be an exception in ur business process. Usually the IDoc adapter sends back status back up via ALEAUD. In case of success IDoc should have then '03', if the adapter cannot send anything the IDoc should remain at '39'. U should send a ALEAUD in case of exception of BPM switching to status '40', in case of success to '41'.
    Regards, Udo

  • Exceptions in BPM

    I want to use Exceptions in BPM.
    In my block step I have created the Exceptions like Exceptions1 and Exceptions 2 etc.
    Now let us say if my Sender system is down then I want to use Exception1  or if the request is Bad then I want to use Exception2, how to handle it.
    Or if there is any blog that narrates about the Exceptions in BPM?

    Hi Mohini,
    You can go thro' this blog:-
    /people/michal.krawczyk2/blog/2005/03/13/alerts-with-variables-from-the-messages-payload-xi--updated
    I hope it helps.
    Regards.
    Praveen

  • SEVERE: com.mysql.jdbc.exceptions.jdbc4 : Communicat link failure

    Hi,
    I am developing web application using jsf2.0. problem is ,
    when we interact with servlet by single person, It working fine. but when we interact with servlet by more then one person at same time. server throws error
    SEVERE: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
    Last packet sent to the server was 0 ms ago.
    How to solve the problem.
    server :Glashfish v3
    db :mysql 5.0
    thanks in advance.

    You must use a connection and then immediately close it.

  • Com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException

    Hi All,
    I want to connect to a stored procedure that is on mySQL database via BPEL and Jdeveloper 11.1.1.5
    The version of the MySQL database:
    mysqld Ver 5.1.53
    I am using the following driver :
    mysql-connector-java-5.1.25-bin
    I have pointed my JDeveloper to the new driver
    By doing the following :
    JDeveloper > Tools > Manage Libraries > ...
    When I test the connection it give me a success.
    In creating a new BPEL partnerlink - DatabaseAdapter with the new Connection to the MySQL and it seems to work, when I want to select from a table.
    But when I use the option Call stored procedure or function, using the schema aci. I can see the stored procedure aci_insert but when I want to select it, I am getting the following:
    An Error occured while obtaining arguments/source code for the selected stored procedure. Verify that the database connection is valid.
    Details :
    com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown table 'parameters' in information_schema
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
    at com.mysql.jdbc.Util.getInstance(Util.java:386)
    I am selecting the aci schema, but do not know why it keep on refering to information_schema

    Seems I miss something.
    IS there only two MySQL schema ?
    One to set up from sql file from Higgins server, the other is
    automatically set up by rpps-axis. I have both schema, maybe the one from
    Higgins is not uptodate (but I think it is). Or maybe I have to set up an
    other table but I didn't read about it.
    PS :
    There is some errors with eclipse componment. It's needed to had in
    rpps-axis/WEB-INF/lib/ the following files :
    org.eclipse.runtime.IExtensionRegistry
    org.eclipse.core.runtime
    org.eclipse.equinox.common
    org.eclipse.osgi
    Don't know if needed to work.

  • RFC JDBC Exception Handling

    Hello,
    i have the following scenario:
    RFC receiver adapter (synchronous) <> XI <> JDBC receiver adapter (to MS SQL-database)
    Is it possible to catch JDBC-exceptions, e.g. "duplicate primary key" and pass it to the calling rfc adapter?
    thanks for your help
    Christian

    Hello,
    still my problem is the exception handling of the synchronous JDBC - call.
    If an error occurs I get the error "no payload found" in sxmb_moni_bpe
    I think this is a problem of where the error occur, in the SOAP header
    In sxmb_moni i get the following Error:
      <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Aufruf eines Adapters
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:Category>XIAdapterFramework</SAP:Category>
      <SAP:Code area="MESSAGE">GENERAL</SAP:Code>
      <SAP:P1 />
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText>com.sap.aii.af.ra.ms.api.DeliveryException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'KUNDEN' (structure 'STATEMENT_NAME'): com.microsoft.sqlserver.jdbc.SQLServerException: Verletzung der PRIMARY KEY-Einschränkung 'PK_Kunden'. Ein doppelter Schlüssel kann in das 'dbo.KUNDEN'-Objekt nicht eingefügt werden.</SAP:AdditionalText>
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack />
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    Has anybody got any idea where my mistake is?#
    I´m at loss.
    If you need further information, contact me. I´ll send you the required informations.
    Thanks and regards
    Christian

  • Obtaining the original JDBC exception from an EJBException?

    Hello All,
    I am using EJB3 on Glassfish using the default TopLink persistence manager. Within a Session Bean, when the persistence manager catches a DB exception, it marks the transaction to be rolled back, and throws an EJBException, in turn wrapping a RollbackException. Now I was expecting to be able to get the original jdbc exception out of the caused by exception of one of these exceptions, but it is not.
    It is important that I do retrieve the original exception, as I need to report back to the users what the problem is, and to do this I need to analyse the SQL error codes.
    Note that these are the DB exceptions caught by toplink during managed transactions (e.g. an EJB persist or merge), not exceptions thrown by our code.
    Does anyone know if it is possible to get this information from Toplink?
    Edited by: user11973327 on Oct 4, 2009 7:19 AM

    It is odd that Glassfish would throw an exception on marking the transaction for rollback, and ignore the thrown error. You might wish to check with Glassfish on this. What version of TopLink are you using? A similar issue on WLS was fixed in EclipseLink, you may wish to try the latest EclipseLink release.
    You could also call flush() in your SessionBean to obtain the real database exception.
    James : http://www.eclipselink.org : http://en.wikibooks.org/wiki/Java_Persistence

  • Shows address bar etc. but won't show the actual page, except in "full screen"u

    When I launch firefox it only shows address bar etc. but won't show the actual page, except in "full screen" view. My OS is Windows Vista.
    In other words, I get the top menu bars and the rest of the screen show my desktop background.

    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    * Don't make any changes on the Safe mode start window.
    * https://support.mozilla.com/kb/Safe+Mode
    * https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes

  • Cannot import com.mysql.jdbc.exceptions

    Hi all,
    I have a pretty simple question.
    Why it is not possible to import classes from the package com.mysql.jdbc.exceptions?
    My classpath is set up correctly I can use jdb driver to connect to my db, but if I try to import com.mysql.jdbc.exceptions I receive a compile time error
    package com.mysql.jdbc.exceptions does not exist!
    Anyone could help?
    Thanks for your attention
    By Manio

    Thankfully there is no reason for you to do this so it's really not a problem.
    You should ONLY be importing java.sql.* (and sometimes javax) but not specific driver packages.

  • Capturing actual consumption weight in delivery VF01n

    Dear All,
    I want to capture actual consumption weight i;e weight consumed in production order, needs to be captured while making delivery document by VF01N, can any expert help me on this with any BADI our user exit.
    Thanks in advance.
    Moderator message: please do your own research before asking.
    Edited by: Thomas Zloch on Jan 10, 2011 2:02 PM

    Data flow to the delivery header/delivery item is controlled by data transfer routines assigned in copy control configuration.  Modify (or copy and create new) the routines assigned in your config.  Disclaimer...I can't say whether this covers a PP scenario appropriately though; I haven't done any PP in 10 years.

  • Com.sap.db.jdbc.exceptions.JDBCDriverException:user is forced to change password

    Hi all
    I am trying to connect hana using jdbc code
    here is my code
              Class.forName("com.sap.db.jdbc.Driver");
                String url = "jdbc:sap://host:30015/?";
                String user = "Mujadid";
                String password = "Cloud123";
                System.out.println("try to connect to HANA !");
                Connection cn = java.sql.DriverManager.getConnection(url, user, password);
                System.out.println("Connection to HANA successful!");
                ResultSet rs = cn.createStatement().executeQuery("select * from _SYS_STATISTICS.STATISTICS_ALERTS");
                rs.next();
                System.out.println(rs.getString(1));
    I am facing following exception
    com.sap.db.jdbc.exceptions.JDBCDriverException: SAP DBTech JDBC: [414]: user is forced to change password: alter password required for user MUJADID
      at com.sap.db.jdbc.exceptions.SQLExceptionSapDB.createException(SQLExceptionSapDB.java:345)
    Any suggestion?

    Hi Mathan!
    now above error is esolved
    But i m facing following error when i try to read connections table from live2 schema
    com.sap.db.jdbc.exceptions.JDBCDriverException: SAP DBTech JDBC: [259] (at 20): invalid table name:  Could not find table/view CONNECTIONS in schema LIVE2
    and this table exist in LIVE2 schema
    Any suggestion?

  • JDBC Exception while calling a web-service

    Hi all,
    We are getting the following JDBC Driver Timeout Exception while calling an external web-service..
    An exception occurred while executing a transaction. Details: An error occurred while accesing the database. Detail:SQL statement: ' SELECT INSTANCEDATA, PROCESSID, INSTID, THREADID, NAME, PARENTTHREAD, PRIORITY, CREATIONTIME, AUTHOR, PARTICIPANT, NEXTPARTICIPANT, PROCESSDEADLINE, ACTIVITYDEADLINE, RECEIVETIME, ACTIVITYNAME, NTHREADS, CTHREADS, FCTHREAD, TOTALTHREADS, STATE, SOURCEACTIVITYNAME, ROLEIN, PENDINGITEMID, LASTRESULT, ITEMDEADLINE, NCHANGES , NREMARKS, NATTACHMENTS, HASPARTFORROLE,MICROACTIVITYNAME FROM PPROCINSTANCE WHERE PROCESSID = 11AND INSTID = 10 AND THREADID = 0 FOR UPDATE' Caused by: [BEA][Oracle JDBC Driver][Oracle]ORA-02049: timeout: distributed transaction waiting for lock fuego.transaction.DatabaseException:
    How do we resolve this exception?
    We have increased the JTA timeout to 120 seconds.. in the engine..
    Our process is deployed on Weblogic Server

    Looks like specific record for the Instance id 10 is locked in the Engine table. I am not quite sure, what kind of Business scenraio you executed to end up in this issue.
    But you can try restarting the BPM engine or check with the Oracle DBA to see any lock on the rows in Engine database and perform required unlocking operations.
    -Lovin.V

Maybe you are looking for

  • ESW: Question on the usage of "READ PURCHASE ORDER" service operation

    Hi everyone, I plan to consume consume "READ PURCHASE ORDER" in my composite application. When I navigated to SAP Documentation on ES Workplace, I found out the following paragraph in the "Notes on SAP Implementation" section. Notes on SAP Implementa

  • Compiling ant 1.6.2 for Solaris 10 x86

    Hi, I need to compile Ant 1.6.2 on Solaris 10 x86 edition (S10 x86 comes with ant 1.5.4 but some of the newer ant syntaxes are not supported in 1.5.4). When I tried doing the compile using Ant 1.6.2 sources from ant.apache.org, I get the following er

  • XPRIMARY Field in TCURC Table Not being updated?

    Hello, I am trying to update the XPRIMARY field in table TCURC. The process is followed in Transfer Global Settings --> Currencies. I also tried using Transfer Exchange rates from the context menu on the corresponding source system. We have BI 7.0 in

  • RA-20102: Application collection PLSQL_OBJECT_SOURCE does not exist

    Hi, I have written a trigger and it was working fine before in APEX. I have amended update statement inside the trigger and trying to compile. It was throwing me error as below and not being to save the trigger. Also i have taken out the update satem

  • Action script 3 question: addChild and removeChild on same button??

    I'm trying to make a button that when u click once, the movieclip will be removed and second time back on stage and so forth.... somehow i get this error ================================== ArgumentError: Error #2025: The supplied DisplayObject must b