I'm using wss4j version 2.1.2 to do xml digital signatures and attach to the soap header.
I have the following code and I get an error that a method doesn't exist ... but it does exist. In IntelliJ I can navigate to the location and the method is there but for some reason it's not finding it: java.lang.NoSuchMethodError: org.apache.xml.security.utils.I18n.init
public void initSettings() {
try {
crypto = CryptoFactory.getInstance();
} catch (WSSecurityException e) {
e.printStackTrace();
}
}
As requested, here is the complete error stack trace:
at com.pilotfish.eip.modules.http.ws2.WSSecurityProcessor2.processData(WSSecurityProcessor2.java:182)
at com.pilotfish.eip.transact.stages.ProcessorStage.process(ProcessorStage.java:44)
at com.pilotfish.eip.transact.StageHandler.process(StageHandler.java:99)
at com.pilotfish.eip.transact.Transaction.runStage(Transaction.java:117)
at com.pilotfish.eip.transact.Transaction.flushQueue(Transaction.java:89)
at com.pilotfish.eip.transact.Transaction.run(Transaction.java:78)
at com.pilotfish.eip.gui.console.testing.TestingManager$TestingTransactionFramework$1.run(TestingManager.java:663)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NoSuchMethodError: org.apache.xml.security.utils.I18n.init(Ljava/util/ResourceBundle;)V
at org.apache.wss4j.common.crypto.WSProviderConfig.initializeResourceBundles(WSProviderConfig.java:199)
at org.apache.wss4j.common.crypto.WSProviderConfig.init(WSProviderConfig.java:65)
at org.apache.wss4j.common.crypto.CryptoFactory.<clinit>(CryptoFactory.java:39)
at com.pilotfish.eip.modules.http.ws2.WSSecurityProcessor2.initSettings(WSSecurityProcessor2.java:140)
at com.pilotfish.eip.modules.http.ws2.WSSecurityProcessor2.processData(WSSecurityProcessor2.java:155)
... 7 more
I'm seeing this, which might clue in on what the issue is:
File: WSProviderConfig.java
private static void initializeResourceBundles() {
I18n.init(new WSS4JResourceBundle());
}
But it's expecting String, String not WSS4JResourceBundle().