when the "parallelAnnotationScanning" property was introduced in StandardContext the descriptor file mbeans-descriptors.xml was also changed see https://github.com/apache/tomcat/commit/101476c3536ac09a105d0b603b2c51dd0f3770e9 but is missing the `is="true"` attribute. without that attribute all calls to the JmxProxyServlet are causing an error that is written to the catalina.out 10-Feb-2021 17:43:56.703 SCHWERWIEGEND [http-nio-8080-exec-1] org.apache.catalina.mbeans.MBeanDumper.dumpBeans Error getting attribute [parallelAnnotationScanning] for object name [Catalina:j2eeType=WebModule,name=//localhost/example,J2EEApplication=none,J2EEServer=none] javax.management.ReflectionException: Cannot find getter method [getParallelAnnotationScanning] on resource [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/example]] at org.apache.tomcat.util.modeler.ManagedBean.getGetter(ManagedBean.java:457) at org.apache.tomcat.util.modeler.BaseModelMBean.getAttribute(BaseModelMBean.java:168) at java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(DefaultMBeanServerInterceptor.java:641) at java.management/com.sun.jmx.mbeanserver.JmxMBeanServer.getAttribute(JmxMBeanServer.java:678) at org.apache.catalina.mbeans.MBeanDumper.dumpBeans(MBeanDumper.java:87) at org.apache.catalina.manager.JMXProxyServlet.listBeans(JMXProxyServlet.java:193) at org.apache.catalina.manager.JMXProxyServlet.doGet(JMXProxyServlet.java:129) at javax.servlet.http.HttpServlet.service(HttpServlet.java:626) at javax.servlet.http.HttpServlet.service(HttpServlet.java:733) ... Caused by: java.lang.NoSuchMethodException: org.apache.catalina.core.StandardContext.getParallelAnnotationScanning() at java.base/java.lang.Class.getMethod(Class.java:2201) at org.apache.tomcat.util.modeler.ManagedBean.getGetter(ManagedBean.java:450) ... 57 more the get method is defined in StandardContext as `boolean isParallelAnnotationScanning()` but because of the missing is=true it Is expected to find a method `boolean getParallelAnnotationScanning()` this bug is present in all versions since 9.0.39
The use of "is" is error prone here, it slipped by in a PR. The method is now using "get" instead, with a deprecated "is" still staying for a while. The fix will be in Tomcat 9.0.44 and 10.0.3.