web connectors metrics uses long value as int in JBoss EAP 6.4

Solution Verified - Updated

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP) 6.4

Issue

  • In JBoss EAP 6.4, the 'bytesSent' metrics on web subsystem connectors is defined in the code to be ModelType.INT, but the data it received from the JBossWeb is a long.
  • We see the following exception checking bytesSent via CLI once it exceeds the int range:
java.lang.NumberFormatException: For input string: "2219513327"
at org.jboss.as.jmx.model.TypeConverters$IntegerValueAccessor.fromModelNode(TypeConverters.java:778)
at org.jboss.as.jmx.model.TypeConverters$SimpleTypeConverter.fromModelNode(TypeConverters.java:223)
at org.jboss.as.jmx.model.TypeConverters.fromModelNode(TypeConverters.java:114)
at org.jboss.as.jmx.model.ModelControllerMBeanHelper.getAttribute(ModelControllerMBeanHelper.java:257)
at org.jboss.as.jmx.model.ModelControllerMBeanHelper.getAttribute(ModelControllerMBeanHelper.java:212)
at org.jboss.as.jmx.model.ModelControllerMBeanServerPlugin.getAttribute(ModelControllerMBeanServerPlugin.java:127)
at org.jboss.as.jmx.PluggableMBeanServerImpl.getAttribute(PluggableMBeanServerImpl.java:356)
at org.jboss.as.jmx.BlockingNotificationMBeanServer.getAttribute(BlockingNotificationMBeanServer.java:148)
at org.jboss.remotingjmx.protocol.v2.ServerProxy$GetAttributeHandler.handle(ServerProxy.java:691)
at org.jboss.remotingjmx.protocol.v2.ServerCommon$MessageReciever$1$1.run(ServerCommon.java:153)
at org.jboss.as.jmx.ServerInterceptorFactory$Interceptor$1.run(ServerInterceptorFactory.java:75)
at org.jboss.as.jmx.ServerInterceptorFactory$Interceptor$1.run(ServerInterceptorFactory.java:70)
at org.jboss.as.jmx.ServerInterceptorFactory$Interceptor.handleEvent(ServerInterceptorFactory.java:70)
at org.jboss.remotingjmx.protocol.v2.ServerCommon$MessageReciever$1.run(ServerCommon.java:149)

Resolution

Root Cause

Components
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.