IBM Support

SAXParseException thrown when running a custom Java transform in WebSphere Integration Developer

Troubleshooting


Problem

Mismatched double quotes can cause a parsing exception when passing a string literal into the Java™ method of a custom Java transform of an XML map.

Symptom

The following exception occurs when the map is executed in a test environment or on the server:

Line #60; Column #92; org.xml.sax.SAXParseException: Element type "xsl:variable" must be followed by either attribute specifications, ">" or "/>".

Cause

The cause of the problem is the use of double quotes to delimit a string literal being passed to a String argument of the Java method. Since double quotes are used to delimit the attributes of XML elements and method arguments are expressed as attributes then use of double quotes in the method arguments interfere with the XML encoding.

Diagnosing The Problem

The symptomatic exception appears while running the map in a test environment or on the server. When the map is run in the test environment within the XML Map editor the exception is reported as a dialog that pops up. When the map is run on the server the exception is reported in the server log.

Resolving The Problem

To resolve this problem only use single quotes to delimit a string argument in an XML Map custom Java transform.

[{"Product":{"code":"SSQQFK","label":"WebSphere Integration Developer"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"XML Mapping Editor","Platform":[{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"}],"Version":"7.0","Edition":"All Editions","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
15 June 2018

UID

swg21472925