rumanod / jain-slee

Automatically exported from code.google.com/p/jain-slee
0 stars 0 forks source link

NPE thrown when accessing EventRouterStatistics when statistics are disabled #95

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When statistics collection is disable, if one tries to read them through JMX 
(eg: jmx-console, accessing 
http://127.0.0.1:8080/jmx-console/HtmlAdaptor?action=inspectMBean&name=org.mobic
ents.slee%3Aname%3DEventRouterStatistics) a NullPointerException is thrown.

Stacktrace:

2013-07-19 08:40:23,129 ERROR 
[org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/jmx-console].[
HtmlAdaptor]] Servlet.service() for servlet HtmlAdaptor threw exception 
java.lang.NullPointerException 
at 
org.mobicents.slee.runtime.eventrouter.stats.EventRouterStatisticsImpl.getAverag
eEventRoutingTime(EventRouterStatisticsImpl.java:88) 
at 
org.mobicents.slee.runtime.eventrouter.stats.EventRouterStatisticsImpl.toString(
EventRouterStatisticsImpl.java:242) 
at 
org.mobicents.slee.container.management.jmx.EventRouterStatistics.printAllStats(
EventRouterStatistics.java:232) 
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:43) 
at java.lang.reflect.Method.invoke(Method.java:601) 
at 
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157
) 
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96) 
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88) 
at 
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264) 
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668) 
at org.jboss.jmx.adaptor.control.Server.invokeOpByName(Server.java:258) 
at org.jboss.jmx.adaptor.control.Server.invokeOp(Server.java:223) 
at 
org.jboss.jmx.adaptor.html.HtmlAdaptorServlet$3.run(HtmlAdaptorServlet.java:380)

at 
org.jboss.jmx.adaptor.html.HtmlAdaptorServlet$3.run(HtmlAdaptorServlet.java:377)

at java.security.AccessController.doPrivileged(Native Method) 
at 
org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.invokeOp(HtmlAdaptorServlet.java:3
76) 
at 
org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.invokeOp(HtmlAdaptorServlet.java:2
87) 
at 
org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.processRequest(HtmlAdaptorServlet.
java:104) 
at 
org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.doPost(HtmlAdaptorServlet.java:86)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) 
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) 
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilt
erChain.java:290) 
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.
java:206) 
at 
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:9
6) 
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilt
erChain.java:235) 
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.
java:206) 
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:2
35) 
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:1
91) 
at 
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociatio
nValve.java:190) 
at 
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92) 
at 
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(Security
ContextEstablishmentValve.java:126) 
at 
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityC
ontextEstablishmentValve.java:70) 
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) 
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) 
at 
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionVa
lve.java:158) 
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109
) 
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330) 
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829) 
at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Pr
otocol.java:598) 
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) 
at java.lang.Thread.run(Thread.java:722)

Original issue reported on code.google.com by brainslog on 2 Sep 2013 at 11:04

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 0a888869557a.

Original comment by EMMart...@gmail.com on 25 Jun 2014 at 3:26

GoogleCodeExporter commented 9 years ago

Original comment by EMMart...@gmail.com on 25 Jun 2014 at 3:33