Loading

java.io.UnsupportedEncodingException is thrown with SAP BAPI function

Дата публикации: Jul 17, 2025
Решение

SYMPTOM

When using SAP Connector to execute BAPI function, the java.io.UnsupportedEncodingException similar to the ERROR log below is thrown:

ERROR 2019-01-01 10:00:00,111 [[MuleRuntime].io.01: [example].exampleFlow.BLOCKING @100ee11] [event: xxxxxxxxxxxxxxxxxxxxx] org.mule.runtime.core.internal.exception.OnErrorPropagateHandler: 
********************************************************************************
Message : An exception occured while parsing XML.
java.io.UnsupportedEncodingException: ISO 10646/Unicode(UTF-8).
Error type : SAP:XML_PARSING_ERROR
Element : exampleFlow/processors/3 @ example:example.xml:50 (Execute BAPI / Function over sRFC)
Element XML : <sap:execute-synchronous-remote-function-call doc:name="Execute BAPI / Function over sRFC" doc:id="xxxxxxxxxxxxxxxxxx" config-ref="SAP_Outbound" key="/xxx/xxxx"></sap:execute-synchronous-remote-function-call>

(set debug level logging or '-Dmule.verbose.exceptions=true' for everything)
********************************************************************************

And you have defined an encoding value for your SAP Connector similar to the screenshot below:

User-added image

CAUSE

This issue occurs when you have defined a encoding which is not supported by SAP Connector.

SOLUTION

According to MuleSoft SAP Connector Documentation, The encoding defined in your SAP Connector should be inline with the Canonical name of an encoding as per Oracle's Supported Encoding.
 

Номер статьи базы знаний

001123437

 
Загрузка
Salesforce Help | Article