2009年9月30日 星期三

Apache Felix 建立webconsole的步驟

1.download Felix framework

D:\OSGi\felix-framework-2.0.0>java -jar bin/felix.jar

Welcome to Felix
================

-> ps
START LEVEL 1
ID State Level Name
[ 0] [Active ] [ 0] System Bundle (2.0.0)
[ 1] [Active ] [ 1] Apache Felix Bundle Repository (1.4.1)
[ 2] [Active ] [ 1] Apache Felix Shell Service (1.4.0)
[ 3] [Active ] [ 1] Apache Felix Shell TUI (1.4.0)
->

2.download 所需要的bundle

2.1 webconsole(先裝1.0.0 才會出現少什麼package,到時再更新webconsole成最新版)
安裝 bundle

-> install file:D:\OSGi\felix-framework-2.0.0\bundle\org.apache.felix.webconsole
-1.2.0.jar
Bundle ID: 4
-> start 4
org.osgi.framework.BundleException: Unresolved constraint in bundle org.apache.f
elix.webconsole [4]: package; (package=javax.servlet) <-- 缺少的bundle 網路上可以找到
->

2.2 javax.servlet
2.3 jetty
2.4 Configuration Admin
2.5 Metatype
2.6 Preferences

3 此時所有bundle都可以active了

4 http://localhost:8080/system/console/ 進入webconsole的網頁

5 此時再更新webconsole為新版即可

6 bundle 清單
-> ps
START LEVEL 1
ID State Level Name
[ 0] [Active ] [ 0] System Bundle (2.0.0)
[ 1] [Active ] [ 1] Apache Felix Bundle Repository (1.4.1)
[ 2] [Active ] [ 1] Apache Felix Shell Service (1.4.0)
[ 3] [Active ] [ 1] Apache Felix Shell TUI (1.4.0)
[ 5] [Active ] [ 1] Servlet 2.1 API (1.0.0)
[ 7] [Active ] [ 1] Apache Felix Configuration Admin Service (1.2.4)
[ 11] [Active ] [ 1] HTTP Service (1.0.1)
[ 14] [Resolved ] [ 1] Apache Felix Web Management Console (1.0.0) <-- 舊
[ 15] [Active ] [ 1] Apache Felix Metatype Service (1.0.4)
[ 16] [Active ] [ 1] Apache Felix Preferences Service (1.0.4)
[ 17] [Active ] [ 1] Osgi_comm Plug-in (1.0.0)
[ 18] [Active ] [ 1] OSGi_RS232_1 Plug-in (1.0.0)
[ 19] [Installed ] [ 1] Apache Felix Web Management Console (1.2.10) <-- 新
-> start 19

1 則留言:

傑夫林的部落格 提到...

新版felix 2.0.4要run webconsole
只要幾個bundle
1.framework 2.0.4
2.jetty 2.0.4
3.configadmin 1.2.4
4.webconsole 2.0.6