cancel
Showing results for 
Search instead for 
Did you mean: 

Catching & Logging Error at Adapter

Former Member
0 Kudos

Hello There,

I want to catch & log any error that may occur at the SAP PI adapter side.by writing a custom adapter module in EJB 3.0. The custom adapter module executed first and in case of any error is catch & log the error to a log file. Can anyone tell me if it is at all a possible solution option ?

I want to bypass the common Alerting Means with a error logging to a file...

Edited by: HCL Common on Dec 22, 2011 1:19 PM

Accepted Solutions (1)

Accepted Solutions (1)

prateek
Active Contributor
0 Kudos

>>any error that may occur at the SAP PI adapter side.by writing a custom adapter module

Do you really mean SAP PI adapter level? A custom module is communication channel specific. Are you planning to add the same module to all the channels? It won't be a good design then.

Also, your error logging will be then limited to adapters that support adapter modules.

Regards,

Prateek Raj Srivastava

Former Member
0 Kudos

Hi Prateek,

You are SPOT ON I am looking for a design to log any type of error that may happen in the Adapter side, and would like to catch those error and write then in a file system or a Z Table.This may require writing a generic adapter module for each type of Adapters. These adapter module will only catch any error that may occur in the adapter side and log them in a file or Z table.

I am not sure if the ERROR in an ADAPTER can at all be CAUGHT by using the Generic Adapter module as I mentioned for such purpose.

You are right thise is only for catching the errors at the adapter side only.

For catching errors at the INTEGRATION ENGINE we will use ONLY JAVA MAPPING to catch any error that may OCCUR during message transformation & data realted integrity checks.

Your thought on this...

Regards,

Former Member
0 Kudos

I am looking for a design to log any type of error that may happen in the Adapter side, and would like to catch those error and write then in a file system or a Z Table.This may require writing a generic adapter module for each type of Adapters.

> Regards,

It is impossible to catch an exception in an adapter engine with in an adapter module. Remember adapter module is a component with in Adapter Engine. You can only catch exceptions with in that particular adapter module and throw the exception at adapter level not the other way round. Try to make use of the standard PI alert mechanisms and explore the CCMS alerts to capture these alerts if you want more control.

For catching errors at the INTEGRATION ENGINE we will use ONLY JAVA MAPPING to catch any error that may OCCUR during message transformation & data realted integrity checks.

You can not guarantee all exceptions in Integration engine will be caught at mapping exception blocks. There could always be a system exception which could cause a message to fail in receiver Determination step or lets say call adapter pipeline step. How will you capture this?

Regards

Jai

Edited by: Jaishankar on Dec 23, 2011 12:57 PM

Former Member
0 Kudos

Hi Jaishankar,

Many Thanks for your valuable comments & observations,

Now I have a fairly good understanding of error handling in the adapters & integration engine.

Regards,

prateek
Active Contributor
0 Kudos

I agree to what Jai has mentioned.

What is the main reason behind thinking not to use the standard error handling mechanism and create your own? Custom modules and mappings can capture less that 50% of possible errors during execution of a message. Moreover, the effort required for this task wouldn't be less either. Therefore if you could share your business requirement, that would be helpful for us.

Regards,

Prateek Raj Srivastava

Answers (2)

Answers (2)

GabrielSagaya
Active Contributor
0 Kudos

Can you check the defaultTrace log in AL11 for the below directory

/usr/sap/SID/<Instance>/j2ee/cluster/server0/log

Former Member
0 Kudos