IBM Support

A 'Could not compile stylesheet' error occurs when you use a Custom Java Transform with WebSphere Enterprise Service Bus (WESB)

Troubleshooting


Problem

When you use a Custom Java Transform, pass non-string data types as input parameters, and expect non-string data types as output parameters, you find errors in the log files with XSLT.

Symptom

The following error exists in the log file:

SystemErr R FATAL ERROR: 'Could not compile stylesheet'
SystemErr R ERROR: 'Cannot convert argument/return type in call to method 'com.rbs.Utilities.HeartbeatUtilities.getExecutionTime(node-set)''

The XSLT map uses the Custom Java Transform, which accepts the long data type (non-string value) and returns an int value. When you execute this map on WebSphere Enterprise Service Bus Version 7.0.0 Fix Pack 3, you find this error within the log files.

In spite of this error showing up in the log files, the XSLT map executes successfully without any issues. This error occurs only when you pass non-string data types as input and expect non-string data types as output. This error does not occur when we have the custom Java™ functions with String both as input and output.

These symptoms match WebSphere Enterprise Service Bus APAR IC52342, which documents this issue as a permanent restriction for Version 6.0.2.0

Cause

The code tries to compile the XSLT using the optimizing XSLTC compiler. However, this process cannot deal with certain functions; often to do with handling calling out to custom Java. If this process happens, the code falls back to the much more lenient, but slower, Xalan compiler. What is being reported is the "falling back". The code was left as is because this information is useful to know for debugging purposes. However it does not affect the processing of the XSLT.

Resolving The Problem

A resolution is not necessary and you can ignore the error message. XSLT compilation is completed successfully by the slower Xalan compiler.

[{"Product":{"code":"SS7J6S","label":"WebSphere Enterprise Service Bus"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"General","Platform":[{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"}],"Version":"7.0.0.5;7.0.0.4;7.0.0.3;7.0.0.2;7.0.0.1;7.0;6.2.0.3;6.2.0.2;6.2","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
15 June 2018

UID

swg21577451