Question

I am getting an error from the following method call in WSO2 identity server STS client call,

the call :

responseToken = stsClient.requestSecurityToken(servicePolicy,
                    STS_EPR, stsPolicy, RELYING_PARTY_SERVICE_EPR);

returns the following error.

Exception in thread "main" java.lang.NoSuchMethodError: org.apache.xml.security.transforms.Transform.init()V
    at org.apache.ws.security.WSSConfig.staticInit(WSSConfig.java:311)
    at org.apache.ws.security.WSSConfig.<init>(WSSConfig.java:327)
    at org.apache.ws.security.WSSConfig.getNewInstance(WSSConfig.java:336)
    at org.apache.ws.security.WSSConfig.getDefaultWSConfig(WSSConfig.java:345)
    at org.apache.rampart.RampartMessageData.<init>(RampartMessageData.java:363)
    at org.apache.rampart.MessageBuilder.build(MessageBuilder.java:61)
    at org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:65)
    at org.apache.axis2.engine.Phase.invokeHandler(Phase.java:340)
    at org.apache.axis2.engine.Phase.invoke(Phase.java:313)
    at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:261)
    at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:426)
    at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:398)
    at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:224)
    at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
    at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:554)
    at org.apache.rahas.client.STSClient.requestSecurityToken(STSClient.java:164)
    at org.apache.rahas.client.STSClient.requestSecurityToken(STSClient.java:181)

This is obviously a wrong jar being included in the classpath. I am running this against WSO2 identity server 4.1.0 and offending wss4j .jar version is wss4j_1.5.11.wso2v5.jar which comes with 4.1.0 IS. Which version of .jar should I used to get rid of this issue?

Side Note: I looked for source .jar files in the public Maven Repository of WSO2, but only binary .jar files are available there, why source .jar files are missing in the WSO2 public repository as WSO2 believes in open source software?

Here I am referring specifically to http://maven.wso2.org/nexus/content/groups/wso2-public/org/apache/ws/security/wss4j/1.5.11-wso2v5/

Was it helpful?

Solution

Go to identity servers bin folder [wso2is-4.1.0/bin] and issue the command "ant" to get the required libraries, (make sure you have installed Apache Ant)

wso2is-4.1.0/bin$ ant

and then after building the ant script, go to the location wso2is-4.1.0/repository/lib and see the required libraries.

rampart-policy_1.6.1-wso2v8.jar rampart-core_1.6.1-wso2v8.jar rampart-trust_1.6.1-wso2v8.jar wss4j_1.5.11-wso2v5.jar axis2_1.6.1-wso2v8.jar axiom_1.2.11-wso2v3.jar

make sure you use above versions in your class path of the client.

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