IBM Support

ITNCM JavaScript Native Command Sets cause "ReferenceError: <paramaterValue> not defined" error.

Troubleshooting


Problem

When submitting a JavaScript Native Command Set, that uses parameters, the UOW log contains a "ReferenceError: not defined" error.

Symptom

A JavaScript Native Command Set is written containing code such as the following:

//#js

function execute(log,dev,sys) {
    var stringToLog = $stringToLog$;
    log.info(stringToLog);
    return true;
}

The end-user submits the Native Command Set against a device and supplies a value for the parameter (stringToLog in the above example):

enterParameters.jpg

But the submitted UOW contains a ReferenceError quoting the actual parameter supplied by the user:

(47) Failed to execute script contents  : sun.org.mozilla.javascript.internal.EcmaError: ReferenceError: "myTestValue" is not defined. (<Unknown source>#3) in <Unknown source> at line number 3

[{"Product":{"code":"SS7UH9","label":"Tivoli Netcool Configuration Manager"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Component":"Not Applicable","Platform":[{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF002","label":"AIX"}],"Version":"6.3.0;6.4;6.4.1;6.4.2","Edition":"All Editions","Line of Business":{"code":"LOB77","label":"Automation Platform"}}]

Log InLog in to view more of this document

This document has the abstract of a technical article that is available to authorized users once you have logged on. Please use Log in button above to access the full document. After log in, if you do not have the right authorization for this document, there will be instructions on what to do next.

Document Information

More support for:
Tivoli Netcool Configuration Manager

Software version:
6.3.0, 6.4, 6.4.1, 6.4.2

Operating system(s):
Linux, Solaris, AIX

Document number:
481435

Modified date:
09 May 2025

UID

swg21614665

Manage My Notification Subscriptions