cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping error or bug?

Former Member
0 Kudos

Hi all!

I have the following mapping error:

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>

- <!--

 Request Message Mapping 

--> 

- <SAP:Error SOAP:mustUnderstand="1" xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">

<SAP:Category>Application</SAP:Category>

<SAP:Code area="MAPPING">EXCEPTION_DURING_EXECUTE</SAP:Code>

<SAP:P1>com/sap/xi/tf/_I_TANDEM_INV_MGMT_STOCK_M23SAP_Req~</SAP:P1>

<SAP:P2>com.sap.aii.utilxi.misc.api.BaseRuntimeException:</SAP:P2>

<SAP:P3>Fatal Error: com.sap.engine.lib.xml.parser.ParserE</SAP:P3>

<SAP:P4>xception: Invalid char #0x0 (:main:, row:5, col:1~</SAP:P4>

<SAP:AdditionalText />

<SAP:Stack>Runtime exception occurred during application mapping com/sap/xi/tf/_I_TANDEM_INV_MGMT_STOCK_M23SAP_Req~; com.sap.aii.utilxi.misc.api.BaseRuntimeException:Fatal Error: com.sap.engine.lib.xml.parser.ParserException: Invalid char #0x0 (:main:, row:5, col:1~</SAP:Stack>

<SAP:Retry>M</SAP:Retry>

</SAP:Error>




It seems an data error but when I test the mapping in ESR with inbound payload it runs successfully.

Working and not working payload were compared at HEX level and not difference except some innocuous values.


Any other consideration before create an incident in SAP Support?


Thanks in advance!

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member182412
Active Contributor
0 Kudos

Hi Peralta,

As per the error open inbound payload in notepad++, go to line 5 and col1 and see is there any special characters like below screen shot.

>>>com.sap.engine.lib.xml.parser.ParserException: Invalid char #0x0 (:main:, row:5, col:1~

You need to enable show all characters in notepad++

Regards,

Praveen.

vadimklimov
Active Contributor
0 Kudos

Hello Peralta,

What is the sender adapter used in this scenario? This kind of error is common for file based scenarios in cases when a sender system produces a file and inserts a byte order mark at the beginning of it (which can be figured out it you open that file in hexadecimal editor and pay attention to byte sequence at the beginning of it). This mark is optional, so if a sender system omits it, data contained in a file will still be consistent, and PI will be able to process file content and parse it into corresponding XML document (assuming there are no other issues with that XML document).

Here is an example: I created two files that contain identical content (word "Test"), I saved one of them in ANSI encoding, and another - in UTF-8. Then I uploaded both of them in online hexadecimal editor (http://www.onlinehexeditor.com/) and for the one saved in UTF-8 encoding, you can clearly see byte order mark indication at the beginning of hexadecimal representation (highlighted in red):

ANSI encoding:

UTF-8 encoding:

If you copy-pasted working and not working payload from PI monitoring tools like Message Monitor and then analysed their hexadecimal representations, then most likely you will not be able to observe this byte order mark.

Regards,

Vadim