2

Apache Felix 4.2.1 に Apache Felix Web 管理コンソール (4.2.0) をインストールして実行しようとしていますが、うまくいきません。

Felix Http Jetty 2.2.1 バンドル、Felic Configuration Admin Service 1.8.0 バンドル、Log Service 1.0.1 バンドル、EventAdmin 1.3.2 バンドル、および Felix Web Management Console 4.2.0 をインストールしました。

Web 管理コンソールを起動しようとすると、次のように表示されます。

org.osgi.framework.BundleException: バンドル "org.apache.felix.webconsole_4.2.0 [29]" を解決できませんでした。理由: 制約がありません: Import-Package: org.apache.commons.fileupload; バージョン="[1.2.0,2.0.0)"

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.x.y-SNAPSHOT
2013-10-22 16:38:37.412:INFO:oejsh.ContextHandler:started o.e.j.s.ServletContextHandler{/,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!

よろしく

4

2 に答える 2

3

同様の問題があり、Felix のインストールをクリアして解決し、Felix をゼロから起動しました。つまり、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! 

したがって、コンソールで、次のコマンドを追加するだけです

list -v

利用可能なパッケージのリストが表示されるので、Webconsole パッケージ名を探して、これを実行します (常に Gogo コンソールで):

g! deploy org.apache.felix.webconsole

これにより、必要なライブラリがダウンロードされ、コンソールに以下が出力されます。

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! 

それで、今、lb (list bundles コマンド) を実行すると

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!

それでは、バンドル「HTTP Service」と「Apache Felix Web Management Console」を探して開始します。

g! start 10
g! start 12

最後に、次のパスに進みます (デフォルトのポートは 8080 です)。

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

ちなみに、次のパラメーターを追加するだけで、config.properties (Felix 内) のポートを変更できます。

org.osgi.service.http.port=28372

これが他の誰かを助けることを願っています...

于 2015-05-26T19:26:40.517 に答える