Project: talendesb
Issue TESB-3855: Statistics broken if cJavaDSLProcessor used in route
If a route contains a cJavaDSLProcessor, statistics don't work when the route is executed in route builder. Instead an exception is thrown: javax.management.RuntimeOperationsException: Exception occurred trying to invoke the getter on the MBean com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(DefaultMBeanServerInterceptor.java:645) com.sun.jmx.mbeanserver.JmxMBeanServer.getAttribute(JmxMBeanServer.java:638) routines.system.CamelStat.updateStatOnConnection(CamelStat.java:399) esbtest.retrymessage_0_1.retryMessage$MyStatThread.run(retryMessage.java:137) esbtest.retrymessage_0_1.retryMessage$1CamelImpl.doStart(retryMessage.java:230) org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:67) org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:54) org.apache.camel.impl.MainSupport.run(MainSupport.java:136) esbtest.retrymessage_0_1.retryMessage.Route(retryMessage.java:364) esbtest.retrymessage_0_1.retryMessage.runJobInTOS(retryMessage.java:485) esbtest.retrymessage_0_1.retryMessage.main(retryMessage.java:398) Caused by: java.lang.IllegalArgumentException: Object name cannot be null	... 11 more Line 137 in the generated Java code for the route (retryMessage.java) tries to update the statistics of the cJavaDSLProcessor: stats.updateStatOnConnection("route14", 1, "cJavaDSLProcessor_2"); WHen the cJavaDSLProcessor is removed/deactivated, statistics work fine.
Story points: 3