glassfish
  1. glassfish
  2. GLASSFISH-18592

Registration of secure-admin-principal config bean as MBean results in AMX exception

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0_b35
    • Component/s: admin
    • Labels:
      None

      Description

      The following log message is generated during a GlassFish quicklook run:

      [#|2012-04-03T16:44:22.931+0530|WARNING|44.0|javax.enterprise.system.amx.org.glassfish.admin.amx.impl.config|_ThreadID=17;_ThreadName=Thread-2;|Can't register config MBean: null
      java.lang.RuntimeException: Invalid character '=' in value part of property
      at org.glassfish.admin.amx.util.jmx.JMXUtil.newObjectName(JMXUtil.java:163)
      at org.glassfish.admin.amx.util.jmx.JMXUtil.newObjectName(JMXUtil.java:181)
      at org.glassfish.admin.amx.impl.util.ObjectNameBuilder.buildChildObjectName(ObjectNameBuilder.java:175)
      at org.glassfish.admin.amx.impl.config.AMXConfigLoader.buildObjectName(AMXConfigLoader.java:602)
      at org.glassfish.admin.amx.impl.config.AMXConfigLoader._registerConfigBeanAsMBean(AMXConfigLoader.java:499)
      at org.glassfish.admin.amx.impl.config.AMXConfigLoader.registerConfigBeanAsMBean(AMXConfigLoader.java:473)
      at org.glassfish.admin.amx.impl.config.AMXConfigLoader.access$100(AMXConfigLoader.java:80)
      at org.glassfish.admin.amx.impl.config.AMXConfigLoader$AMXConfigLoaderThread.registerOne(AMXConfigLoader.java:401)
      at org.glassfish.admin.amx.impl.config.AMXConfigLoader$AMXConfigLoaderThread.doRun(AMXConfigLoader.java:442)
      at org.glassfish.admin.amx.impl.config.AMXConfigLoader$AMXConfigLoaderThread.run(AMXConfigLoader.java:415)
      Caused by: javax.management.MalformedObjectNameException: Invalid character '=' in value part of property
      at javax.management.ObjectName.construct(ObjectName.java:602)
      at javax.management.ObjectName.<init>(ObjectName.java:1403)
      at org.glassfish.admin.amx.util.jmx.JMXUtil.newObjectName(JMXUtil.java:159)
      ... 9 more

      #]

      I changed the log message so that it reports the type and key values for the config bean, and got this:

      [#|2012-04-03T09:44:18.553-0700|WARNING|44.0|javax.enterprise.system.amx.org.glassfish.admin.amx.impl.config|_ThreadID=17;_ThreadName=Thread-2;|Can't register config MBean: type=secure-admin-principal, name=CN=adc2180966.us.oracle.com,OU=GlassFish,O=Oracle Corporation,L=Santa Clara,ST=California,C=US
      java.lang.RuntimeException: Invalid character '=' in value part of property

      So this message is related to the secure-admin-principal config bean.

      The "name" field in the MBean is taken from the "model.key" field in the ConfigBean. I'm not sure how the model.key field is determined, but I suspect this is related to the following declaration in the config bean:

      @Attribute(key=true)
      String getDn();

        Activity

        Hide
        Tim Quinn added a comment -

        Fix checked in.

        Project: glassfish
        Repository: svn
        Revision: 53780
        Author: tjquinn
        Date: 2012-05-02 19:28:35 UTC
        Link:

        Log Message:
        ------------
        Fix for 18592

        MBeans created for config beans use the name as declared in the config bean for part of the MBean name. For secure-admin-principal elements, the name is the DN which contains characters that are illegal in MBean names.

        The constructed ObjectName includes

        name=(name-from-config-bean)

        These changes quote the name-from-config-bean if it contains an illegal character.

        Revisions:
        ----------
        53780

        Modified Paths:
        ---------------
        trunk/main/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/impl/config/AMXConfigLoader.java

        Show
        Tim Quinn added a comment - Fix checked in. Project: glassfish Repository: svn Revision: 53780 Author: tjquinn Date: 2012-05-02 19:28:35 UTC Link: Log Message: ------------ Fix for 18592 MBeans created for config beans use the name as declared in the config bean for part of the MBean name. For secure-admin-principal elements, the name is the DN which contains characters that are illegal in MBean names. The constructed ObjectName includes name=(name-from-config-bean) These changes quote the name-from-config-bean if it contains an illegal character. Revisions: ---------- 53780 Modified Paths: --------------- trunk/main/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/impl/config/AMXConfigLoader.java

          People

          • Assignee:
            Tim Quinn
            Reporter:
            Tom Mueller
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: