org.apache.xml.security.signature.XMLSignatureException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Problem signing SOAP doc with existing SAML assertion
    via by Yang, Gang CTR USARMY (US),
  • Problem signing SOAP doc with existing SAML assertion
    via by Yang, Gang CTR USARMY (US),
    • org.apache.xml.security.signature.XMLSignatureException: Sorry, you supplied the wrong key type for this operation! You supplied a null but a java.security.PrivateKey is needed. at org.apache.xml.security.algorithms.implementations.SignatureBaseRSA.engineInitSign(SignatureBaseRSA.java:150) at org.apache.xml.security.algorithms.implementations.SignatureBaseRSA.engineInitSign(SignatureBaseRSA.java:166) at org.apache.xml.security.algorithms.SignatureAlgorithm.initSign(SignatureAlgorithm.java:239) at org.apache.xml.security.signature.XMLSignature.sign(XMLSignature.java:606) at org.opensaml.xml.signature.Signer.signObject(Signer.java:76) at org.apache.ws.security.saml.ext.OpenSAMLUtil.signObject(OpenSAMLUtil.java:234) at org.apache.ws.security.saml.ext.OpenSAMLUtil.signXMLObject(OpenSAMLUtil.java:211) at org.apache.ws.security.saml.ext.OpenSAMLUtil.toDom(OpenSAMLUtil.java:164) at org.apache.ws.security.saml.ext.OpenSAMLUtil.toDom(OpenSAMLUtil.java:115) at org.apache.ws.security.saml.ext.AssertionWrapper.toDOM(AssertionWrapper.java:314) at org.apache.ws.security.saml.WSSecSignatureSAML.prepare(WSSecSignatureSAML.java:209) at org.apache.ws.security.saml.WSSecSignatureSAML.build(WSSecSignatureSAML.java:117) at mil.army.security.ts3.Ts3Wss4j.Ts3Wss4jOutHandler.secureMessage(Ts3Wss4jOutHandler.java:285) at mil.army.security.ts3.Ts3Wss4j.Ts3Wss4jOutHandler.secureMessage(Ts3Wss4jOutHandler.java:210) at mil.army.security.ts3.Ts3Wss4j.Ts3Wss4jOutHandler.secureMessage(Ts3Wss4jOutHandler.java:206) at mil.army.security.ts3.Ts3Wss4j.Ts3Wss4jOutHandler.secureMessageWithAssertion(Ts3Wss4jOutHandler.java:200) at mil.army.security.ts3.Ts3Wss4j.TestHandlers.main(TestHandlers.java:36)
    No Bugmate found.