Support Migration Notice: To update migrated JIRA cases click here to open a new case use www.vmware.com/go/sr | vFabric Hyperic 5.7.0 is Now Available

Hyperic HQ

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

Details

  • 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

Description

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 (http://java.sun.com/j2se/1.5.0/docs/api/javax/management/ObjectName.html - 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.

Activity

Hide
David Wiener added a comment -

Closed due to being outdated

Show
David Wiener added a comment - Closed due to being outdated

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved:
    Last comment:
    1 year, 36 weeks, 2 days ago