cancel
Showing results for 
Search instead for 
Did you mean: 

audit message in adapter module

Former Member
0 Kudos

hi all

I have developed a adapter module, in which I write some audit message. If the message is processed successfully, then I can see the audit message in RWB. But when some errors happen and some exceptions are thrown, I cannot see any audit message in RWB, what's more , I even cannot find the message in the adapter message monitoring. That means the message is lost. The only informaiton I can get is from the communication channel monitoring:

<i>exception caught during processing mail message [4]com.sap.aii.af.mp.processor.ModuleProcessorException: Error during processing local bean: localejbs/PgpMsg caused by: com.sap.engine.services.ejb.exceptions.BaseEJBException: Exception in method process.</i>

the SP level of XI is 18.

Any idea?

Thanks!

Regards,

Hui

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Hui,

for catching errors, in your adapter module, in process method.....just use a try..catch block like below:

try{

<your code>

}

catch(Exception e){

<your excepiton handlingcode>

}

in <your excepiton handlingcode>, write audit msgs for error....now deploy your bean in XI using SDM......Now you will see your error audit msgs.

Thanks,

Rajeev Gupta

Former Member
0 Kudos

Hi Rajeev,

That's what I do. My catch statement is as follow:

catch(Exception e) {
Audit.addAuditLogEntry(
				amk,
				AuditLogStatus.ERROR,
				 "Error while message processing----"
				+ e.getMessage());
throw new ModuleException(e);
}

I except that when an Exception is caught, it writes a audit log and throw a ModuleException. The message should be in error state and be resent several times automatically. But the current situation is: I cannot find the message in adapter message monitoring and the whole message is lost. The only information I can get is from the communication channel monitoring.