IBM Support

IBM DataPower Gateway dp:parse() error message

Troubleshooting


Problem

A DataPower parse error message indicates that a request or response, or possibly a stylesheet has unexpected content.

Symptom

The following messages may be in the DataPower system log:
 
[xslt][error] dp:parse() error: illegal character '0' at offset 0 of dp:parse(local:///ondisk/myStylesheet.xsl)
[xslt][error] dp:parse() error: Incomplete markup or missing document element at offset 0 of dp:parse(local:///myStylesheet.xsl)
 

The messages both refer to the same stylesheet, but the first indicates the stylesheet itself is in error and the second indicates the stylesheet is unable to process the input received.

Cause

The illegal character '0' message indicates that the stylesheet itself could not be parsed. The stylesheet may have encoding in the beginning of the file that identifies it as non-UTF-8. This may have been caused by saving the file as non-UTF8 in an editor.

The incomplete markup message indicates the request or response message, not the stylesheet, could not be parsed. This parse error can result when an empty request, such as an HTTP GET is sent to a service expecting an XML request.

Resolving The Problem

If the parse error indicates the stylesheet itself is the problem, save the stylesheet file as a UTF-8 encoded xsl file, update the file on the DataPower appliance, and retest.

If the parse error indicates the request or response cannot be parsed, review the technotes in the Related Information section to find options for handling empty payload in services expecting XML requests.

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SS9H2Y","label":"IBM DataPower Gateway"},"ARM Category":[{"code":"a8m50000000CdxUAAS","label":"DataPower->Developer (DV)->XML - Parsing, XPath, etc."}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"2018.4.1","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
08 June 2021

UID

swg21622091