[
https://issues.apache.org/jira/browse/WSS-273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13027537#comment-13027537
]
Jeremy Tadman commented on WSS-273:
-----------------------------------
Actually Pär-Johan's approach *does* solve the problem. But only as long as
these calls are done before the signing process is started. Rather than doing
that I had modified the implementation of WSSConfig.init() (naughty, I know).
This caused it to fail in the above manner, but only the first time a token was
generated. After that it worked. Perhaps WSSConfig.init() is called a little
later than it is needed?
Unfortunately, there is another exception which I am getting after restarting
the application (without restarting the server).
I am investigating what the difference is between executions.
[5/2/11 13:14:33:828 EST] 0000001f SystemErr R
org.apache.ws.security.WSSecurityException: Signature creation failed; nested
exception is:
javax.xml.crypto.dsig.XMLSignatureException:
javax.xml.crypto.dsig.TransformException:
javax.xml.crypto.dsig.TransformException: java.lang.ClassCastException:
org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with
javax.xml.crypto.OctetStreamData
[5/2/11 13:14:33:828 EST] 0000001f SystemErr R at
org.apache.ws.security.saml.WSSecSignatureSAML.computeSignature(WSSecSignatureSAML.java:530)
[5/2/11 13:14:33:828 EST] 0000001f SystemErr R at
org.apache.ws.security.saml.WSSecSignatureSAML.build(WSSecSignatureSAML.java:155)
..... spring stuff....
[5/2/11 13:14:33:844 EST] 0000001f SystemErr R Caused by:
javax.xml.crypto.dsig.XMLSignatureException:
javax.xml.crypto.dsig.TransformException:
javax.xml.crypto.dsig.TransformException: java.lang.ClassCastException:
org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with
javax.xml.crypto.OctetStreamData
[5/2/11 13:14:33:844 EST] 0000001f SystemErr R at
org.jcp.xml.dsig.internal.dom.DOMReference.transform(Unknown Source)
[5/2/11 13:14:33:844 EST] 0000001f SystemErr R at
org.jcp.xml.dsig.internal.dom.DOMReference.digest(Unknown Source)
[5/2/11 13:14:33:844 EST] 0000001f SystemErr R at
org.jcp.xml.dsig.internal.dom.DOMXMLSignature.digestReference(Unknown Source)
[5/2/11 13:14:33:844 EST] 0000001f SystemErr R at
org.jcp.xml.dsig.internal.dom.DOMXMLSignature.sign(Unknown Source)
[5/2/11 13:14:33:844 EST] 0000001f SystemErr R at
org.apache.ws.security.saml.WSSecSignatureSAML.computeSignature(WSSecSignatureSAML.java:525)
[5/2/11 13:14:33:844 EST] 0000001f SystemErr R ... 64 more
[5/2/11 13:14:33:844 EST] 0000001f SystemErr R Caused by:
javax.xml.crypto.dsig.TransformException:
javax.xml.crypto.dsig.TransformException: java.lang.ClassCastException:
org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with
javax.xml.crypto.OctetStreamData
[5/2/11 13:14:33:844 EST] 0000001f SystemErr R at
org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:267)
[5/2/11 13:14:33:844 EST] 0000001f SystemErr R at
org.apache.ws.security.transform.STRTransform.transform(STRTransform.java:122)
[5/2/11 13:14:33:844 EST] 0000001f SystemErr R at
org.jcp.xml.dsig.internal.dom.DOMTransform.transform(Unknown Source)
[5/2/11 13:14:33:844 EST] 0000001f SystemErr R ... 69 more
[5/2/11 13:14:33:844 EST] 0000001f SystemErr R Caused by:
javax.xml.crypto.dsig.TransformException: java.lang.ClassCastException:
org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with
javax.xml.crypto.OctetStreamData
[5/2/11 13:14:33:844 EST] 0000001f SystemErr R at
org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:163)
[5/2/11 13:14:33:844 EST] 0000001f SystemErr R ... 71 more
[5/2/11 13:14:33:844 EST] 0000001f SystemErr R Caused by:
java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData
incompatible with javax.xml.crypto.OctetStreamData
[5/2/11 13:14:33:844 EST] 0000001f SystemErr R at
org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:161)
[5/2/11 13:14:33:844 EST] 0000001f SystemErr R ... 71 more
> org.apache.ws.security.transform.STRTransform causes ClassCastException when
> wss4j is running on IBM 1.6 JVM
> -------------------------------------------------------------------------------------------------------------
>
> Key: WSS-273
> URL: https://issues.apache.org/jira/browse/WSS-273
> Project: WSS4J
> Issue Type: Bug
> Components: WSS4J Core
> Affects Versions: 1.6
> Environment: Windows XP, IBM 1.6 JVM
> Reporter: Pär-Johan Lif
> Assignee: Colm O hEigeartaigh
>
> I have tried to use wss4j1.6 (alpha version) on IBM's 1.6 JVM. It works fine,
> except for when we are getting a SOAP-message where an STRTransform is used.
> Then we get the following exception below. (I should mention that it works
> on SUN's 1.6 JVM).
> java.lang.ClassCastException: org.apache.ws.security.transform.STRTransform
> incompatible with com.ibm.xml.crypto.dsig.dom.transform.TransformBase
> at
> com.ibm.xml.crypto.dsig.dom.Unmarshalling.unmarshalTransform(Unmarshalling.java:446)
> at
> com.ibm.xml.crypto.dsig.dom.Unmarshalling.unmarshalTransforms(Unmarshalling.java:422)
> at
> com.ibm.xml.crypto.dsig.dom.Unmarshalling.unmarshalReference(Unmarshalling.java:358)
> at
> com.ibm.xml.crypto.dsig.dom.Unmarshalling.unmarshalSignedInfo(Unmarshalling.java:272)
> at
> com.ibm.xml.crypto.dsig.dom.Unmarshalling.unmarshalSignature(Unmarshalling.java:196)
> at
> com.ibm.xml.crypto.dsig.dom.Unmarshalling.unmarshal(Unmarshalling.java:96)
> at
> com.ibm.xml.crypto.dsig.dom.FactoryImpl.unmarshalXMLSignature(FactoryImpl.java:217)
> at
> org.apache.ws.security.processor.SignatureProcessor.verifyXMLSignature(SignatureProcessor.java:323)
> at
> org.apache.ws.security.processor.SignatureProcessor.handleToken(SignatureProcessor.java:165)
> at
> org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:303)
> at
> org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:231)
> at
> org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:185)
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]