cancel
Showing results for 
Search instead for 
Did you mean: 

Mail Sender Adapter (POP3)

Former Member
0 Kudos

Hi All,

I have a sender mail scenario where i am picking a mail with txt attachment from the POP3 server. This interface was working fine but recently i have noticed one error :



exception caught during processing mail message[1]; com.sap.aii.af.mp.module.ModuleException:Transform: failed to execute the transformation: com.sap.aii.messaging.adapter.trans.TransformException:Error converting message: 'sun.io.MalformedInputException';u201D

Scenario description:

I am using PayloadSwapBean to read the attachment and then MessageTransformBean to convert txt attachment into xml file.

What can be the possible reasons for this execption??

Thanks

Amit Srivastava

Accepted Solutions (1)

Accepted Solutions (1)

former_member184681
Active Contributor
0 Kudos

Hi,

It looks like an error while converting the .txt file to XML, most probably because of the file contents. Make sure your that

- your file does not contain any XML special characters like "<" and ">",

- contents of particular fields of your file do not contain the character defined as the field or record separator.

Hope this helps,

Greg

Answers (4)

Answers (4)

Former Member
0 Kudos

i can see one special character in my file:



Ersatzgerät

and encoding of my file is ISO-8859-1

In my MTB, i have used:

Transform.Class --->com.sap.aii.messaging.adapter.Conversion

TransformContentType--->text/xml; charset = utf-8

and rest usual FCC parameters

Edited by: AmitSri on Jan 31, 2012 3:43 PM

former_member184681
Active Contributor
0 Kudos

Dear Amit,

Did this error occur in dev/test environment? If so, just remove the unwanted character and try again - at least you will know if that was the reason.

Hope this helps,

Greg

Former Member
0 Kudos

Unfortunatley ....this error is encountered in production

former_member184681
Active Contributor
0 Kudos

How about setting the content type as below:

TransformContentType--->text/xml; charset = iso-8859-1

It should help, especially that you said that your file is encoded with iso-8859-1.

Greg

Former Member
0 Kudos

it seems that i have found the issue (as suggested by most of u all)...the below character coming in the file is the culprit


Ersatzgerät

former_member184681
Active Contributor
0 Kudos

Dear Amit,

Did you solve it with changing the encoding in Transform.ContentType to ISO-8859-1, as I suggested? Please let us all know, so that others that encounter similar problem could have it solved as well once they find this thread

Greg

Former Member
0 Kudos

Hi Grzegorz,

This is the very first time customer has send these characters so for time being solution they will delete these characters and process the failed mail message..

infact i have also tried chnaging the content type parameter as:

TransformContentType--->text/xml; charset = iso-8859-1

and after doing this i am able to process the mail message (with special characters) but eventaully the special character is getting lost when it comes to PI..something like this:


<TEXT>ErsatzgeruFFFDt,1xLager</TEXT> 

Thanks

Amit Srivastava

baskar_gopalakrishnan2
Active Contributor
0 Kudos

>What can be the possible reasons for this execption??

The mail content might have encoding issues. So this error pops up for a specific data file. You might have to set encoding type UTF-8 for this.

Former Member
0 Kudos

Hi Amit,

Below threads may useful

/thread/646755 [original link is broken]

Regards,

Venkata Ramesh

former_member188019
Active Participant
0 Kudos

the issue could be related to the encoding of the file that has been attached,

the text file, that you attached, check its encoding.. you can check in any editor like editplus staus bar, and use appropriate encoding e.g. UTF-8

pls see links:

/message/13896290#13896290 [original link is broken]

http://www.java-forums.org/advanced-java/23923-sun-io-malformedinputexception.html