1. Karaf
  2. KARAF-1300

features managment should be more robust if customer features descriptor file has duplicated feature name


    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.2.6, 3.0.0
    • Component/s: karaf-feature
    • Labels:


      Today I run into an issue similar with KARAF-1173, I encounter exception like
      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.apache.karaf.features.management.codec.JmxFeature.getFeatureIdentifierTable(JmxFeature.java:105)
      at org.apache.karaf.features.management.codec.JmxFeature.<init>(JmxFeature.java:75)
      at org.apache.karaf.features.management.internal.FeaturesServiceMBeanImpl.getFeatures(FeaturesServiceMBeanImpl.java:94)
      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 com.sun.jmx.mbeanserver.MBeanSupport.getAttributes(MBeanSupport.java:223)

      I figured out the root cause is that in jclouds-karaf-1.3.2_1-features.xml,
      the jclouds-go2cloud-jhb1 feature has two jclouds feature dependencies like
      <feature name='jclouds-go2cloud-jhb1' description='Go2Cloud implementation targeted to Johannesburg1' version='1.3.2_1' resolver='(obr)'>
      <feature version='1.3.2_1'>jclouds</feature>
      <feature version='1.3.2_1'>jclouds</feature>
      <feature version='1.3.2_1'>jclouds-driver-jsch</feature>
      there are two jclouds here and hence try to add jclouds twice into mbeans TabularDataSupport which cause KeyAlreadyExistsException
      Though this should be fixed in jclouds side, I think the Karaf features management should be more robust to honor this duplicated feature names


        Freeman Fang created issue -
        Freeman Fang made changes -
        Field Original Value New Value
        Assignee Freeman Fang [ ffang ]
        Freeman Fang made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Freeman Fang added a comment -

        I'll also log a issue and contribute a patch on jclouds to fix the duplicated feature name issue anyway

        Freeman Fang added a comment - I'll also log a issue and contribute a patch on jclouds to fix the duplicated feature name issue anyway
        Freeman Fang added a comment - commit fix http://svn.apache.org/viewvc?rev=1307697&view=rev on trunk http://svn.apache.org/viewvc?rev=1307696&view=rev on 2.2.x branch
        Freeman Fang made changes -
        Resolution Fixed [ 1 ]
        Status In Progress [ 3 ] Resolved [ 5 ]
        Fix Version/s 2.2.6 [ 12319142 ]
        Fix Version/s 3.0.0 [ 12316040 ]
        Freeman Fang added a comment -

        jclouds side issue[1] to fix the jclouds features.xml


        Freeman Fang added a comment - jclouds side issue [1] to fix the jclouds features.xml [1] http://code.google.com/p/jclouds/issues/detail?id=892
        Jamie goodyear made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        17s 1 Freeman Fang 31/Mar/12 02:13
        In Progress In Progress Resolved Resolved
        10m 55s 1 Freeman Fang 31/Mar/12 02:24
        Resolved Resolved Closed Closed
        9d 8h 27m 1 Jamie goodyear 09/Apr/12 10:52


          • Assignee:
            Freeman Fang
            Freeman Fang
          • Votes:
            0 Vote for this issue
            0 Start watching this issue


            • Created: