Hi,

This should be in Karaf users list.

Because there's no listFeatures operation in FeaturesServiceMBean at all.

You can use getFeatures instead.
TabularData getFeatures() throws Exception;
-------------
Freeman(Yue) Fang

Red Hat, Inc. 
FuseSource is now part of Red Hat
Web: http://fusesource.com | http://www.redhat.com/
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
http://blog.sina.com.cn/u/1473905042
weibo: @Freeman小屋



On 2013-7-1, at 下午8:24, pchakinala wrote:

> Hello,
> 
> We are using Karaf  2.2.4 JMX Services to build user console and were able
> to retrieve all the information using JMX MBeans.
> 
> Using below MBean, extracted features related data from Karaf /felix
> container.
> org.apache.karaf.features.management.internal.FeaturesServiceMBeanImpl
> 
> Below services are working fine.
> 1. public abstract void addRepository(String paramString)    throws
> Exception;
> 2.  public abstract void removeRepository(String paramString)     throws
> Exception;
> 3.  public abstract void installFeature(String paramString)     throws
> Exception;
> 4.  public abstract void installFeature(String paramString1, String
> paramString2)     throws Exception;
> 5.  public abstract void uninstallFeature(String paramString)     throws
> Exception;
> 6. public abstract void uninstallFeature(String paramString1, String
> paramString2)    throws Exception;
> 
> When i am trying to use listFeature service, system is throwing "No Such
> Method exception"
> 
> 
> javax.management.ReflectionException: No such operation: listFeatures
>       at 
> com.sun.jmx.mbeanserver.PerInterface.noSuchMethod(PerInterface.java:152)
>       at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:94)
>       at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:262)
>       at javax.management.StandardMBean.invoke(StandardMBean.java:391)
>       at
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
>       at 
> com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
> 
> Code:
> 
> MBeanServerConnection.invoke(new
> ObjectName("org.apache.karaf:type=features,name=root"),
> "listFeatures",null,null);
> 
> Method in MBean:
> 
> public abstract Feature[] listFeatures()   throws Exception;
> 
> Please suggest is there any issue in above code.
> 
> Regards,
> Pchakina
> 
> 
> 
> 
> 
> 
> 
> --
> View this message in context: 
> http://servicemix.396122.n5.nabble.com/SMX-4-4-Karaf-2-2-4-JMX-List-Features-tp5717215.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to