Saturday, November 1, 2008

IBM PK70653 WebSphere XSLT Empty DOM Debug Failure

I'm pleased to see that the details of a PMR I had opened with IBM over 3 months ago now are now publicly acknowledged as PK70653: XSLT TRANSFORMATION IN DEBUG MODE FAILS ON AN EMPTY INPUT XML DOCUMENT WITH MESSAGE [FATAL ERROR] PREMATURE END OF FILE.

There are some details which seem to have been left out of the above APAR / PK that may be useful:

  • No application Throwable is ever thrown. The described error is generated only to stderr.
  • The transformation is aborted and nothing is ever set on the result. If passing in a DOMResult as the "requestResult" listed in the APAR, setNode(…) is never called, and getNode() will return null - potentially leading to additional application errors, probably as a NullPointerException if unchecked.
  • As documented in the Transformer's transform(…) method, passing in an empty Source is explicitly allowed by the API.
  • There is a temporary work-around. Follow the instructions at to disable the XSLT Debug Adapter, either by setting the "" JVM custom property to "false", or by modifying a preference in Rational Application Developer (RAD) if using the WebSphere Application Server (WAS) Test Environment.

Finally, just for reference purposes, here is the error that may be seen in stderr if experiencing this issue (also as shown in the APAR):

[Fatal Error]  :-1:-1: Premature end of file.
SystemId Unknown;Line #-1; Column #-1; Premature end of file.

Kudos to Dorine, Bruce, Samantha, and the others involved at IBM for taking attention to and resolving this issue!

1 comment:

Anonymous said...

this happens on tomcat too..., not just WAS.