cancel
Showing results for 
Search instead for 
Did you mean: 

How can i capture Exception response of JDBC synchronous scenario in xml file?"

Former Member
0 Kudos

Hello,

I have created JDBC synchronous scenario, in which single record stored in xml file is updated on the database, using action UPDATE_INSERT.

If the record gets updated successfully, I get the update_count and insert_count in the response.

But if there is are any Primary - Foreign key violation, it throws following message

<SAP:Category>XIAdapterFramework</SAP:Category>
<SAP:Code area="MESSAGE">GENERAL</SAP:Code>
<SAP:P1 />
<SAP:P2 />
<SAP:P3 />
<SAP:P4 />
<SAP:AdditionalText>com.sap.engine.interfaces.messaging.api.exception.MessagingException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'DEALER' (structure 'insert'): java.sql.SQLIntegrityConstraintViolationException: ORA-02291: integrity constraint violated - parent key not found</SAP:AdditionalText>
<SAP:Stack />
<SAP:Retry>M</SAP:Retry>

</SAP:Error>


How can i capture this exception message?  Please suggest.

Accepted Solutions (0)

Answers (3)

Answers (3)

iaki_vila
Active Contributor
0 Kudos

Hi Neha,

Another way is to have an stored procedure in DB, and inside this stored procedure to control the error cases and to response a XML pointing the error or the success operation.

Regards.

former_member182412
Active Contributor
0 Kudos

Hi Neha,

Check this document.

Regards,

Praveen.

former_member186851
Active Contributor
0 Kudos

Hello Neha,

Why don't you try configuring Fault messages.

Former Member
0 Kudos

Hello Raghuraman Sritharan,

My scenario is File - > JDBC  -> File .  Where i can configure Fault Message?

former_member186851
Active Contributor
0 Kudos

Hello Neha,

In the service interface.

Former Member
0 Kudos

Hello Raghuraman,

I have created FaultMessage Type and assign it to the Fault role of Message Interface as shown in the link provided by you.

Can you please explain more about the second part of configuration in R3?

Thanks.

former_member186851
Active Contributor
0 Kudos

Hello Neha,

whats ur scenario?

Proxy--->JDBC?

Former Member
0 Kudos

HI,

My scenario is File to JDBC synchronous.

former_member186851
Active Contributor
0 Kudos

Then I guess you need not worry for Proxy code to capture,Try configuring the rest all things and see if its working.

Former Member
0 Kudos

Hi,

After adding fault message in service interface (OS), i provided one input file where the user code was wrong. I got error message in sxmb_moni. But there was no payload doc available into the error message. Still getting the same message.

I just want to capture the error response in case of exception. else the scenario works fine if query is executed successfully.

former_member186851
Active Contributor
0 Kudos

Did you map the fault message?

Former Member
0 Kudos

No. in the operation mapping, there are only two tabs to provide mapping, Request and Response tab.

Do you have any material/resource that explains how the Fault Message mapping is performed?

former_member186851
Active Contributor
0 Kudos

Once you get read operations you will get it

Former Member
0 Kudos

Hi,

As provided in the link, i need to map the response error message (below)

AP:Category>XIAdapterFramework</SAP:Category>

<SAP:Code area="MESSAGE">GENERAL</SAP:Code>

<SAP:P1 />

<SAP:P2 />

<SAP:P3 />

<SAP:P4 />

<SAP:AdditionalText>com.sap.engine.interfaces.messaging.api.exception.MessagingException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'DEALER' (structure 'insert'): java.sql.SQLIntegrityConstraintViolationException: ORA-02291: integrity constraint violated - parent key not found</SAP:AdditionalText>

<SAP:Stack />

<SAP:Retry>M</SAP:Retry>

</SAP:Error>

But i have a doubt, in one of the comments of that post, they have mentioned that 'Fault messages can be used for only Application errors and not system errors.'. above error is system error. so, will this work in my case?

Former Member
0 Kudos

Hello,

Please suggest, if or not FaultMessage can be used in case of above exception or error?

Should i create a fault message with the same schema as above xml response obtained?

Regards,

Neha

former_member186851
Active Contributor
0 Kudos

Hello Neha,

Two questions.

1.Did you try mapping the fault messages?

2.Are you looking for application or system errors or both?

Former Member
0 Kudos

Hi,

I had try Fault message, but it did not work either because response was system error or i made some mistake.

My doubt is that, the Fault message shown in the link provided by you has different schema and the response i got has different xml scema.

I am looking for system error.

Regards,

Neha