How to resolve "java.lang.NoSuchMethodError: org.apache.ws.security.message.WSSecSignature.build"
book
Article ID: KB0082050
calendar_today
Updated On:
Description
The below errors occur while enforcing the security Integrity policies from APIX.
==
" at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NoSuchMethodError: org.apache.ws.security.message.WSSecSignature.build(Lorg/w3c/dom/Document;Lorg/apache/ws/security/components/crypto/Crypto;Lorg/apache/ws/security/message/WSSecHeader;Z)Lorg/w3c/dom/Document;
at com.tibco.trinity.runtime.core.wss.impl.SignBuilder.build(SignBuilder.java:253)
==
When APIX engine starts , it loads below jars from $APIX_HOME/lib/ext/tpcl/ folder
1. com.tibco.tpcl.org.apache.ws.wss4j_1.6.401.001.jar
2. wss4j.jar
Both these jars contain the same method name "WSSecSignature".
This issue occurs when wss4j.jar got loaded first in the Classpath than the expected 'com.tibco.tpcl.org.apache.ws.wss4j_1.6.401.001.jar'
Issue/Introduction
How to resolve "java.lang.NoSuchMethodError: org.apache.ws.security.message.WSSecSignature.build"
Environment
All Supported Platforms
Resolution
Please modify the classpath in the asg-engine.tra file to load the 'com.tibco.tpcl.org.apache.ws.wss4j_1.6.401.001.jar' first.
Example :
In the asg-engine.tra file locate tibco.env.CUSTOM_EXT_PREPEND_CP and modify
From :
tibco.env.CUSTOM_EXT_PREPEND_CP=%ASG_HOME%/lib%PSP%%ASG_HOME%/lib/ext/hotfix%PSP%%ASG_HOME%/lib/ext/tibco%PSP%%ASG_HOME%/lib/ext/tpcl
To:
tibco.env.CUSTOM_EXT_PREPEND_CP=%PSP%%ASG_HOME%/lib/ext/tpcl/com.tibco.tpcl.org.apache.ws.wss4j_1.6.401.001.jar%PSP%%ASG_HOME%/lib%PSP%%ASG_HOME%/lib/ext/hotfix%PSP%%ASG_HOME%/lib/ext/tibco%PSP%%ASG_HOME%/lib/ext/tpcl
This will make sure APIX Engine first loads the com.tibco.tpcl.org.apache.ws.wss4j_1.6.401.001.jar in the classpath to resolve the reported conflict.
Feedback
thumb_up
Yes
thumb_down
No