You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Freeman Fang (Resolved) (JIRA)" <ji...@apache.org> on 2012/03/31 04:25:25 UTC

[jira] [Resolved] (KARAF-1300) features managment should be more robust if customer features descriptor file has duplicated feature name

     [ https://issues.apache.org/jira/browse/KARAF-1300?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Freeman Fang resolved KARAF-1300.
---------------------------------

       Resolution: Fixed
    Fix Version/s: 3.0.0
                   2.2.6

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
                
> features managment should be more robust if customer features descriptor file has duplicated feature name
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: KARAF-1300
>                 URL: https://issues.apache.org/jira/browse/KARAF-1300
>             Project: Karaf
>          Issue Type: Improvement
>          Components: karaf-feature
>            Reporter: Freeman Fang
>            Assignee: Freeman Fang
>             Fix For: 2.2.6, 3.0.0
>
>
> 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>
> <bundle>mvn:org.jclouds.api/elasticstack/1.3.2</bundle>
> <bundle>mvn:org.jclouds.provider/go2cloud-jhb1/1.3.2</bundle>
> </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

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira