2 Replies Latest reply on Sep 21, 2009 3:52 PM by Peter Chandler

    javax.management.openmbean.KeyAlreadyExistsException

    Peter Chandler Master

      I run a JMX client application and get the following error in the servicemix console.

       

      Any ideas? Cause?

       

      smx@root:osgi> javax.management.openmbean.KeyAlreadyExistsException: Argument value's index, calculated according to this TabularData instance's tabularType, already refers to a value in this table.
              at javax.management.openmbean.TabularDataSupport.checkValueAndIndex(TabularDataSupport.java:871)
              at javax.management.openmbean.TabularDataSupport.internalPut(TabularDataSupport.java:331)
              at javax.management.openmbean.TabularDataSupport.put(TabularDataSupport.java:323)
              at org.osgi.jmx.codec.OSGiPackage.tableFrom(OSGiPackage.java:114)
              at com.oracle.osgi.jmx.core.PackageState.getPackages(PackageState.java:98)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:93)
              at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:27)
              at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:208)
              at com.sun.jmx.mbeanserver.PerInterface.getAttribute(PerInterface.java:65)
              at com.sun.jmx.mbeanserver.MBeanSupport.getAttribute(MBeanSupport.java:216)
              at javax.management.StandardMBean.getAttribute(StandardMBean.java:358)
              at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(DefaultMBeanServerInterceptor.java:666)
              at com.sun.jmx.mbeanserver.JmxMBeanServer.getAttribute(JmxMBeanServer.java:638)
              at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1403)
              at javax.management.remote.rmi.RMIConnectionImpl.access$200(RMIConnectionImpl.java:72)
              at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1264)
              at java.security.AccessController.doPrivileged(Native Method)
              at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1366)
              at javax.management.remote.rmi.RMIConnectionImpl.getAttribute(RMIConnectionImpl.java:600)
              at sun.reflect.GeneratedMethodAccessor106.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
              at sun.rmi.transport.Transport$1.run(Transport.java:159)
              at java.security.AccessController.doPrivileged(Native Method)
              at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
              at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
              at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
              at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
              at java.lang.Thread.run(Thread.java:619) 

       

       

      Here is the JMX Client debug info that cause this exception.

      // objName.toString() = "osgi.core:type=packageState"
      "objName"= ObjectName  (id=36)     
           _Empty_property_array= ObjectName$Property[0]  (id=169)     
           compat= false     
           newSerialPersistentFields= ObjectStreamField[0]  (id=170)     
           newSerialVersionUID= 1081892073854801359     
           oldSerialPersistentFields= ObjectStreamField[6]  (id=173)     
           oldSerialVersionUID= -5467795090068647408     
           serialPersistentFields= ObjectStreamField[0]  (id=170)     
           serialVersionUID= 1081892073854801359     
      "attrs"= MBeanAttributeInfo[1]  (id=87)     
           [0]= MBeanAttributeInfo  (id=90)     
                attributeType= "javax.management.openmbean.TabularData" (id=101)     
                description= "Attribute exposed for management" (id=102)     
                descriptor= ImmutableDescriptor  (id=103)     
                is= false     
                isRead= true     
                isWrite= false     
                name= "Packages" (id=110)     
      
      // java call 
      Object obj = conn.getAttribute(objName, attrs[i].getName());