Summary: | NIO Connector: Exception invoking method readBufSize / writeBufSize in the JMX Proxy Servlet | ||
---|---|---|---|
Product: | Tomcat 7 | Reporter: | Sven Woltmann <sven.asf> |
Component: | Connectors | Assignee: | Tomcat Developers Mailing List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | 7.0.25 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Linux |
Description
Sven Woltmann
2012-02-15 11:47:03 UTC
Fixed in trunk and 7.0.x and will be included in 7.0.26 onwards. For reference: The NPE was thrown from the following code in SocketProperties, where Integer txBufSize is null: public int getTxBufSize() { return txBufSize.intValue(); } MBeanDumper#dumpBeans() skips null values. It is OK to skip such NPEs as well. The fix in 7.0.26 is r1244746 Hi, It's strange but I've got almost the same exception but at Tomcat 8.0.33. 2017-07-20 14:18:45,572 ERROR [chedulerFactoryBean#0_Worker-9] [shc.ecom.sywlocal.monitoring.HTTPReporter] - Got exception: javax.management.RuntimeOperationsException: Exception invoking method writeBufSize at org.apache.tomcat.util.modeler.BaseModelMBean.getAttribute(BaseModelMBean.java:196) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(DefaultMBeanServerInterceptor.java:647) at com.sun.jmx.mbeanserver.JmxMBeanServer.getAttribute(JmxMBeanServer.java:678) at com.codahale.metrics.JmxAttributeGauge.getValue(JmxAttributeGauge.java:44) at com.shc.ecom.sywlocal.monitoring.HTTPReporter.createMeasurementObject(HTTPReporter.java:123) at com.shc.ecom.sywlocal.monitoring.HTTPReporter.createWebContainerData(HTTPReporter.java:363) at com.shc.ecom.sywlocal.monitoring.HTTPReporter.createMeasurementObjects(HTTPReporter.java:151) at com.shc.ecom.sywlocal.monitoring.HTTPReporter.report(HTTPReporter.java:89) at sun.reflect.GeneratedMethodAccessor151.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:269) at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:312) at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:114) at org.quartz.core.JobRunShell.run(JobRunShell.java:202) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:525) Caused by: java.lang.NullPointerException at org.apache.tomcat.util.net.SocketProperties.getTxBufSize(SocketProperties.java:300) at org.apache.tomcat.util.net.NioEndpoint.getWriteBufSize(NioEndpoint.java:493) at sun.reflect.GeneratedMethodAccessor147.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.tomcat.util.modeler.BaseModelMBean.getAttribute(BaseModelMBean.java:189) ... 15 more Will create proper bug for Tomcat 8.0.33 later. Thanks, Evgeny Kochnev and ... 2017-07-20 14:15:37,491 ERROR [chedulerFactoryBean#0_Worker-9] [shc.ecom.sywlocal.monitoring.HTTPReporter] - Got exception: javax.management.RuntimeOperationsException: Exception invoking method readBufSize at org.apache.tomcat.util.modeler.BaseModelMBean.getAttribute(BaseModelMBean.java:196) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(DefaultMBeanServerInterceptor.java:647) at com.sun.jmx.mbeanserver.JmxMBeanServer.getAttribute(JmxMBeanServer.java:678) at com.codahale.metrics.JmxAttributeGauge.getValue(JmxAttributeGauge.java:44) at com.shc.ecom.sywlocal.monitoring.HTTPReporter.createMeasurementObject(HTTPReporter.java:123) at com.shc.ecom.sywlocal.monitoring.HTTPReporter.createWebContainerData(HTTPReporter.java:363) at com.shc.ecom.sywlocal.monitoring.HTTPReporter.createMeasurementObjects(HTTPReporter.java:151) at com.shc.ecom.sywlocal.monitoring.HTTPReporter.report(HTTPReporter.java:89) 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:498) at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:269) at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:312) at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:114) at org.quartz.core.JobRunShell.run(JobRunShell.java:202) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:525) Caused by: java.lang.NullPointerException at org.apache.tomcat.util.net.SocketProperties.getRxBufSize(SocketProperties.java:272) at org.apache.tomcat.util.net.NioEndpoint.getReadBufSize(NioEndpoint.java:497) at sun.reflect.GeneratedMethodAccessor121.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.tomcat.util.modeler.BaseModelMBean.getAttribute(BaseModelMBean.java:189) ... 16 more More info ... It happens when I try to get: ThreadPool.ajp-nio-8009.readBufSize or ThreadPool.ajp-nio-8009.writeBufSize Thanks, Evgeny Kochnev |