cancel
Showing results for 
Search instead for 
Did you mean: 

Exception in Sender mail module

Former Member
0 Kudos

Hello

We have developed a mail module but we´re facing some problems. The module only process the first mail message. After the second "run", it throws the exception:

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

The module starts working again only by restarting java stack on scmicm. Even if I stop and start the Communication Channel on Rwb, it doesnt work.

Any ideas?

Thanks!

Accepted Solutions (0)

Answers (1)

Answers (1)

stefan_grube
Active Contributor
0 Kudos

Do you work with static classes?

Make sure that you initial all classes or do not use static classes at all.

In an EJB the instances of previous runs are reused.

Former Member
0 Kudos

Hello

The module isn´t using any static class.

Thanks!

stefan_grube
Active Contributor
0 Kudos

Improve exception handling and write to audit log to figure out, where exactly in your code the error occurs.

Former Member
0 Kudos

I did.

I put a try/catch to handle errors but I think the module isnt being executed. It seems there´s some kind of lock, because at the first time the module is executed, but in next run it throws the Exception.

stefan_grube
Active Contributor
0 Kudos

what is your module doing?

Former Member
0 Kudos

Handling multiple xml attachments to build one single xml payload with all attachs.

The weird is that if I restart java stack it works for the first time.

Former Member
0 Kudos

Actually I just noticed I´m using DocumentBuilderFactory.newInstance() static class.

I checked the traces and the error is exactly on that line.

But I dont know how to deal with it.

stefan_grube
Active Contributor
0 Kudos

check the library references of your adapter module.

In PI 7.0 you need a reference to sapxmltoolkit, but in PI 7.1 there must not be a reference to this.