You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by saravanaprasad <rs...@hotmail.com> on 2019/03/26 14:17:43 UTC

FeaturesServiceMBean call causing karaf console unresponsive

Hi,Following line causes karaf console
unresponsive./featuresServiceMBeanProxy.installFeature("spring-3.0.4/3.0.4.RELEASE");/Above
line of code also causes web console not available.What could be the
fix?ThanksSaravana Prasad



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html

Re: FeaturesServiceMBean call causing karaf console unresponsive

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi,

The location is certainly not correct if you have to do repo-add,
probably because your features XML is not in the system folder (or karaf
user $HOME/.m2) and the Maven repository is not defined in
etc/org.ops4j.pax.url.mvn.cfg.

It seems more an issue in your bundles/features than an issue in Karaf.

If you want me to help you, please ping me directly.

Regards
JB

On 26/03/2019 16:54, saravanaprasad wrote:
> It is a feature being attempted to install/ uninstall from a features
> repository wherein I have spring-3.0.4 in the xml file.
> Configured in org.apache.karaf.features.cfg with file path to the xml file,
> and on featuresBoot. 
> On karaf boot this does not get installed.
> I have to manually use feature:repo-add to install the feature.
> At this stage it is still uninstalled only.
> When start karaf, the bundle activator makes karaf console and web console
> unresponsive.
> When I restart karaf I find spring-3.0.4 as started.
> 
> Thanks
> 
> 
> 
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
> 

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: FeaturesServiceMBean call causing karaf console unresponsive

Posted by saravanaprasad <rs...@hotmail.com>.
It is a feature being attempted to install/ uninstall from a features
repository wherein I have spring-3.0.4 in the xml file.
Configured in org.apache.karaf.features.cfg with file path to the xml file,
and on featuresBoot. 
On karaf boot this does not get installed.
I have to manually use feature:repo-add to install the feature.
At this stage it is still uninstalled only.
When start karaf, the bundle activator makes karaf console and web console
unresponsive.
When I restart karaf I find spring-3.0.4 as started.

Thanks



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html

Re: FeaturesServiceMBean call causing karaf console unresponsive

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
The installFeature should be spring/3.0.4.RELEASE.

However, I will check why you don't get the "Feature doesn't exist"
exception.

Regards
JB

On 26/03/2019 16:31, saravanaprasad wrote:
> 			  HashMap<String, String[]> environment = new HashMap<String,
> 			  String[]>(); String username = "karaf"; String password = "karaf"; 
> 			  String[] credentials = new String[] { username, password };
> 			  environment.put("jmx.remote.credentials", credentials); 
> 			  JMXServiceURL url =new
> JMXServiceURL("service:jmx:rmi://localhost:44444/jndi/rmi://localhost:1099/karaf-root");
> 			  JMXConnector jmxc = JMXConnectorFactory.connect(url, environment);
> 			  MBeanServerConnection mbsc = jmxc.getMBeanServerConnection();
> 			  ObjectName feature = null;
> 			  TabularData features = null; 
> 			  try 
> 			  { 
> 			  
> 				feature = new ObjectName("org.apache.karaf:type=feature,name=root");
> 				
> 				featuresServiceMBeanProxy = JMX.newMBeanProxy(mbsc,
> feature,FeaturesServiceMBean.class, true); 
> 				context.registerService( JMXKarafFeature.class, new
> JMXKarafFeatureImpl(), null );
> 			
> featuresServiceMBeanProxy.installFeature("spring-3.0.4/3.0.4.RELEASE");//
> here karaf console goes unresponsive
> 			  } 
> 
> 
> 
> 
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
> 

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: FeaturesServiceMBean call causing karaf console unresponsive

Posted by saravanaprasad <rs...@hotmail.com>.
			  HashMap<String, String[]> environment = new HashMap<String,
			  String[]>(); String username = "karaf"; String password = "karaf"; 
			  String[] credentials = new String[] { username, password };
			  environment.put("jmx.remote.credentials", credentials); 
			  JMXServiceURL url =new
JMXServiceURL("service:jmx:rmi://localhost:44444/jndi/rmi://localhost:1099/karaf-root");
			  JMXConnector jmxc = JMXConnectorFactory.connect(url, environment);
			  MBeanServerConnection mbsc = jmxc.getMBeanServerConnection();
			  ObjectName feature = null;
			  TabularData features = null; 
			  try 
			  { 
			  
				feature = new ObjectName("org.apache.karaf:type=feature,name=root");
				
				featuresServiceMBeanProxy = JMX.newMBeanProxy(mbsc,
feature,FeaturesServiceMBean.class, true); 
				context.registerService( JMXKarafFeature.class, new
JMXKarafFeatureImpl(), null );
			
featuresServiceMBeanProxy.installFeature("spring-3.0.4/3.0.4.RELEASE");//
here karaf console goes unresponsive
			  } 




--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html

Re: FeaturesServiceMBean call causing karaf console unresponsive

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Can you quickly explain how to reproduce ?

Are you using a MBeanProxy in your code to use the features service ?

Regards
JB

On 26/03/2019 15:58, saravanaprasad wrote:
> Karaf version: 4.2.3
> 
> Java version: OpenJDK11
> 
> Thanks
> 
> 
> 
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
> 

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: FeaturesServiceMBean call causing karaf console unresponsive

Posted by saravanaprasad <rs...@hotmail.com>.
Karaf version: 4.2.3

Java version: OpenJDK11

Thanks



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html

Re: FeaturesServiceMBean call causing karaf console unresponsive

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi,

Which Karaf version do you use ?

Regards
JB

On 26/03/2019 15:17, saravanaprasad wrote:
> Hi,Following line causes karaf console
> unresponsive./featuresServiceMBeanProxy.installFeature("spring-3.0.4/3.0.4.RELEASE");/Above
> line of code also causes web console not available.What could be the
> fix?ThanksSaravana Prasad
> 
> 
> 
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
> 

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com