Question

I have used Mule Studio 3.2.1 to develop a Mule application. Within that application I have used org.springframework.ws.client.core.WebServiceTemplate to send a Webservice request to another application. I have used the following 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>

I have used Maven dependency of

    <dependency>
        <groupId>org.springframework.ws</groupId>
        <artifactId>spring-ws-security</artifactId>
        <version>2.1.0.RELEASE</version>
    </dependency>

This uses wss4j-1.6.5.jar as a dependency. Now when I deploy the application in Mule 3.2.0 it throws the following error

  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

Now the lib/opt directory of Mule 3.2.0 comes with wss4j-1.5.8-osgi.jar for which the the method signature on WSSecurityutil is public static int decodeAction(String action, Vector actions) while the one that has been attempted is decodeAction(Ljava/lang/String;Ljava/util/List;) which is present in wss4j.1.6.5

My question is even if my app has the wss4j-1.6.5.jar in it why is the classloader still trying to use the one in mule/lib/opt. Should the one in the app not override of take precedence? If not is there a way to get it work that way

Was it helpful?

Solution

ok using the following config in mule-deploy.properties helped loader.override=-org.apache.ws.security.util.WSSecurityUtil ref http://www.mulesoft.org/documentation/display/MULE3USER/Classloader+Control+in+Mule

but still loads of issues with jars coming built in Mule Studio as plugins and then trying to deploy in standalone Mule. Will create an assorted list of such issues in another thread.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top