glassfish
  1. glassfish
  2. GLASSFISH-11403

Invalid JMX object name for deployment unit under Windows-OS

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: V3
    • Fix Version/s: not determined
    • Component/s: amx
    • Labels:
      None
    • Environment:

      Operating System: Windows Vista
      Platform: PC

    • Issuezilla Id:
      11,403

      Description

      Stack-Trace:

      [#|2010-01-07T13:54:25.435+0100|INFO|glassfishv3.0|javax.enterprise.system.tools.admin.org.glassfish.server|_ThreadID=30;_ThreadName=Thread-1;|Exception
      registering application: atm
      java.lang.RuntimeException: Cannot register
      J2EEApplication=C:-Development-projects-atm-trunk-projectroot-build-atm-domain-applications-atm
      as child of amx:pp=/J2EEDomain,type=J2EEServer,name=server,j2eeType=J2EEServer
      at
      org.glassfish.admin.amx.impl.j2ee.RegistrationSupport.registerJ2EEChild(RegistrationSupport.java:554)
      at
      org.glassfish.admin.amx.impl.j2ee.RegistrationSupport.createAppMBeans(RegistrationSupport.java:246)
      at
      org.glassfish.admin.amx.impl.j2ee.RegistrationSupport.processApplicationRef(RegistrationSupport.java:522)
      at
      org.glassfish.admin.amx.impl.j2ee.RegistrationSupport.registerApplications(RegistrationSupport.java:474)
      at
      org.glassfish.admin.amx.impl.j2ee.RegistrationSupport.<init>(RegistrationSupport.java:158)
      at
      org.glassfish.admin.amx.impl.j2ee.J2EEServerImpl.registerChildren(J2EEServerImpl.java:116)
      at
      org.glassfish.admin.amx.impl.j2ee.DASJ2EEServerImpl.registerChildren(DASJ2EEServerImpl.java:68)
      at
      org.glassfish.admin.amx.impl.mbean.AMXImplBase.postRegisterHook(AMXImplBase.java:1168)
      at
      org.glassfish.admin.amx.impl.mbean.MBeanImplBase.postRegister(MBeanImplBase.java:448)
      at
      com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.postRegisterInvoke(DefaultMBeanServerInterceptor.java:1035)
      at
      com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:974)
      at
      com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:917)
      at
      com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:312)
      at
      com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:482)
      at
      org.glassfish.admin.amx.impl.mbean.AMXImplBase.registerChild(AMXImplBase.java:1243)
      at
      org.glassfish.admin.amx.impl.j2ee.J2EEDomainImpl.registerChildren(J2EEDomainImpl.java:93)
      at
      org.glassfish.admin.amx.impl.mbean.AMXImplBase.postRegisterHook(AMXImplBase.java:1168)
      at
      org.glassfish.admin.amx.impl.mbean.MBeanImplBase.postRegister(MBeanImplBase.java:448)
      at
      com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.postRegisterInvoke(DefaultMBeanServerInterceptor.java:1035)
      at
      com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:974)
      at
      com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:917)
      at
      com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:312)
      at
      com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:482)
      at
      org.glassfish.admin.amx.impl.j2ee.loader.AMXJ2EEStartupService.loadAMXMBeans(AMXJ2EEStartupService.java:133)
      at
      org.glassfish.admin.amx.impl.AMXStartupService$AMXLoaderThread.run(AMXStartupService.java:321)
      Caused by: java.lang.RuntimeException: Invalid character ':' in value part of
      property
      at org.glassfish.admin.amx.util.jmx.JMXUtil.newObjectName(JMXUtil.java:158)
      at org.glassfish.admin.amx.util.jmx.JMXUtil.newObjectName(JMXUtil.java:176)
      at
      org.glassfish.admin.amx.impl.util.ObjectNameBuilder.buildChildObjectName(ObjectNameBuilder.java:188)
      at
      org.glassfish.admin.amx.impl.util.ObjectNameBuilder.buildChildObjectName(ObjectNameBuilder.java:145)
      at
      org.glassfish.admin.amx.impl.j2ee.RegistrationSupport.registerJ2EEChild(RegistrationSupport.java:549)
      ... 24 more
      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:154)
      ... 28 more

      #]

      Proposed patch:

      Index: deployment/dol/src/main/java/com/sun/enterprise/deployment/Application.java
      ===================================================================
      — deployment/dol/src/main/java/com/sun/enterprise/deployment/Application.java
      (revision 35236)
      +++ deployment/dol/src/main/java/com/sun/enterprise/deployment/Application.java
      (working copy)
      @@ -860,6 +860,7 @@
      */
      public void setName(String name) {
      name = name.replace('/', '-');
      + name = name.replace(':', '-'); // for building valid JMX object names
      name = name.replace('
      ', '-'); // for deploying from NT to solaris &
      vice versa. This will
      // need to be cleaned when we clean up the backend for registering apps
      super.setName(name);

        Activity

        Hide
        Hong Zhang added a comment -

        assign to lloyd for initial evaluation

        Show
        Hong Zhang added a comment - assign to lloyd for initial evaluation
        Hide
        llc added a comment -

        The ":" is the only real issue here for JMX.

        This could be fixed in AMX, or we can choose to not generate such application names (probably a good
        idea).

        Show
        llc added a comment - The ":" is the only real issue here for JMX. This could be fixed in AMX, or we can choose to not generate such application names (probably a good idea).
        Hide
        llc added a comment -

        For JMX ObjectNames, a '/' in the name is perfectly acceptable; it is already used intentionally for the "pp"
        attribute. A '\' is not a problem either.

        It is the ':" that is the issue.

        Go ahead and make the change for the ':', and unless there is a reason, I'd suggest not whacking the /
        and \ characters.

        Show
        llc added a comment - For JMX ObjectNames, a '/' in the name is perfectly acceptable; it is already used intentionally for the "pp" attribute. A '\' is not a problem either. It is the ':" that is the issue. Go ahead and make the change for the ':', and unless there is a reason, I'd suggest not whacking the / and \ characters.
        Hide
        llc added a comment -

        One concern I have here: make sure that we do not get a divergence from config/monitoring/runtime
        names otherwise there is no easy programmatic way to know what config or monitoring MBean matches
        with the runtime MBean.

        Show
        llc added a comment - One concern I have here: make sure that we do not get a divergence from config/monitoring/runtime names otherwise there is no easy programmatic way to know what config or monitoring MBean matches with the runtime MBean.
        Hide
        Tom Mueller added a comment -

        Bulk update to change fix version to "not determined" for all issues still open but with a fix version for a released version.

        Show
        Tom Mueller added a comment - Bulk update to change fix version to "not determined" for all issues still open but with a fix version for a released version.

          People

          • Assignee:
            Hong Zhang
            Reporter:
            fs5
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: