Script include that calls JDBCProbe fails with java.lang.NullPointerExceptionDescription<!-- div.margin{ padding: 10px 40px 40px 30px; } table.tocTable{ border: 1px solid; border-color:#E0E0E0; background-color: rgb(245, 245, 245); padding-top: .6em; padding-bottom: .6em; padding-left: .9em; padding-right: .6em; } table.noteTable{ border:1px solid; border-color:#E0E0E0; background-color: rgb(245, 245, 245); width: 100%; border-spacing:2; } table.internalTable{ border:1px solid; border-color:#E0E0E0; background-color: rgb(245, 245, 245); width: 100%; border-spacing:0; } .sp td{ border-bottom: 1px solid; border-right: 1px solid; border-color:#E0E0E0; background-color: #ffffff; height: 20px; padding-top: .5em; padding-bottom: .5em; padding-left: .5em; padding-right: .5em; } .sphr td{ border-right: 1px solid; border-bottom: 1px solid; border-color:#E0E0E0; background-color: rgb(245, 245, 245); padding-top: .5em; padding-bottom: .5em; padding-left: .5em; padding-right: .5em; height: 20px; } .title { color: #D1232B; font-weight:; font-size:25px; } .hd1{ color: #D1232B; font-weight:; font-size:18px; } .hd2{ color: #646464; font-weight:bold; font-size:16px; } .hd3{ color: #7a7a7a; font-weight:; font-size:16 px; text-decoration:; } .hd4{ color: #000000; font-weight:bold; font-size:14 px; text-decoration:; } --> Script include that calls JDBCProbe fails with java.lang.NullPointerException Problem When executing a script include that calls the JDBCProbe, through the ECC queue, it fails with the following error: 03/23/16 14:39:31 (664) Worker-Standard:JDBCProbe Detect JDBCConnection interrupted. Retry: 1 of 3 03/23/16 14:39:31 (664) Worker-Standard:JDBCProbe SEVERE *** ERROR *** java.lang.NullPointerExceptionjava.util.concurrent.ConcurrentHashMap.replaceNode(ConcurrentHashMap.java:1106)java.util.concurrent.ConcurrentHashMap.remove(ConcurrentHashMap.java:1097)com.service_now.mid.message_executors.CancelProbeExecutor.deregisterProbe(CancelProbeExecutor.java:25)com.service_now.mid.probe.JDBCProbe.probe(JDBCProbe.java:123)com.service_now.mid.probe.AProbe.process(AProbe.java:80)com.service_now.mid.queue_worker.AWorker.runWorker(AWorker.java:107)com.service_now.mid.queue_worker.AWorkerThread.run(AWorkerThread.java:20)java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)java.lang.Thread.run(Thread.java:745) The MID Server log shows the following error: 03/23/16 14:39:16 (952) ECCQueueMonitor.5 SEVERE *** ERROR *** Error while registering probe: Thread-1007 to cancel, no agent_correlator value Symptoms This issue occurs in Geneva or later releases but works correctly in prior releases.The JDBCProbe script include does not add agent_correlator to the output ecc_queue record Cause The agent_correlator is a new requirement for ecc_queue records in Geneva. This field associates outbound requests with the resulting response record in the ECC queue. This issue occurs because the JDBC Probe that is created via the script include is not providing a value for the agent_correlator field. Therefore, when the MID server processes the response to the JDBCProbe, it fails to find a value and throws a null pointer exception. Resolution In the create section of the script include, set the agent_correlator field as follows: u.agent_correlator=u.addParameter('agent_correlator',gs.generateGUID()); The following example shows a complete script include that calls the JDBCProbe: // Obtain MID Servervar mid = new GlideRecord('ecc_agent');mid.addQuery('name','MIDSERVERTEST');mid.query();mid.next(); // Get a specific Data Source (predefined to connect to a specific database instance)var ds = new GlideRecord('sys_data_source');ds.addQuery('name','TestDBA');ds.query();ds.next();gs.log("DataSource:" + ds.sys_id); //Create a JDBC Probe to Select/Queryvar u = new JDBCProbe(mid.name);u.agent_correlator=u.addParameter('agent_correlator',gs.generateGUID());u.setDataSource(ds.sys_id);u.setFunction('SELECT');u.setTable("dba.companies");u.addParameter('skip_sensor','true');u.create();