Installing and running the management console on Apache Felix OSGI

I am trying to install and run the Apache Felix Web Management Console (4.2.0) in Apache Felix 4.2.1, but it does not work.

I installed the Felix Http Jetty 2.2.1 package, the Felic Configuration Admin Service 1.8.0 package, the Service 1.0.1 log package, the EventAdmin 1.3.2 package, and the Felix management console for web hosting 4.2.0

When I try to start the web-based management console, it says:

org.osgi.framework.BundleException: package "org.apache.felix.webconsole_4.2.0 [29]" could not be resolved. Reason: Missing restriction: Import-Package: org.apache.commons.fileupload; version = "[1.2.0,2.0.0)"

I am using Java 1.6.0.26, Ubuntu 12.10!

jonathan@JONATHAN :/datos/jonathan/Programas/apache-felix-framework-4.2.1$ java -jar bin/felix.jar 2013-10-22 16:38:37.389:INFO:oejs.Server:jetty-7.xy-SNAPSHOT 2013-10-22 16:38:37.412:INFO:oejsh.ContextHandler:started oejsServletContextHandler{/,null} ____________________________ Welcome to Apache Felix Gogo g! 2013-10-22 16:38:37.434:INFO:oejs.AbstractConnector:Started SelectChannelConnector@0.0.0.0 :8888 lb START LEVEL 1 ID|State |Level|Name 0|Active | 0|OSGi System Bundle (3.7.2.v20120110-1415) 1|Active | 1|Apache Felix Bundle Repository (1.6.6) 2|Active | 1|Apache Felix Gogo Command (0.12.0) 3|Active | 1|Apache Felix Gogo Runtime (0.10.0) 4|Active | 1|Apache Felix Gogo Shell (0.10.0) 23|Active | 1|Apache Felix Configuration Admin Service (1.8.0) 24|Active | 1|Apache Felix Log Service (1.0.1) 26|Active | 1|Apache Felix Http Jetty (2.2.1) 27|Active | 1|Apache Felix EventAdmin (1.3.2) 29|Installed | 1|Apache Felix Web Management Console (4.2.0) g! start 29 org.osgi.framework.BundleException: The bundle "org.apache.felix.webconsole_4.2.0 [29]" >could not be resolved. Reason: Missing Constraint: Import-Package: org.apache.commons.fileupload; version="[1.2.0,2.0.0)" g! 

Hello

+1
source share
2 answers

I had similar problems, I resolved them by clearing the Felix installation, then I started Felix from scratch, which means I had something similar on Apache Felix Gogo:

 ____________________________ Welcome to Apache Felix Gogo g! lb START LEVEL 1 ID|State |Level|Name 0|Active | 0|System Bundle (4.6.0) 1|Active | 1|Apache Felix Bundle Repository (2.0.2) 2|Active | 1|Apache Felix Gogo Command (0.14.0) 3|Active | 1|Apache Felix Gogo Runtime (0.12.1) 4|Active | 1|Apache Felix Gogo Shell (0.10.0) g! 

So, on the console, just add the following command

 list -v 

It will provide you with a list of available packages, so just find the name of the Webconsole package and run it (always in the Gogo console):

 g! deploy org.apache.felix.webconsole 

Download the required libraries and print to the console:

 Target resource(s): ------------------- Apache Felix Web Management Console (3.1.2) Required resource(s): --------------------- Apache Felix Configuration Admin Service (1.2.4) Apache Felix Http Bundle (2.0.4) Apache Felix Log Service (1.0.0) Apache Felix HTTP Service Jetty (1.0.0) Optional resource(s): --------------------- OSGi R4 Compendium Bundle (4.0.0) Apache Felix Declarative Services (1.6.0) Apache Felix iPOJO (1.8.0) Apache Felix iPOJO WebConsole Plugins (1.6.0) Apache Felix Shell Service (1.4.2) Deploying... done. g! 

So now, if you run the lb (list bundles) command

 g! lb START LEVEL 1 ID|State |Level|Name 0|Active | 0|System Bundle (4.6.0) 1|Active | 1|Apache Felix Bundle Repository (2.0.2) 2|Active | 1|Apache Felix Gogo Command (0.14.0) 3|Active | 1|Apache Felix Gogo Runtime (0.12.1) 4|Active | 1|Apache Felix Gogo Shell (0.10.0) 5|Installed | 1|Apache Felix Configuration Admin Service (1.2.4) 6|Installed | 1|Apache Felix Http Bundle (2.0.4) 7|Installed | 1|Apache Felix Log Service (1.0.0) 8|Installed | 1|OSGi R4 Compendium Bundle (4.0.0) 9|Installed | 1|Apache Felix Declarative Services (1.6.0) 10|Installed | 1|HTTP Service (1.0.0) 11|Installed | 1|Apache Felix iPOJO (1.8.0) 12|Installed | 1|Apache Felix Web Management Console (3.1.2) 13|Installed | 1|Apache Felix iPOJO WebConsole Plugins (1.6.0) 14|Installed | 1|Apache Felix Shell Service (1.4.2) g! 

So now just find the "HTTP Service" and "Apache Felix Web Management Console" packages and run them:

 g! start 10 g! start 12 

And finally, just go along the path (the default port is 8080):

 http://localhost:28372/system/console/bundles 

By the way, you can change the port to config.properties (on Felix) by simply adding the following parameter:

 org.osgi.service.http.port=28372 

Hope this helps someone else ...

+2
source

Finally, I get it.

In an empty Felix installation:

 g! bundlelevel -i 1 g! mvnrepo = http://repo2.maven.org/maven2 g! start $mvnrepo/commons-io/commons-io/1.4/commons-io-1.4.jar g! start $mvnrepo/commons-fileupload/commons-fileupload/1.2.1/commons-fileupload-1.2.1.jar g! start http://maven.ow2.org/maven2/org/json/org.ow2.chameleon.commons.json/20090911-0002/org.ow2.chameleon.commons.json-20090911-0002.jar g! bundlelevel -i 5 g! start $mvnrepo/org/apache/felix/org.apache.felix.webconsole/4.2.0/org.apache.felix.webconsole-4.2.0.jar 
+1
source

All Articles