Notifications

49 views

Description

Pattern "MSSql DB On Windows Pattern" causes an error in the MID Server agent log 'org.mozilla.javascript.EcmaError: "rtrn" is not defined'

The following appears in the MID server agent log when the step is activated in the pattern. I could not get this step to execute when used with an SQLexpress server instance.

WARNING *** WARNING *** org.mozilla.javascript.EcmaError: "rtrn" is not defined. 

Caused by error in Ad hoc script 'EvalClosure-set the engine edition by the number' at line 27

The error seems to come from: "MSSql DB On Windows Pattern" in the "set the engine edition by the number" step. The area is rtrn variable which has not been initialized. 

Steps to Reproduce

Run discovery against an SQL server and check the mid server agent logs

Workaround

This problem has been fixed. If you are able to upgrade, review the Fixed In or Intended Fix Version fields to determine whether any versions have a planned or permanent fix.

What is happening:
The variable "serverproperty[1].engine_num" contains a value, but not one of the choices that are presented in the various IF statements.

At the end, it tries to return 'rtrn', but without a matching choice that variable is never declared/initialized.

The solution is to declare var rtrn = ''; on line 2.

 



See: set_the_engine_edition_by_the_number_fixed_by_initializing_retrn_var.PNG


Related Problem: PRB1329290

Seen In

There is no data to report.

Fixed In

New York

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2019-05-21 11:43:33
Published:2019-05-03
set_the_engine_edition_by_the_number_fixed_by_initializing_retrn_var.PNG