[ https://issues.apache.org/jira/browse/SLING-5070?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Carsten Ziegeler closed SLING-5070. ----------------------------------- > ServletResolverCacheMBeanImpl throws NPE when cache is disabled > --------------------------------------------------------------- > > Key: SLING-5070 > URL: https://issues.apache.org/jira/browse/SLING-5070 > Project: Sling > Issue Type: Bug > Components: Servlets > Affects Versions: Servlets Resolver 2.3.6 > Reporter: Dirk Rudolph > Assignee: Carsten Ziegeler > Priority: Minor > Fix For: Servlets Resolver 2.3.8 > > > When setting the cache size configuration of SlingServletResolver to a value > < 5 the cache will be disabled and therefor the member will be null. This > causes a NPE in the MBean. So either the MBean is able to handle this or it > will not be registered in that case. > {code} > Caused by: java.lang.NullPointerException: null > at > org.apache.sling.servlets.resolver.internal.SlingServletResolver$ServletResolverCacheMBeanImpl.getCacheSize(SlingServletResolver.java:1383) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:497) > at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:497) > at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:275) > at > com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:112) > at > com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:46) > at > com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:237) > at > com.sun.jmx.mbeanserver.PerInterface.getAttribute(PerInterface.java:83) > at > com.sun.jmx.mbeanserver.MBeanSupport.getAttribute(MBeanSupport.java:206) > at javax.management.StandardMBean.getAttribute(StandardMBean.java:372) > at > com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(DefaultMBeanServerInterceptor.java:647) > ... 67 common frames omitted > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)