2017-01-24 8 views
2

ヒューズサーバーでプロセスを起動しようとすると、次のエラーが表示されますが、バンドルが正しくインストールされています。解決できない355.0:欠落した要件[355.0] osgi.wiring.package; (osgi.wiring.package = org.apache.camel-servlet)

Unable to resolve 355.0: missing requirement [355.0] osgi.wiring.package; (osgi.wiring.package=org.apache.camel-servlet) 

私はPOM.xmlファイルに次の依存関係を挿入しました。

<dependency> 
    <groupId>org.apache.camel</groupId> 
    <artifactId>camel-servlet</artifactId> 
    <version>2.18.0</version> 
</dependency> 

私もblueprind.xmlファイルに次のように含まれている: `

<reference id="httpService" interface="org.osgi.service.http.HttpService"/> 
<bean 
    class="org.apache.camel.component.servlet.CamelHttpTransportServlet" id="camelServlet"/> 
<bean 
    class="org.apache.camel.component.servlet.osgi.OsgiServletRegisterer" 
    destroy-method="unregister" id="registerCamel" init-method="register"> 
    <property name="alias" value="/restweb"/> 
    <property name="httpService" ref="httpService"/> 
    <property name="servlet" ref="camelServlet"/> 
    <property name="servletName" value="CamelServlet"/> 
</bean> 

私は次のことを持っているcamelContext内側:

<propertyPlaceholder id="properties" location="classpath:properties.sql"/> 
    <restConfiguration bindingMode="json" component="servlet" 
     contextPath="/restweb" host="localhost" port="9999"> 
     <dataFormatProperty key="prettyPrint" value="true"/> 
    </restConfiguration> 

私はJBossバージョン10XXを使用していますし、ランタイムJbossヒューズ6.3。 bluprint route configを使用して、残りのWebサービスです。この問題を解決する方法を教えてくれる人がいますか?

ありがとうございます。

こんにちはルグナ、あなたの返信ありがとうございます。私は機能でインストールしようとしました:camel-servlet ****をインストールしてこのコマンドを使用すると、次のエラーがスローされますが、問題を解決して私が望む機能をインストールする方法がわかりません。

JBossFuse:[email protected]> features:list | grep camel-servlet 
[uninstalled] [2.17.0.redhat-630187 ] camel-servlet       camel-2.17.0.redhat-630187 
[uninstalled] [2.17.0.redhat-630187 ] camel-servletlistener     camel-2.17.0.redhat-630187 
JBossFuse:[email protected]> features:install camel-servlet 
Error executing command: The container is managed by fabric, please use fabric:profile-edit --feature camel-servlet/0.0.0 target-profile instead. See fabric:profile-edit --help for more information. 
JBossFuse:[email protected]> 

答えて

0

バンドルにはcamel-servletアーティファクトが必要です。これはJBoss Fuse 6.3.0ではデフォルトでは利用できません。

JBossFuse:[email protected]> features:list | grep camel-servlet 
[uninstalled] [2.17.0.redhat-630187 ] camel-servlet         camel-2.17.0.redhat-630187 
[uninstalled] [2.17.0.redhat-630187 ] camel-servletlistener       camel-2.17.0.redhat-630187 

そして、ラクダのサーブレットパッケージのavailabilyを確認

features:install camel-servlet 
features:install camel-servletlistener 

を使用して、それをインストールします。

JBossFuse:[email protected]> exports | grep servlet 
... 
303 org.apache.camel.component.servlet; version=2.17.0.redhat-630187 
303 org.apache.camel.component.servlet.osgi; version=2.17.0.redhat-630187 
304 org.apache.camel.component.servletlistener; version=2.17.0.redhat-630187 

キャメルサーブレットに必要なパッケージがあるので、次に、あなたのバンドルが構築されているか確認してくださいorg.apache.camel.component.servletではない。org.apache.camel-servlet。あなたはMavenのバンドル・プラグインを使用してパッケージ化し、手動で依存関係を宣言した場合


、あなたのPOMは、次のようになります。

<plugin> 
    <groupId>org.apache.felix</groupId> 
    <artifactId>maven-bundle-plugin</artifactId> 
    <extensions>true</extensions> 
    <configuration> 
     <instructions> 
      ... 
      <Import-Package> 
       org.apache.camel.component.servlet;version="[2.17,2)", // package name here 
       * 
      </Import-Package> 
     </instructions> 
    </configuration> 
</plugin> 
+0

こんにちはRugna、お返事に感謝。私は機能でインストールしようとしました:camel-servlet ****をインストールしてこのコマンドを使用すると、次のエラーがスローされますが、問題を解決して私が望む機能をインストールする方法がわかりません。 –

+0

JBossFuse:karaf @ root>機能:リスト| grep camel-servlet[2.17.0.redhat-630187] camel-servlet camel-2.17.0.redhat-630187 [アンインストール] [2.17.0.redhat-630187] camel-servletlistener camel-2.17.0 .acl-servlet/0.0.0 target-profileを代わりに使用してください。コマンドの実行中にエラーが発生しました。 。詳細については、fabric:profile-edit --helpを参照してください。 JBossFuse:karaf @ root> –

関連する問題