cancel
Showing results for 
Search instead for 
Did you mean: 

BaseRuntimeException:Invalid byte 1 of 1-byte UTF-8 sequence

former_member723031
Participant
0 Kudos

Hi experts,

I am getting error in MONI as :

Runtime exception occurred during application mapping com/sap/xi/tf/_MM_MES_TO_SAP_SHIPPING_REQ2_; com.sap.aii.utilxi.misc.api.BaseRuntimeException:Invalid byte 1 of 1-byte UTF-8 sequence

When i checked the payload i found :

The XML page cannot be displayed

Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.

-


An invalid character was found in text content. Error processing resource 'file:///C:/Documents and Settings/snayak/Local S...

<ns0:SalesOrderInformation>

But when I copy and paste the payload data from note pad and did testing in Messsage mapping, it became successful.

It is not opening in xml format but it is working in notepad.

Please advise what to do.

Thanks,

Swapnashree

Accepted Solutions (0)

Answers (2)

Answers (2)

markangelo_dihiansan
Active Contributor
0 Kudos

Hi,

Stefan is correct. If you are unable to display it, then it is not a valid xml. Based on the error that you provided, the invalid character is located just above the <ns0:SalesOrderInformation>. So you should start from there.

But when I copy and paste the payload data from note pad and did testing in Messsage mapping, it became successful.

It is possible that you just selected a part of the payload and pasted it in the mapping, hence it was successful. Pasting the whole payload would more or less give the same error as what you have seen in moni.

If you can have your input XML validated by XML programs such as XMLSpy or XMLStudio, it would greatly help in troubleshooting your issue.

Hope this helps,

Mark

former_member723031
Participant
0 Kudos

HI,

yes there are some special characters coming in the payload. In sender side JMS comm.channel is used and receiver is RFC. Is there any option to add modules for special character in JMS channel ? Please suggest the correct method to follow.

Thanks,

Swapnashree

Former Member
0 Kudos

Hi Swapna,

If there are any special characters in the message, it can be handled through Message Mapping.

Ref: http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/9420 [original link is broken] [original link is broken] [original link is broken]

Thanks,

stefan_grube
Active Contributor
0 Kudos

> yes there are some special characters coming in the payload. In sender side JMS comm.channel is used and receiver is RFC. Is there any option to add modules for special character in JMS channel ?

It is clearly defined what is valid XML. So if there are any special characters in the incoming payload, there is an error in the sending system.

Fix the error there, not in PI.

But yoube the issue is something else? For exapmle, the XML is claimed to be UTF-8 and in fact it is some other codepage?

Edited by: Stefan Grube on Dec 15, 2010 2:23 PM

stefan_grube
Active Contributor
0 Kudos

> It is not opening in xml format but it is working in notepad.

When it is not opening in XML format, then it not valid XML.

The first character in the ducument is not valid. When you open in Notepad, it is ignored, but this does not help in this scenario.

provide a valid XML file.