Support Migration Notice: To update migrated JIRA cases click here to open a new case use | vFabric Hyperic 5.7.0 is Now Available

Hyperic HQ

NPE when MBean ObjectName key properties have extra spaces before property name


  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Trivial Trivial
  • Resolution: Cannot Reproduce
  • Affects Version/s: 4.2.0
  • Fix Version/s: None
  • Component/s: None


From the bug list:
"Tried to import a custom JMX bean, that has this objectName :

@ManagedResource(objectName = "spring.application:application=poc-jmx-spring, type=WS,name=ShowService",description = "Show REST WebService")

Notice the space in : ", type=". It provokes a NullPointerException in org.hyperic.hq.product.jmxServiceTypeFactory because objectName.getKeyProperty("type") is returned null !!"

From me:
When the String is turned directly into an ObjectName (new ObjectName("spring.application:application=poc-jmx-spring, type=WS,name=ShowService")), JMX actually is not stripping the space after the comma and considers the property name to be " type" instead of "type". This behavior is documented in ObjectName javadoc ( - search for the word "spaces" in the beginning section).

Not sure what (if anything) can be done about that, but we should at least be handling a null value of the "type" key property better than throwing an NPE.


David Wiener added a comment -

Closed due to being outdated

David Wiener added a comment - Closed due to being outdated


Vote (0)
Watch (0)


  • Created:
    Last comment:
    3 years, 16 weeks, 6 days ago