Mule ESB - libは任意のアプリケーションライブラリをオーバーライドしますか
-
12-12-2019 - |
質問
私はMuleアプリケーションを開発するためにMule Studio 3.2.1を使用しました。そのアプリケーション内では、org.springframework.ws.client.core.WebServiceTemplateを使用して、WebService要求を別のアプリケーションに送信しました。 次のconfig を使用しました
<bean id="myWsTemplate" clsass="org.springframework.ws.client.core.WebServiceTemplate">
<constructor-arg ref="messageFactory" />
<property name="defaultUri" value="${my.soap.endpoint}" />
<property name="interceptors">
<list>
<ref bean="acqSecurityInterceptor" />
</list>
</property>
.
<bean id="acqSecurityInterceptor" class="org.springframework.ws.soap.security.wss4j.Wss4jSecurityInterceptor">
<property name="validationActions" value="NoSecurity"/>
<property name="securementActions" value="NoSecurity" />
</bean>
.
私はのマーブル依存性を使用しました
<dependency>
<groupId>org.springframework.ws</groupId>
<artifactId>spring-ws-security</artifactId>
<version>2.1.0.RELEASE</version>
</dependency>
.
これは依存関係としてWSS4J-1.6.5.jarを使用します。 これで、アプリケーションをMule 3.2.0で展開すると、次のエラーがスローされます。
PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'validationActions' threw exception; nested exception is java.lang.NoSuchMethodError: org.apache.ws.security.util.WSSecurityUtil.decodeAction(Ljava/lang/String;Ljava/util/List;)I
PropertyAccessException 2: org.springframework.beans.MethodInvocationException: Property 'securementActions' threw exception; nested exception is java.lang.NoSuchMethodError: org.apache.ws.security.util.WSSecurityUtil.decodeAction(Ljava/lang/String;Ljava/util/List;)I
.
Mule 3.2.0のlib / optディレクトリには、wssecurityUtilのメソッドシグネチャがパブリックスタティックint decodeAction(文字列アクション、ベクトルアクション)のWSS4J-1.5.8-osgi.jarが付属しています。 試みられたものはそうです WSS4J.1.6.5に存在するDecodeAction(LJAVA / LANG / STRING; LJAVA / util / list;)
私の質問は、私のアプリにWSS4J-1.6.5.jarがある場合でも、クラスローダーがまだMule / lib / optで1つを使用しようとしているのです。アプリが優先順位を上書きしていないのか そうでなければ、その方法でそれを働くための方法はあります
解決
OK mule-deploy.propertiesの次の設定を使用する loader.override= org.apache.ws.security.Util.WsSecurityUtil. 誉れ http://www.mulesoft.org/documentation/display/mule3user./ ClassLoader + Control + IN + MULE
しかし、まだMule Studioに内蔵されているjarsがプラグインとして内蔵されているjarsに関する問題の負荷は、スタンドアロンのラバで展開しようとしています。別のスレッドでそのような問題の盛り合わせリストを作成します。