740 views

Description

JavaScript evaluation error on:
gs.include('PrototypeServer');gs.include('InstanceStats');if (gs.include('MonitorStats')) {new MonitorStats().run();}

Root cause of JavaScriptException: java.lang.NullPointerException
: java.lang.NullPointerException:

java.lang.NullPointerException: org.mozilla.javascript.JavaScriptException: java.lang.NullPointerException: org.mozilla.javascript.Context.makeJavaScriptException(Context.java:1916)
org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1902)
org.mozilla.javascript.MemberBox.invoke(MemberBox.java:143)
org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:292)
org.mozilla.javascript.ScriptRuntime.doCall(ScriptRuntime.java:2577)
org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)
org.mozilla.javascript.gen.sys_script_include_49d297fc0a0a0b070036b960fdfef863_77._c_anonymous_6(sys_script_include.49d297fc0a0a0b070036b960fdfef863:100)
org.mozilla.javascript.gen.sys_script_include_49d297fc0a0a0b070036b960fdfef863_77.call(sys_script_include.49d297fc0a0a0b070036b960fdfef863)
org.mozilla.javascript.ScriptRuntime.doCall2(ScriptRuntime.java:2645)
org.mozilla.javascript.ScriptRuntime.doCall(ScriptRuntime.java:2582)
org.mozilla.javascript.optimizer.OptRuntime.callProp0(OptRuntime.java:85)
org.mozilla.javascript.gen.sys_script_include_49d297fc0a0a0b070036b960fdfef863_77._c_anonymous_1(sys_script_include.49d297fc0a0a0b070036b960fdfef863:28)
org.mozilla.javascript.gen.sys_script_include_49d297fc0a0a0b070036b960fdfef863_77.call(sys_script_include.49d297fc0a0a0b070036b960fdfef863)
org.mozilla.javascript.ScriptRuntime.doCall2(ScriptRuntime.java:2645)
org.mozilla.javascript.ScriptRuntime.doCall(ScriptRuntime.java:2582)
org.mozilla.javascript.optimizer.OptRuntime.callProp0(OptRuntime.java:85)
org.mozilla.javascript.gen._refname__75._c_script_0(<refname>:1)
org.mozilla.javascript.gen._refname__75.call(<refname>)
org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:560)
org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3439)
org.mozilla.javascript.gen._refname__75.call(<refname>)
org.mozilla.javascript.gen._refname__75.exec(<refname>)
com.glide.script.ScriptEvaluator.execute(ScriptEvaluator.java:236)
com.glide.script.ScriptEvaluator.evaluateString(ScriptEvaluator.java:107)
com.glide.script.ScriptEvaluator.evaluateString(ScriptEvaluator.java:73)
com.glide.script.ScriptEvaluator.evaluateString(ScriptEvaluator.java:64)
com.glide.script.Evaluator.evaluateString(Evaluator.java:91)
com.glide.ui.monitor.MonitorWriter.run(MonitorWriter.java:43)

Steps to Reproduce

The steps to reproduce are not clear for this issue, however, you will start to see the following errors in the Error Logs:

java.lang.NullPointerException: org.mozilla.javascript.JavaScriptException: java.lang.NullPointerException: org.mozilla.javascript.Context.makeJavaScriptException(Context.java:1916) org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1902) org.mozilla.javascript.MemberBox.invoke(MemberBox.java:143) org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:292) org.mozilla.javascript.ScriptRuntime.doCall(ScriptRuntime.java:2577) org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32) org.mozilla.javascript.gen.sys_script_include_49d297fc0a0a0b070036b960fdfef863_77._c_anonymous_6(sys_script_include.49d297fc0a0a0b070036b960fdfef863:100) org.mozilla.javascript.gen.sys_script_include_49d297fc0a0a0b070036b960fdfef863_77.call(sys_script_include.49d297fc0a0a0b070036b960fdfef863) org.mozilla.javascript.ScriptRuntime.doCall2(ScriptRuntime.java:2645) org.mozilla.javascript.ScriptRuntime.doCall(ScriptRuntime.java:2582) org.mozilla.javascript.optimizer.OptRuntime.callProp0(OptRuntime.java:85) org.mozilla.javascript.gen.sys_script_include_49d297fc0a0a0b070036b960fdfef863_77._c_anonymous_1(sys_script_include.49d297fc0a0a0b070036b960fdfef863:28) org.mozilla.javascript.gen.sys_script_include_49d297fc0a0a0b070036b960fdfef863_77.call(sys_script_include.49d297fc0a0a0b070036b960fdfef863) org.mozilla.javascript.ScriptRuntime.doCall2(ScriptRuntime.java:2645) org.mozilla.javascript.ScriptRuntime.doCall(ScriptRuntime.java:2582) org.mozilla.javascript.optimizer.OptRuntime.callProp0(OptRuntime.java:85) org.mozilla.javascript.gen._refname__75._c_script_0(<refname>:1) org.mozilla.javascript.gen._refname__75.call(<refname>) org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:560) org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3439) org.mozilla.javascript.gen._refname__75.call(<refname>) org.mozilla.javascript.gen._refname__75.exec(<refname>) com.glide.script.ScriptEvaluator.execute(ScriptEvaluator.java:236) com.glide.script.ScriptEvaluator.evaluateString(ScriptEvaluator.java:107) com.glide.script.ScriptEvaluator.evaluateString(ScriptEvaluator.java:73) com.glide.script.ScriptEvaluator.evaluateString(ScriptEvaluator.java:64) com.glide.script.Evaluator.evaluateString(Evaluator.java:91) com.glide.ui.monitor.MonitorWriter.run(MonitorWriter.java:43)

Workaround

Do not disable the MonitorStats Script Include or we will stop capturing data for the JRobin performance graphs.

To relieve this error, comment out line 28 so we stop recording the servlet disk stats, which is where the NullPointerException is coming from. These stats are not critical.

https://<instance_name>.service-now.com/sys_script_include.do?sys_id=49d297fc0a0a0b070036b960fdfef863
// the disk partition monitor
this._writePartition(); > Comment out this line


Related Problem: PRB758794

Seen In

There is no data to report.

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2017-05-26 12:33:15
Published:2017-05-01