cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in creating excel J2EE module for file adapter

Former Member
0 Kudos

Hi All,

I have created an J2EE project for Excel File Reading and added all the required libraries , build an ear of it and also referenced libraries in j2ee.engine.xml of ear , deployed the ear in J2ee engine of XI . Now i am trying to use this module in communication sender channel like this

localejbs/ExcelFileAdapter

ExcelFileAdapter(JNDI Name)

I am using this module name before callsapadapter but nothing is happening , my excel file not getting picked up from the desired location. Can someone tell me where i did things wrong.

Thanx in Advance,

Trax

Accepted Solutions (0)

Answers (3)

Answers (3)

jyothi_anagani
Active Contributor
0 Kudos

Hi ,

Have you specified all the parameters properly...

You have to specify these...

Module Name as localejbs/ExcelFileAdapter

ModuleType as Local Enterprise Bean

MduleKey as (anything it may be 0 or 1 or...)

and specify module Configuration parameters if you are having...

and make sure your File has to be .xls

For example input.xls

and check your FTP folder is having read and write access...

Check Communication channel monitoring what error you are getting...

Make sure these things and letme know for other issues...

Thanks.

Former Member
0 Kudos

I am not using Ftp , basically i m using File System(NFS) and the file name is correct that is having .xls extension

thanks

Trax

Former Member
0 Kudos

I am at beginner level in Xi can u tell me where to monitor communication channel and how to find out the errors in Integration monitoring runtime workbench.

Thanks

Trax

former_member183908
Active Contributor
0 Kudos

Hi Trax,

-->Its really very funny, with out knowing communication channel monitoring you are wokring on the ADAPTER MODULE )

-->Ok ny ways first of all search in SDN bu using the terms COMMUNICATION CHANNEL MONITORING so that you can know how to monitor.

cheers,

Pavan Kumar Nukala

jyothi_anagani
Active Contributor
0 Kudos

Hi ,

GOto your RWB(Runtime work bench)-->Adapter Engine -


>Communication channel monitoring--->give your communication channel name..and then check the status there....If anything wrong it will throw an error ther...

Let me know for further issues..

Thanks.

Former Member
0 Kudos

I checked in communication channel monitoring using this url http://xiserver:50000/mdt/channelmonitorservlet but there are no errors it is showing polling interval started and processing finished successfully also their is some messageid given.

Thanks

Trax

Former Member
0 Kudos

Here is the configuration for module in communication channel....

Processing Sequence

1 localejbs/ExcelFileAdapter Local Enterprise Bean res

2 CallSapAdapter Local Enterprise Bean 0

Module Configuration

res msgType MT_File_Input_Read_ExcelFile

res nameSpace http://sap.com/XI/ExcelFileRead

Thanx ,

Trax

jyothi_anagani
Active Contributor
0 Kudos

Hi,

Double click on that messgeId and goto payload tab...There check the payload...

If you are not getting any error in the sence file is picking...

I think in Communication channel you have not kept the archive mode as delete...May be that is the reason file is not deleting...

I think File is picking...Check the status in SXMB_MONI

Thanks.

jyothi_anagani
Active Contributor
0 Kudos

Yes Trax...

Whatever you have specified is correct...

Check in SXMB_MONI tcode

Thanks.

Former Member
0 Kudos

I have changed the processing mode to delete and file is getting deleted but i m not getting the desired output file , can u tell me how to track further after my file is picked up.

Thanx ,

Trax

jyothi_anagani
Active Contributor
0 Kudos

Hi,

RuntimeWorkbenc----->Communication cahnnel monitoring----->MessageId------>payload

Have you checked there for the result...

If it is not the result what you have epected then it will be the problem with your code in Adapter Module...

Thanks.

Former Member
0 Kudos

When I am clicking on message id I am getting the audit log with

2009-08-13 02:23:26 Success Message successfully put into the queue.

2009-08-13 02:23:26 Success The application sent the message asynchronously using connection AFW. Returning to application.

I am not able to find out payload.

Thanks,

Trax

jyothi_anagani
Active Contributor
0 Kudos

Hi,

On the tp of that page you will find dropdown...There select payload....Then payload will be displayed...

Thanks.

Former Member
0 Kudos

I checked the message status in SXMB_MONI and their is an error reoprted in message part

com.sap.aii.utilxi.misc.api.BaseRuntimeException: RuntimeException in Message-Mapping transformation: Cannot produce target element /ns0:MT_File_Input_Read_ExcelFile/Record/Empid. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd at com.sap.aii.mappingtool.tf3.AMappingProgram.start(AMappingProgram.java:403) at com.sap.aii.mappingtool.tf3.Transformer.start(Transformer.java:141) at com.sap.aii.mappingtool.tf3.AMappingProgram.execute(AMappingProgram.java:102) at ......

Thanks,

Trax

jyothi_anagani
Active Contributor
0 Kudos

It is clearly telling that problem with your mapping...

Check your mapping...

Thanks.

Former Member
0 Kudos

Can u tell me one more thing that how can i know my module is getting called.

Thanks,

Trax

jyothi_anagani
Active Contributor
0 Kudos

In this Particular scenario

if your module is not getting called then File will not be picked up...File is picking and message is going to SXMB_MONI in the sence module was called...

Generally it can be seen in AuditLog....

Double click on messageId...Then you can see there in Communication channel Monitoring..

Thanks.

Former Member
0 Kudos

I tested my mapping from Integration repository thats working fine.r their is an error in my bean class , can u guide me how to make and test a sample J2ee module and test it...

Edited by: Trax-2010 on Aug 27, 2009 1:12 PM

jyothi_anagani
Active Contributor
0 Kudos

Hi,

I think you have written AuditLog in your Module Code...Then you can able to see in Communication channel monitoring Audit Log...You can get the status there...

Thanks.

Former Member
0 Kudos

I am getting this in audit log can u help me with that or can u point the error where i am getting wrong.

2009-08-13 05:00:29 Success Channel CC_Sender_File_Adapter_Module: Send binary file "c:\temp\inp.xls". Size 16896 with QoS EO

2009-08-13 05:00:29 Error Attempt to process file failed with null

2009-08-13 05:00:40 Success Channel CC_Sender_File_Adapter_Module: Send binary file "c:\temp\inp.xls". Size 16896 with QoS EO

2009-08-13 05:00:40 Error Attempt to process file failed with null

2009-08-13 05:01:00 Success Channel CC_Sender_File_Adapter_Module: Send binary file "c:\temp\inp.xls". Size 16896 with QoS EO

2009-08-13 05:01:00 Error Attempt to process file failed with null

2009-08-13 05:01:20 Error Attempt to process file failed with null

2009-08-13 05:01:20 Success Channel CC_Sender_File_Adapter_Module: Send binary file "c:\temp\inp.xls". Size 16896 with QoS EO

2009-08-13 05:01:22 Success AO: Now got the xml payload object.

2009-08-13 05:01:22 Success AO: Now calling the Convert Method to convert Excel to XML.

Former Member
0 Kudos

Thats part of my bean class code:

public ModuleData process(

ModuleContext mc,

ModuleData imd)

throws ModuleException {

Object obj = null;

Message msg = null;

String msgType = null;

String nameSpace = null;

try {

obj = imd.getPrincipalData();

msg = (Message) obj;

msgType = (String) mc.getContextData("msgType");

nameSpace = (String) mc.getContextData("nameSpace");

if (msg.getMessageDirection()== MessageDirection.INBOUND)

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

else

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

XMLPayload xp = msg.getDocument();

Audit.addAuditLogEntry(amk, AuditLogStatus.SUCCESS,"AO: Now got the xml payload object.");

I think their is a some problem before 1st audit message is logged.

Former Member
0 Kudos

message repeated due to some issue with internet

Edited by: NetWeaver Expert on Aug 27, 2009 10:46 AM

Former Member
0 Kudos

your entry in CC-Module should be like below

Processing Sequence -

1 localejbs/ModuleProcessorExitBean Local Enterprise Bean exit

Module Configuration -

exit JNDIName Your JNDI name/path.