Troubleshooting integration agent '"[xX][mM][lL]" is not allowed' errors

This KBA is intended to aid in troubleshooting "'"[xX][mM][lL]" is not allowed' errors as reported in the integration agent log file.

  • The primary symptom is that the integration agent will be unable to communicate with a management system; e.g. to send annotations from xMatters responses.
  • In some integrations, the integration agent will be unable to send data to the xMatters server; e.g. for notification delivery or for user/group data sync.
  • This condition will mainly affect clients who have recently upgraded their integration agent to version 5.1 update 2 or higher.

1. Diagnosis

The following symptoms indicate the issue described in this KBA:

  • The integration agent log files contain ERROR -level messages that include the following string:
    "org.mozilla.javascript.EcmaError: TypeError: The processing instruction target matching "[xX][mM][lL]" is not allowed."
  • The above message is logged while the integration agent attempts to communicate with a server (xMatters or management system) outside of the regular APXML exchange.
  • The communication attempt fails.

2. Problem Resolution

The problem can be resolved by editing the integration scripts.

  1. Determine which specific integration script is responsible for the '"[xX][mM][lL]" error message.  For example, if the error message begins
    "<timestamp> [inbound.caservicedesk15.caservicedesk15.normal-1]",
    then the integration script would be the main CA Service Desk integration script, "caservicedesk.js"
    • If you're unsure of the location of the script, look for the path in <IAHOME>\conf\iaconfig.xml
  2. Open this file with a text editor and search for a "load" statement that provides the location of the file wsutil.js
    • For example, in the CA Service Desk integration, the relevant load statement is
      load("integrationservices/caservicedesk" + CASD_VERSION + "/caservicedesk" + CASD_VERSION + "/wsutil.js");
  3. Open wsutil.js with a text editor and locate the following line:
    formatStringForE4X: function(string)
  4. If the file does not contain a function definition for formatStringForE4X, add one by adding the contents of the attached formatStringForE4X.txt file as follows:
    • Make a backup copy of the wsutil.js file.
    • Search wsutil.js for a line containing only "},"
    • Create a new empty line following "},"
    • Copy and paste the contents of the formatStringForE4X.txt file immediately after the blank line.
    • Save the wsutil.js file.
  5. Replace every instance of "new XML" in wsutil.js as follows:
    • Use a text editor to search fornew xml(
      • Make sure your search is set to ignore case, and note that there may be spaces between "xml" and the opening parenthesis that follows it.
    • Replace
      new XML( 
      with
      new XML(this.formatStringForE4X(
      • Note the addition of a second opening parenthesis.
    • Find the closing parenthesis that matches the opening parenthesis innew XML( and add another closing parenthesis after it (the line must have the same number of opening and closing parentheses).
    • Repeat until all instances of new XML in the file have been replaced
    • Save the file.
  6. Repeat step 5 for the main integration file (e.g., caservicedesk.js in this case) with the following exception:
    • replace all instances of
      new XML( 
      with
      new XML(WSUtil.formatStringForE4X(
  7. Repeat step 6 for all of the integration's Javascript files
  8. Restart the integration agent and check the integration agent log file to verify that you have not created any new errors.  See the Troubleshooting section below for hints regarding some common problems.
  9. Once the scripts are loading properly and the integration agent has started up, test whether the error condition still exists.

3. Troubleshooting

While the integration agent is starting up, it parses the Integration Service Javascript files. If the files are error-free, the integration agent creates an image of the scripts in memory and executes these scripts until it is shut down. If the parser discovers syntax errors in the scripts, they will typically be reported in the integration agent log file, often with a stack trace.

To save time while debugging integration agent scripts, start the integration agent in console mode instead of starting it as a service.  To start the integration agent in console mode, open a command prompt, navigate to <IAHOME>\bin, and type the following command:

start_console

 If the integration agent starts up successfully, you will see a message similar to the following:

"Successfully completed Integration Agent bootstrap process.  Integration Agent is running."

Error messages will typically be presented in both the console and the integration agent log file, but occasionally a message will be displayed in the console only.

Startup-time error messages are often accompanied by a multi-line stack trace that contains details about the root of the problem (as perceived by the Javascript parser.)  For example:

  • if you have neglected to add a closing parenthesis, the log will include a line similar to:

org.mozilla.javascript.EvaluatorException: missing ) after argument list (integrationservices/bmcremedy/lib/javascript/webservices/wsutil.js#124)

  • Examine the specified line (124 in wsutil.js, in this case) and ensure that it has the same number of opening and closing parentheses.

In general, while troubleshooting an integration agent Javascript syntax problem, you can save a lot of time by searching the log file for the string ".js#"

Another common problem is that the "formatStringForE4X" function has been correctly implemented and declared, but it cannot be accessed during startup time (for example, when creating a static variable that contains an XML document.)  In such cases, the error message will include a string similar to:

"Cannot find function formatStringForE4X in object function BaseClass() {...}. (integrationservices/bmcremedy/bmcremedydataload/dataSyncList.js#60)"

The solution to this problem is to create a local instance of the formatStringForE4X function (i.e., put a copy of the function in the script file where it is being called,) and then invoke the local function.  More specifically:

  1. Locate the line where the error is reported (line 60 in dataSyncList.js, in this case)
  2. Copy the formatStringForE4X function from the attached file and paste it into the Javascript file, somewhere above the line where it is invoked (e.g., prior to line 60 in this example)
  3. Change the function definition from:

formatStringForE4X: function(string) 

  {

to:

function formatStringForE4X(string) 

  {

  1. Change the invocation (e.g., line 60) so that it designates the local copy of the function instead of the one in wsutil.js.For example, replace:

var syncList = new XML(xMattersWS.formatStringForE4X(""));

with:

var syncList = new XML(this.formatStringForE4X(""));

xMatters Reference
SUP-8648, SUP-8497, DTN-3653, JDN-4732
Originally created by Jeremy Brown

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk