NullPointerException is occurring at com.snc.sw.util.HDProbeExtensionImpl.addComputerSystemDTO(HDProbeExtensionImpl.java:306) due to timing issue where a reference is flipping from a value back to null


Description

NullPointerException is occurring at com.snc.sw.util.HDProbeExtensionImpl.addComputerSystemDTO(HDProbeExtensionImpl.java:306) due to timing issue where a reference is flipping from a value back to null, but running the input after the items have been discovered results in a successful discovery (the ci_sys_id is most likely populated)

The NullPointerException is coming from this stack trace that is now populating in the discovery log:
Sensor error when processing Horizontal Pattern: ----------------------------- Stack: com.snc.sw.util.HDProbeExtensionImpl.addComputerSystemDTO(HDProbeExtensionImpl.java:306) com.snc.sw.util.HDProbeExtensionImpl.addExternalParameters(HDProbeExtensionImpl.java:99) com.snc.core_automation.Probe.createWithoutReassignment(Probe.java:933) com.snc.core_automation.Probe.createForMidServer(Probe.java:987) com.snc.core_automation.Probe.createEx(Probe.java:891) com.snc.core_automation.Probe.create(Probe.java:833) sun.reflect.GeneratedMethodAccessor1819.invoke(Unknown Source) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:498) org.mozilla.javascript.MemberBox.invoke(MemberBox.java:138) org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:292) org.mozilla.javascript.ScriptRuntime.doCall(ScriptRuntime.java:2585) org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:42) org.mozilla.javascript.gen.sys_script_include_3ee7cdf0c0a801645b4b4d71a122210f_script_26068._c_anonymous_29(sys_script_include.3ee7cdf0c0a801645b4b4d71a122210f.script:720) org.mozilla.javascript.gen.sys_script_include_3ee7cdf0c0a801645b4b4d71a122210f_script_26068.call(sys_script_include.3ee7cdf0c0a801645b4b4d71a122210f.script) org.mozilla.javascript.ScriptRuntime.doCall2(ScriptRuntime.java:2651) org.mozilla.javascript.ScriptRuntime.doCall(ScriptRuntime.java:2590) org.mozilla.javascript.optimizer.OptRuntime.callProp0(OptRuntime.java:85) org.mozilla.javascript.gen.discovery_sensor_2f32f7899f230200fe2ab0aec32e706a_26067._c_anonymous_2(discovery_sensor.2f32f7899f230200fe2ab0aec32e706a:205) org.mozilla.javascript.gen.discovery_sensor_2f32f7899f230200fe2ab0aec32e706a_26067.call(discovery_sensor.2f32f7899f230200fe2ab0aec32e706a) org.mozilla.javascript.ScriptRuntime.doCall2(ScriptRuntime.java:2651) org.mozilla.javascript.ScriptRuntime.doCall(ScriptRuntime.java:2590) org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32) org.mozilla.javascript.gen.sys_script_include_778011130a0a0b2500c4595ad1d1d768_script_26069._c_anonymous_5(sys_script_include.778011130a0a0b2500c4595ad1d1d768.script:197) org.mozilla.javascript.gen.sys_script_include_778011130a0a0b2500c4595ad1d1d768_script_26069.call(sys_script_include.778011130a0a0b2500c4595ad1d1d768.script) org.mozilla.javascript.ScriptRuntime.doCall2(ScriptRuntime.java:2651) org.mozilla.javascript.ScriptRuntime.doCall(ScriptRuntime.java:2590) org.mozilla.javascript.optimizer.OptRuntime.callProp0(OptRuntime.java:85) org.mozilla.javascript.gen.sys_script_include_778011130a0a0b2500c4595ad1d1d768_script_26069._c_anonymous_4(sys_script_include.778011130a0a0b2500c4595ad1d1d768.script:149) org.mozilla.javascript.gen.sys_script_include_778011130a0a0b2500c4595ad1d1d768_script_26069.call(sys_script_include.778011130a0a0b2500c4595ad1d1d768.script) org.mozilla.javascript.ScriptRuntime.doCall2(ScriptRuntime.java:2651) org.mozilla.javascript.ScriptRuntime.doCall(ScriptRuntime.java:2590) org.mozilla.javascript.optimizer.OptRuntime.callProp0(OptRuntime.java:85) org.mozilla.javascript.gen.sys_script_include_778011130a0a0b2500c4595ad1d1d768_script_26069._c_anonymous_3(sys_script_include.778011130a0a0b2500c4595ad1d1d768.script:112) org.mozilla.javascript.gen.sys_script_include_778011130a0a0b2500c4595ad1d1d768_script_26069.call(sys_script_include.778011130a0a0b2500c4595ad1d1d768.script) org.mozilla.javascript.ScriptRuntime.doCall2(ScriptRuntime.java:2651) org.mozilla.javascript.ScriptRuntime.doCall(ScriptRuntime.java:2590) org.mozilla.javascript.optimizer.OptRuntime.callProp0(OptRuntime.java:85) org.mozilla.javascript.gen.sys_script_include_778011130a0a0b2500c4595ad1d1d768_script_26069._c_anonymous_1(sys_script_include.778011130a0a0b2500c4595ad1d1d768.script:25) org.mozilla.javascript.gen.sys_script_include_778011130a0a0b2500c4595ad1d1d768_script_26069.call(sys_script_include.778011130a0a0b2500c4595ad1d1d768.script) org.mozilla.javascript.ScriptRuntime.doCall2(ScriptRuntime.java:2651) org.mozilla.javascript.ScriptRuntime.doCall(ScriptRuntime.java:2590) org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2549) org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:300) org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:102) org.mozilla.javascript.ScriptRuntime.doCall2(ScriptRuntime.java:2651) org.mozilla.javascript.ScriptRuntime.doCall(ScriptRuntime.java:2590) org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1501) org.mozilla.javascript.Interpreter.interpret(Interpreter.java:829) org.mozilla.javascript.InterpretedFunction.lambda$call$0(InterpretedFunction.java:152) org.mozilla.javascript.Context$ScriptCaller.call(Context.java:2939) org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:151) org.mozilla.javascript.BaseFunction.construct(BaseFunction.java:372) org.mozilla.javascript.ScriptRuntime.newObject(ScriptRuntime.java:2449) org.mozilla.javascript.ScriptRuntime.newObjectEx(ScriptRuntime.java:2464) org.mozilla.javascript.gen.discovery_sensor_2f32f7899f230200fe2ab0aec32e706a_26067._c_script_0(discovery_sensor.2f32f7899f230200fe2ab0aec32e706a:1) org.mozilla.javascript.gen.discovery_sensor_2f32f7899f230200fe2ab0aec32e706a_26067.call(discovery_sensor.2f32f7899f230200fe2ab0aec32e706a) org.mozilla.javascript.gen.discovery_sensor_2f32f7899f230200fe2ab0aec32e706a_26067.exec(discovery_sensor.2f32f7899f230200fe2ab0aec32e706a) com.glide.script.ScriptEvaluator.execute(ScriptEvaluator.java:279) com.glide.script.ScriptEvaluator.evaluateString(ScriptEvaluator.java:118) com.glide.script.ScriptEvaluator.evaluateString(ScriptEvaluator.java:82) com.snc.discovery.DiscoveryUtils.evaluateStringWithCurrent(DiscoveryUtils.java:98) com.snc.discovery.sensor.processor.JavascriptSensor.process(JavascriptSensor.java:54) com.snc.discovery.sensor.ASensor.processSensor(ASensor.java:79) com.snc.discovery.sensor.ASensor.run(ASensor.java:73) com.snc.discovery.SensorEvaluator.run(SensorEvaluator.java:39) com.snc.discovery.SensorProcessor.processSensor(SensorProcessor.java:561) com.snc.discovery.SensorProcessor.processSensors(SensorProcessor.java:512) com.snc.discovery.SensorProcessor.processSinglePage(SensorProcessor.java:403) com.snc.discovery.SensorProcessor.process(SensorProcessor.java:217) sun.reflect.GeneratedMethodAccessor1643.invoke(Unknown Source) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:498) org.mozilla.javascript.MemberBox.invoke(MemberBox.java:138) org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:292) org.mozilla.javascript.ScriptRuntime.doCall(ScriptRuntime.java:2585) org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1501) org.mozilla.javascript.Interpreter.interpret(Interpreter.java:829) org.mozilla.javascript.InterpretedFunction.lambda$call$0(InterpretedFunction.java:152) org.mozilla.javascript.Context$ScriptCaller.call(Context.java:2939) org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:151) org.mozilla.javascript.ScriptRuntime.doCall2(ScriptRuntime.java:2651) org.mozilla.javascript.ScriptRuntime.doCall(ScriptRuntime.java:2590) org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1501) org.mozilla.javascript.Interpreter.interpret(Interpreter.java:829) org.mozilla.javascript.InterpretedFunction.lambda$call$0(InterpretedFunction.java:152) org.mozilla.javascript.Context$ScriptCaller.call(Context.java:2939) org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:151) org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:563) org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3429) org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:164) com.glide.script.ScriptEvaluator.execute(ScriptEvaluator.java:279) com.glide.script.ScriptEvaluator.evaluateString(ScriptEvaluator.java:118) com.glide.script.ScriptEvaluator.evaluateString(ScriptEvaluator.java:82) com.glide.script.Evaluator.evaluatePossiblePrefixedString(Evaluator.java:210) com.glide.job.RunScriptJob.evaluateScript(RunScriptJob.java:166) com.glide.job.RunScriptJob.execute(RunScriptJob.java:87) com.glide.schedule.JobExecutor.lambda$executeJob$0(JobExecutor.java:108) com.glide.schedule.JobExecutor.executeJob(JobExecutor.java:111) com.glide.schedule.JobExecutor.execute(JobExecutor.java:95) com.glide.schedule_v2.SchedulerWorkerThread.executeJob(SchedulerWorkerThread.java:329) com.glide.schedule_v2.SchedulerWorkerThread.lambda$process$0(SchedulerWorkerThread.java:192) com.glide.worker.TransactionalWorkerThread.executeInTransaction(TransactionalWorkerThread.java:35) com.glide.schedule_v2.SchedulerWorkerThread.process(SchedulerWorkerThread.java:192) com.glide.schedule_v2.SchedulerWorkerThread.run(SchedulerWorkerThread.java:100) Message: ----------------------------- (sys_script_include.778011130a0a0b2500c4595ad1d1d768.script; line 53)

Steps to Reproduce

Running a quick discovery on AIX Server and observing NullPointerException is occurring at com.snc.sw.util.HDProbeExtensionImpl.addComputerSystemDTO(HDProbeExtensionImpl.java:306).NullPointerException is occurring at com.snc.sw.util.HDProbeExtensionImpl.addComputerSystemDTO(HDProbeExtensionImpl.java:306).

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.

The only workaround to get the device CI to populate would be to rerun the failed ECC Queue input (or the AIX server output) after the initial discovery. The data the sensor depends on will be there by then.


Related Problem: PRB1456202