cancel
Showing results for 
Search instead for 
Did you mean: 

Invalid byte 2 of 2-byte UTF-8 sequence

former_member347027
Participant
0 Kudos

Hi,

I'm having trouble receiving messages that contain special characters.

JMS -> PI -> Proxy

asynchronous


The PI could not read the XML, the payload arrives:


A página XML não pode ser exibida

Não é possível exibir a entrada XML usando a folha de estilos XSL.

Corrija o erro e clique no botão Atualizar ou tente novamente mais tarde.


-------------------------------------------------------------------------

-------


Caractere inválido encontrado no texto. Erro ao processar o recurso

'file:///C:/Users/Mfaria/AppData/Local/Temp/8267c20_163...


<SISMSG><SEGCAB><CD_LEGADO>SAP</CD_LEGADO><NR_OPERACAO></NR_OPERACAO>

</SEGCAB><...

as an error and have:

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

<!--  Message canceled -->

<SAP:Error SOAP:mustUnderstand="" 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/_MM_Recebe_SPB_JD_TO_ECC_</SAP:P1>

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

  <SAP:P3>Invalid byte 2 of 3-byte UTF-8 sequence.</SAP:P3>

  <SAP:P4 />

  <SAP:AdditionalText />

  <SAP:Stack>Runtime exception occurred during application mapping com/sap/xi/tf/_MM_Recebe_SPB_JD_TO_ECC_; com.sap.aii.utilxi.misc.api.BaseRuntimeException:Invalid byte 2 of 3-byte UTF-8 sequence.</SAP:Stack>

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

  </SAP:Error>

Can you help?

Tks,

Marcelo

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Either the encoding is already wrong from the partner (happens often in projects) or your sender adapter channel is mixing it up.

Result in any case is that you have an XML with wrong encoding which then leads to the error in the integration engine.

Do I understand the screenshot right that no encoding is set at all in the payload ? Then PI defaults to UTF-8 which is often a wrong assumption if the partner e.g. sent it with iso-8859-1.

CSY

Former Member
0 Kudos

Hello,

Are you using Websphere MQ?  If yes could you please check if setting the code page

to UTF-8 (i.e., CCSID 1208) resolves the issue?

Note:

1086303 XI JMS Adapter and IBM Websphere MQ: FAQ
question
6) My MQ message contain special characters like ö,ä etc/line
endings/packed decimals. The JMS adapter is messing up with these
characters.

Kind regards

Sarah

former_member347027
Participant
0 Kudos

Thank you Sarah!

I am using Websphere.

UTF-8 to CCSID 1208.

I had followed the note 1086303, 1408065.

I'm trying with Adapter module as directed by Rajesh.

I have to see which modules to use to handle the message.

The message does not arrive in monitored, but I can view it in RWB.

Thank you,

MArcelo

Former Member
0 Kudos

What is the payload at the sender communication channel or AE before it gets into IE?

Do you have any Binary or Special character in the incoming payload?

In that case, you need to use the respective Unicode in sender JMS adapter to send correct values into IE.

former_member347027
Participant
0 Kudos

Thank you Rajesh!

The problem is that the messages coming from the central bank and can not be changed on the sender.

The error is by accent. (á, Á, ã, Ã,  é, É, í, Í, ó, Ó, õ, Õ ú, Ú, ü, Ü, ç, Ç)

regards,

Marcelo

Former Member
0 Kudos

Ok. You don't need to change content of the payload

Does this means you cannot see the incoming message in PI sender communication channel?

You should be able to see the incoming payload in RWB and Adapter module in JMS sender adapter should help to set correct Unicode.