cancel
Showing results for 
Search instead for 
Did you mean: 

module not getting called in the sender adapter

Former Member
0 Kudos

Hi ,

I have created a module to read data from an Excel file and convert it to XML and attached it in the sender channel .

Now the module is not getting called , it is neither giving any error and also Nothing is shown about module call in the audit log .

message processing is happing in the normal way as it happening without the excel conversion module i have created .

Can anyone please help , how should i go about debugging the same .

thanks & regards,

Rahul.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Just check the following in the module.

1. Your stateless session bean should implement SessionBean and Module.

2. The bean should have the following method

public ModuleData process(

ModuleContext moduleContext,

ModuleData inputModuleData)

throws ModuleException {

try {

File f = new File("

system_name
directory_name
checking.txt");

PrintStream ps = new PrintStream(new FileOutputStream(f));

ps.println("Testing");

ps.close();

} catch (IOException e) {

ps.println("IOException");

}

return inputModuleData;

}

This is to check process method has been called or not.

Regards,

Uma

Former Member
0 Kudos

Hi ALL,

If i specify any abrubt module name in the module tab of the sender adapter then the message processing should not take place....am i right.

i should get an error for the corresponding channel in the adapter monitoring.

I am specifying this module as the first module in the module tab.

Instead of getting an error my scenario is still running.

Please can anybody suggest what mistake i am doing.

Thanks and Regards

Rahul

Former Member
0 Kudos

Hi,

if you specify an incorrect or non-existing module name, it is simply ignored. I was told by an SAP XI consultant, that there is no obvious way to find out about that. I always include trace statements when the module's process function is called and if they are not presentl I double check the name, correct deployment, etc. for the module. But no error is thrown...

regards,

Peter

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi Rahul,

What Peter is telling is correct. Even I had the same problems while developing the module and while debugging I found out that my EAR file doesn't have Jar file for Excel file conversion and I have added that jar file manually by using WinZip.

Please try this option and let me know if you need any assistance.

Regards,

Ananth

Former Member
0 Kudos

Hi Rahul,

The Module name in the sender channel should be localejbs/sap.com/EAR_ProjectName/BeanName

Check this out...

Regards,

Uma

Former Member
0 Kudos

Hi Uma,

The module name in the sender channel is in the same format as you have specified.

Regards

Rahul

Former Member
0 Kudos

Hi,

Are u sure that the message goes thru the module. Just try outputting a file or any means to check whether the flow goes thru the module.

Regards,

Sudharshan.

Former Member
0 Kudos

Hi Sudharshan,

Do you want me to create a dummy file through the module to check if the message goes through the module.

Good suggestion.

I will give a try and let you know.

Thanks & Regards

Rahul

Former Member
0 Kudos

Hi,

I wrote a code to create a text file in the module just to check if the module is getting executed or not.

But after running the scenario i dont find a file created.

From the above test i think that my module is not getting called.

How do i check why my module is not getting called.

Please give some suggestions.

Thanks and Regards

Rahul

Former Member
0 Kudos

Hi,

While giving ur module name in configuaration

have u given the bean name as

localejbs/sap.com/EarProject_name/Bean name

(I am not giving the right syntax)

In that Bean Name have you given just

The bean name or Package.BeanName

only Bean Name needs to be given no need to specify the package.

Just to cross check

paste the Bean name u have given in Config

and have u deployed ur EAR successfully..

Regards,

Sudharshan

Former Member
0 Kudos

Hi Sudharshan,

Yes i have given only the BEAN name and not package.beanname.

Initially when the module name was not correct in the configuration it was flashing error in the adapter monitoring for the specific channel..that the module couldnt be found.

But now after correcting it is not showing any error but the module is also not getting called.

I can see the EAR file deployed through the visual admin.

Have you created any module? Can you sent it to me on

nawale_rahul@yahoo.com

I will try deploying it on my server and check if it works

Thanks and Regargs

Rahul

Former Member
0 Kudos

Hi,

Just a suggestion...If at all there are exceptions that are defined, just have a output file in ur module and try adding the messages of the various exceptions that u are trying to catch into it and output the file thru normal file I/O in to one of server local directory.I suppose some exception has occurred in ur Module function hence it justs returns the module data(as it is received) without going thru processing steps in ur module.. just try and debug in this way.

Regards,

Sudharshan

Former Member
0 Kudos

Hi Rahul,

You can also add the following audit messages to know whether your module is getting called or not.

AuditMessageKey amk = new AuditMessageKey(msg.getMessageId(),AuditDirection.INBOUND);

Audit.addAuditLogEntry(amk, AuditLogStatus.SUCCESS,"Excel2XMLBean: Module called");

Regards,

Ananth

stefan_grube
Active Contributor
0 Kudos

Hi Rahul,

is your module the first in the module chain?

The SAP module must alwasy be the last.

Regards

Stefan

Former Member
0 Kudos

Hi Stefan,

Yes, my module is the first in the module chain.

Regards

Rahul