JBoss ON live metric page displays Globally uncaught exception when live value is null

Solution Unverified - Updated

Environment

  • Red Hat JBoss Operations Network (JBoss ON) 3.3 Update 11 and earlier
  • Monitoring page that includes at least 1 trends up metric

Issue

  • Globally uncaught exception on threading monitoring tab

  • Metric page fails to load with generic error:

      com.google.gwt.core.client.JavaScriptException:(TypeError) : src is null
      --- STACK TRACE FOLLOWS ---
      (TypeError) : src is null
         at Unknown.isJavaObject(Unknown Source)
         at Unknown.toString__devirtual$(Unknown Source)
         at Unknown.$buildLiveValue(Unknown Source)
    

Resolution

Beginning in JBoss ON 3.3 Update 12, undefined or null values returned for a requested metric are properly handled in the user interface (UI).

Root Cause

When a metric that trends up has not yet had a value calculated by the managed resource, it would result in the metric's value being set to null. When the toString method would be invoked on the null object, it would result in a NullPointerException from within the user interface (UI). This would then cause a UI error message of Globally uncaught exception.

This issue was reported in This content is not included.Red Hat Bug 1687368

SBR
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.