You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ws.apache.org by "Jeremy Tadman (JIRA)" <ji...@apache.org> on 2011/05/04 09:24:03 UTC

[jira] [Created] (WSS-282) STRTransform JCE provider throws java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData in Websphere

STRTransform JCE provider throws  java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData in Websphere
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

                 Key: WSS-282
                 URL: https://issues.apache.org/jira/browse/WSS-282
             Project: WSS4J
          Issue Type: Bug
          Components: WSS4J Core
    Affects Versions: 1.6
         Environment: WebSphere 7.0.0.15
            Reporter: Jeremy Tadman
            Assignee: Colm O hEigeartaigh


When using WSS4J to generate signed sender-vouches SAML tokens involving an STRTransform I get the below exception (right at the end). It only happens when there are multiple applications using WSS4J or the application is restarted.

Seems to be related to the fact that the STRTransformProvider is added to WebSphere's JCE provider list using Security.addProvider(provider) but is loaded using the WAR module's classloader. When an app is restarted, this classloader hangs around and causes  issues because org.jcp.xml.dsig.internal.dom.DOMSubTreeData loaded by the new module instance's classloader is not considered an instance of the org.jcp.xml.dsig.internal.dom.DOMSubTreeData class loaded by the STRTransform instance. I tested this by modifying the source code and printing out which classloader had loaded the class. In the case where things work (first startup of the first application to use WSS4J) the classloaders are the same. In cases where things don't work the classloader of the DOMSubTreeData instance passed into the transform is different to the classloader of the DOMSubTreeData class itself. Similar result when trying from one application then another.

This seems loosely related to https://issues.apache.org/jira/browse/WSS-82 and http://bouncy-castle.1462172.n4.nabble.com/Bug-in-Cipher-class-td1465452.html.
Seems there are problems running custom JCE providers on WebSphere (and IBM say they don't support custom JCE providers). 

Adding WSS4j to a higher level classloader causes all kinds of other errors to come up.

Is there any way we can get this to work or are we WebSphere users out of luck? (Or am I just doing something horrible wrong?). I've already applied the fixes shown in https://issues.apache.org/jira/browse/WSS-273 (I got those errors before I got this one).

[5/4/11 16:41:04:379 EST] 00000029 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/4/11 16:41:04:379 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.computeSignature(WSSecSignatureSAML.java:529)
[5/4/11 16:41:04:379 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.build(WSSecSignatureSAML.java:155)
... servlet stack trace components ....
[5/4/11 16:41:04:392 EST] 00000029 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/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.transform(DOMReference.java:412)
[5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.digest(DOMReference.java:304)
[5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMXMLSignature.digestReference(DOMXMLSignature.java:467)
[5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMXMLSignature.sign(DOMXMLSignature.java:361)
[5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.computeSignature(WSSecSignatureSAML.java:524)
[5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	... 66 more
[5/4/11 16:41:04:394 EST] 00000029 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/4/11 16:41:04:394 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:267)
[5/4/11 16:41:04:394 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transform(STRTransform.java:122)
[5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMTransform.transform(DOMTransform.java:147)
[5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.transform(DOMReference.java:409)
[5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	... 70 more
[5/4/11 16:41:04:395 EST] 00000029 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/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:163)
[5/4/11 16:41:04:396 EST] 00000029 SystemErr     R 	... 73 more
[5/4/11 16:41:04:396 EST] 00000029 SystemErr     R Caused by: java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData
[5/4/11 16:41:04:397 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:160)
[5/4/11 16:41:04:397 EST] 00000029 SystemErr     R 	... 73 more

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org


[jira] [Commented] (WSS-282) STRTransform JCE provider throws java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData in Websphere

Posted by "Colm O hEigeartaigh (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WSS-282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042070#comment-13042070 ] 

Colm O hEigeartaigh commented on WSS-282:
-----------------------------------------


Can you confirm whether the jar attached to WSS-273 fixes this issue?

https://issues.apache.org/jira/browse/WSS-273

Colm.

> STRTransform JCE provider throws  java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData in Websphere
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WSS-282
>                 URL: https://issues.apache.org/jira/browse/WSS-282
>             Project: WSS4J
>          Issue Type: Bug
>          Components: WSS4J Core
>    Affects Versions: 1.6
>         Environment: WebSphere 7.0.0.15
>            Reporter: Jeremy Tadman
>            Assignee: Colm O hEigeartaigh
>             Fix For: 1.6.1
>
>
> When using WSS4J to generate signed sender-vouches SAML tokens involving an STRTransform I get the below exception (right at the end). It only happens when there are multiple applications using WSS4J or the application is restarted.
> Seems to be related to the fact that the STRTransformProvider is added to WebSphere's JCE provider list using Security.addProvider(provider) but is loaded using the WAR module's classloader. When an app is restarted, this classloader hangs around and causes  issues because org.jcp.xml.dsig.internal.dom.DOMSubTreeData loaded by the new module instance's classloader is not considered an instance of the org.jcp.xml.dsig.internal.dom.DOMSubTreeData class loaded by the STRTransform instance. I tested this by modifying the source code and printing out which classloader had loaded the class. In the case where things work (first startup of the first application to use WSS4J) the classloaders are the same. In cases where things don't work the classloader of the DOMSubTreeData instance passed into the transform is different to the classloader of the DOMSubTreeData class itself. Similar result when trying from one application then another.
> This seems loosely related to https://issues.apache.org/jira/browse/WSS-82 and http://bouncy-castle.1462172.n4.nabble.com/Bug-in-Cipher-class-td1465452.html.
> Seems there are problems running custom JCE providers on WebSphere (and IBM say they don't support custom JCE providers). 
> Adding WSS4j to a higher level classloader causes all kinds of other errors to come up.
> Is there any way we can get this to work or are we WebSphere users out of luck? (Or am I just doing something horrible wrong?). I've already applied the fixes shown in https://issues.apache.org/jira/browse/WSS-273 (I got those errors before I got this one).
> [5/4/11 16:41:04:379 EST] 00000029 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/4/11 16:41:04:379 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.computeSignature(WSSecSignatureSAML.java:529)
> [5/4/11 16:41:04:379 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.build(WSSecSignatureSAML.java:155)
> ... servlet stack trace components ....
> [5/4/11 16:41:04:392 EST] 00000029 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/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.transform(DOMReference.java:412)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.digest(DOMReference.java:304)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMXMLSignature.digestReference(DOMXMLSignature.java:467)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMXMLSignature.sign(DOMXMLSignature.java:361)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.computeSignature(WSSecSignatureSAML.java:524)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	... 66 more
> [5/4/11 16:41:04:394 EST] 00000029 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/4/11 16:41:04:394 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:267)
> [5/4/11 16:41:04:394 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transform(STRTransform.java:122)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMTransform.transform(DOMTransform.java:147)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.transform(DOMReference.java:409)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	... 70 more
> [5/4/11 16:41:04:395 EST] 00000029 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/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:163)
> [5/4/11 16:41:04:396 EST] 00000029 SystemErr     R 	... 73 more
> [5/4/11 16:41:04:396 EST] 00000029 SystemErr     R Caused by: java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData
> [5/4/11 16:41:04:397 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:160)
> [5/4/11 16:41:04:397 EST] 00000029 SystemErr     R 	... 73 more

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org


[jira] [Updated] (WSS-282) STRTransform JCE provider throws java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData in Websphere

Posted by "Colm O hEigeartaigh (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WSS-282?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Colm O hEigeartaigh updated WSS-282:
------------------------------------

    Attachment: wss4j-1.6.4-SNAPSHOT.jar
    
> STRTransform JCE provider throws  java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData in Websphere
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WSS-282
>                 URL: https://issues.apache.org/jira/browse/WSS-282
>             Project: WSS4J
>          Issue Type: Bug
>          Components: WSS4J Core
>    Affects Versions: 1.6
>         Environment: WebSphere 7.0.0.15
>            Reporter: Jeremy Tadman
>            Assignee: Colm O hEigeartaigh
>         Attachments: wss4j-1.6.4-SNAPSHOT.jar, xmlsec-1.5.0-SNAPSHOT.jar
>
>
> When using WSS4J to generate signed sender-vouches SAML tokens involving an STRTransform I get the below exception (right at the end). It only happens when there are multiple applications using WSS4J or the application is restarted.
> Seems to be related to the fact that the STRTransformProvider is added to WebSphere's JCE provider list using Security.addProvider(provider) but is loaded using the WAR module's classloader. When an app is restarted, this classloader hangs around and causes  issues because org.jcp.xml.dsig.internal.dom.DOMSubTreeData loaded by the new module instance's classloader is not considered an instance of the org.jcp.xml.dsig.internal.dom.DOMSubTreeData class loaded by the STRTransform instance. I tested this by modifying the source code and printing out which classloader had loaded the class. In the case where things work (first startup of the first application to use WSS4J) the classloaders are the same. In cases where things don't work the classloader of the DOMSubTreeData instance passed into the transform is different to the classloader of the DOMSubTreeData class itself. Similar result when trying from one application then another.
> This seems loosely related to https://issues.apache.org/jira/browse/WSS-82 and http://bouncy-castle.1462172.n4.nabble.com/Bug-in-Cipher-class-td1465452.html.
> Seems there are problems running custom JCE providers on WebSphere (and IBM say they don't support custom JCE providers). 
> Adding WSS4j to a higher level classloader causes all kinds of other errors to come up.
> Is there any way we can get this to work or are we WebSphere users out of luck? (Or am I just doing something horrible wrong?). I've already applied the fixes shown in https://issues.apache.org/jira/browse/WSS-273 (I got those errors before I got this one).
> [5/4/11 16:41:04:379 EST] 00000029 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/4/11 16:41:04:379 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.computeSignature(WSSecSignatureSAML.java:529)
> [5/4/11 16:41:04:379 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.build(WSSecSignatureSAML.java:155)
> ... servlet stack trace components ....
> [5/4/11 16:41:04:392 EST] 00000029 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/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.transform(DOMReference.java:412)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.digest(DOMReference.java:304)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMXMLSignature.digestReference(DOMXMLSignature.java:467)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMXMLSignature.sign(DOMXMLSignature.java:361)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.computeSignature(WSSecSignatureSAML.java:524)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	... 66 more
> [5/4/11 16:41:04:394 EST] 00000029 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/4/11 16:41:04:394 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:267)
> [5/4/11 16:41:04:394 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transform(STRTransform.java:122)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMTransform.transform(DOMTransform.java:147)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.transform(DOMReference.java:409)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	... 70 more
> [5/4/11 16:41:04:395 EST] 00000029 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/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:163)
> [5/4/11 16:41:04:396 EST] 00000029 SystemErr     R 	... 73 more
> [5/4/11 16:41:04:396 EST] 00000029 SystemErr     R Caused by: java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData
> [5/4/11 16:41:04:397 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:160)
> [5/4/11 16:41:04:397 EST] 00000029 SystemErr     R 	... 73 more

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org


[jira] [Commented] (WSS-282) STRTransform JCE provider throws java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData in Websphere

Posted by "Jeremy Tadman (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WSS-282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13044170#comment-13044170 ] 

Jeremy Tadman commented on WSS-282:
-----------------------------------

The attached jar does not completely fix the problem. 

When running only one application on the server, the problem will appear to be gone as each time that application will refresh the copy of the STR Transform which is in the JCE provider list. When running two applications, the problem still occurs under the following use:

Start both applications.
Generate SAML token in app 1 (causes init to occur and App 1's STRTransform is added to provider list). - Works fine
Generate SAML token in app 2 (causes init to occur and App 2's STRTransform is added to provider list). - Works fine
Generate SAML token in app 1 (init does not occur. App 2's STRTransform is the copy which is in provider list). - Class cast exception as two different org.jcp.xml.dsig.internal.dom.DOMSubTreeData classes are compared. 

I've tried that approach in the past (removing the STRTransform provider before init). The only way I got it to work was if the STR transform was removed and replaced in the list EVERY time STRTransform is called. This would probably not hold up under load (thread safety?) and just seems dodgy to me.

We did end up solving this by placing WSS4j and all of its dependencies in the WebSphere "extension" class loader (WAS_BASE/lib/ext). This is non-ideal as we're introducing about 10 new jars to a classloader shared by all applications, but it works in my development environment (yet to be tested with the actual apps which will be running). It'd be great if we were able to isolate just the STRTransform in a separate JAR without any unnecessary such as OpenSAML. That way the JCE provider and the necessary dependencies (santuario, xalan, xerces) could be placed in the extensions classloader relatively cleanly.

I'll post a list of JARs we've included in the ext classloader when I get back to work on Monday.

> STRTransform JCE provider throws  java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData in Websphere
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WSS-282
>                 URL: https://issues.apache.org/jira/browse/WSS-282
>             Project: WSS4J
>          Issue Type: Bug
>          Components: WSS4J Core
>    Affects Versions: 1.6
>         Environment: WebSphere 7.0.0.15
>            Reporter: Jeremy Tadman
>            Assignee: Colm O hEigeartaigh
>
> When using WSS4J to generate signed sender-vouches SAML tokens involving an STRTransform I get the below exception (right at the end). It only happens when there are multiple applications using WSS4J or the application is restarted.
> Seems to be related to the fact that the STRTransformProvider is added to WebSphere's JCE provider list using Security.addProvider(provider) but is loaded using the WAR module's classloader. When an app is restarted, this classloader hangs around and causes  issues because org.jcp.xml.dsig.internal.dom.DOMSubTreeData loaded by the new module instance's classloader is not considered an instance of the org.jcp.xml.dsig.internal.dom.DOMSubTreeData class loaded by the STRTransform instance. I tested this by modifying the source code and printing out which classloader had loaded the class. In the case where things work (first startup of the first application to use WSS4J) the classloaders are the same. In cases where things don't work the classloader of the DOMSubTreeData instance passed into the transform is different to the classloader of the DOMSubTreeData class itself. Similar result when trying from one application then another.
> This seems loosely related to https://issues.apache.org/jira/browse/WSS-82 and http://bouncy-castle.1462172.n4.nabble.com/Bug-in-Cipher-class-td1465452.html.
> Seems there are problems running custom JCE providers on WebSphere (and IBM say they don't support custom JCE providers). 
> Adding WSS4j to a higher level classloader causes all kinds of other errors to come up.
> Is there any way we can get this to work or are we WebSphere users out of luck? (Or am I just doing something horrible wrong?). I've already applied the fixes shown in https://issues.apache.org/jira/browse/WSS-273 (I got those errors before I got this one).
> [5/4/11 16:41:04:379 EST] 00000029 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/4/11 16:41:04:379 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.computeSignature(WSSecSignatureSAML.java:529)
> [5/4/11 16:41:04:379 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.build(WSSecSignatureSAML.java:155)
> ... servlet stack trace components ....
> [5/4/11 16:41:04:392 EST] 00000029 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/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.transform(DOMReference.java:412)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.digest(DOMReference.java:304)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMXMLSignature.digestReference(DOMXMLSignature.java:467)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMXMLSignature.sign(DOMXMLSignature.java:361)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.computeSignature(WSSecSignatureSAML.java:524)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	... 66 more
> [5/4/11 16:41:04:394 EST] 00000029 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/4/11 16:41:04:394 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:267)
> [5/4/11 16:41:04:394 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transform(STRTransform.java:122)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMTransform.transform(DOMTransform.java:147)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.transform(DOMReference.java:409)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	... 70 more
> [5/4/11 16:41:04:395 EST] 00000029 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/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:163)
> [5/4/11 16:41:04:396 EST] 00000029 SystemErr     R 	... 73 more
> [5/4/11 16:41:04:396 EST] 00000029 SystemErr     R Caused by: java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData
> [5/4/11 16:41:04:397 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:160)
> [5/4/11 16:41:04:397 EST] 00000029 SystemErr     R 	... 73 more

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org


[jira] [Commented] (WSS-282) STRTransform JCE provider throws java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData in Websphere

Posted by "Colm O hEigeartaigh (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WSS-282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13154095#comment-13154095 ] 

Colm O hEigeartaigh commented on WSS-282:
-----------------------------------------


Hi Suresh,

Can you try again with the attached jars? I added some debug logging in WSSecSignature to print out the provider list at that point - maybe the Santuario provider needs to be installed further up the chain.

Colm.
                
> STRTransform JCE provider throws  java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData in Websphere
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WSS-282
>                 URL: https://issues.apache.org/jira/browse/WSS-282
>             Project: WSS4J
>          Issue Type: Bug
>          Components: WSS4J Core
>    Affects Versions: 1.6
>         Environment: WebSphere 7.0.0.15
>            Reporter: Jeremy Tadman
>            Assignee: Colm O hEigeartaigh
>         Attachments: wss4j-1.6.4-SNAPSHOT.jar, xmlsec-1.5.0-SNAPSHOT.jar
>
>
> When using WSS4J to generate signed sender-vouches SAML tokens involving an STRTransform I get the below exception (right at the end). It only happens when there are multiple applications using WSS4J or the application is restarted.
> Seems to be related to the fact that the STRTransformProvider is added to WebSphere's JCE provider list using Security.addProvider(provider) but is loaded using the WAR module's classloader. When an app is restarted, this classloader hangs around and causes  issues because org.jcp.xml.dsig.internal.dom.DOMSubTreeData loaded by the new module instance's classloader is not considered an instance of the org.jcp.xml.dsig.internal.dom.DOMSubTreeData class loaded by the STRTransform instance. I tested this by modifying the source code and printing out which classloader had loaded the class. In the case where things work (first startup of the first application to use WSS4J) the classloaders are the same. In cases where things don't work the classloader of the DOMSubTreeData instance passed into the transform is different to the classloader of the DOMSubTreeData class itself. Similar result when trying from one application then another.
> This seems loosely related to https://issues.apache.org/jira/browse/WSS-82 and http://bouncy-castle.1462172.n4.nabble.com/Bug-in-Cipher-class-td1465452.html.
> Seems there are problems running custom JCE providers on WebSphere (and IBM say they don't support custom JCE providers). 
> Adding WSS4j to a higher level classloader causes all kinds of other errors to come up.
> Is there any way we can get this to work or are we WebSphere users out of luck? (Or am I just doing something horrible wrong?). I've already applied the fixes shown in https://issues.apache.org/jira/browse/WSS-273 (I got those errors before I got this one).
> [5/4/11 16:41:04:379 EST] 00000029 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/4/11 16:41:04:379 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.computeSignature(WSSecSignatureSAML.java:529)
> [5/4/11 16:41:04:379 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.build(WSSecSignatureSAML.java:155)
> ... servlet stack trace components ....
> [5/4/11 16:41:04:392 EST] 00000029 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/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.transform(DOMReference.java:412)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.digest(DOMReference.java:304)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMXMLSignature.digestReference(DOMXMLSignature.java:467)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMXMLSignature.sign(DOMXMLSignature.java:361)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.computeSignature(WSSecSignatureSAML.java:524)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	... 66 more
> [5/4/11 16:41:04:394 EST] 00000029 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/4/11 16:41:04:394 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:267)
> [5/4/11 16:41:04:394 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transform(STRTransform.java:122)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMTransform.transform(DOMTransform.java:147)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.transform(DOMReference.java:409)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	... 70 more
> [5/4/11 16:41:04:395 EST] 00000029 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/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:163)
> [5/4/11 16:41:04:396 EST] 00000029 SystemErr     R 	... 73 more
> [5/4/11 16:41:04:396 EST] 00000029 SystemErr     R Caused by: java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData
> [5/4/11 16:41:04:397 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:160)
> [5/4/11 16:41:04:397 EST] 00000029 SystemErr     R 	... 73 more

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org


[jira] [Updated] (WSS-282) STRTransform JCE provider throws java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData in Websphere

Posted by "Colm O hEigeartaigh (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WSS-282?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Colm O hEigeartaigh updated WSS-282:
------------------------------------

    Attachment: xmlsec-1.5.0-SNAPSHOT.jar
    
> STRTransform JCE provider throws  java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData in Websphere
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WSS-282
>                 URL: https://issues.apache.org/jira/browse/WSS-282
>             Project: WSS4J
>          Issue Type: Bug
>          Components: WSS4J Core
>    Affects Versions: 1.6
>         Environment: WebSphere 7.0.0.15
>            Reporter: Jeremy Tadman
>            Assignee: Colm O hEigeartaigh
>         Attachments: wss4j-1.6.4-SNAPSHOT.jar, xmlsec-1.5.0-SNAPSHOT.jar
>
>
> When using WSS4J to generate signed sender-vouches SAML tokens involving an STRTransform I get the below exception (right at the end). It only happens when there are multiple applications using WSS4J or the application is restarted.
> Seems to be related to the fact that the STRTransformProvider is added to WebSphere's JCE provider list using Security.addProvider(provider) but is loaded using the WAR module's classloader. When an app is restarted, this classloader hangs around and causes  issues because org.jcp.xml.dsig.internal.dom.DOMSubTreeData loaded by the new module instance's classloader is not considered an instance of the org.jcp.xml.dsig.internal.dom.DOMSubTreeData class loaded by the STRTransform instance. I tested this by modifying the source code and printing out which classloader had loaded the class. In the case where things work (first startup of the first application to use WSS4J) the classloaders are the same. In cases where things don't work the classloader of the DOMSubTreeData instance passed into the transform is different to the classloader of the DOMSubTreeData class itself. Similar result when trying from one application then another.
> This seems loosely related to https://issues.apache.org/jira/browse/WSS-82 and http://bouncy-castle.1462172.n4.nabble.com/Bug-in-Cipher-class-td1465452.html.
> Seems there are problems running custom JCE providers on WebSphere (and IBM say they don't support custom JCE providers). 
> Adding WSS4j to a higher level classloader causes all kinds of other errors to come up.
> Is there any way we can get this to work or are we WebSphere users out of luck? (Or am I just doing something horrible wrong?). I've already applied the fixes shown in https://issues.apache.org/jira/browse/WSS-273 (I got those errors before I got this one).
> [5/4/11 16:41:04:379 EST] 00000029 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/4/11 16:41:04:379 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.computeSignature(WSSecSignatureSAML.java:529)
> [5/4/11 16:41:04:379 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.build(WSSecSignatureSAML.java:155)
> ... servlet stack trace components ....
> [5/4/11 16:41:04:392 EST] 00000029 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/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.transform(DOMReference.java:412)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.digest(DOMReference.java:304)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMXMLSignature.digestReference(DOMXMLSignature.java:467)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMXMLSignature.sign(DOMXMLSignature.java:361)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.computeSignature(WSSecSignatureSAML.java:524)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	... 66 more
> [5/4/11 16:41:04:394 EST] 00000029 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/4/11 16:41:04:394 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:267)
> [5/4/11 16:41:04:394 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transform(STRTransform.java:122)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMTransform.transform(DOMTransform.java:147)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.transform(DOMReference.java:409)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	... 70 more
> [5/4/11 16:41:04:395 EST] 00000029 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/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:163)
> [5/4/11 16:41:04:396 EST] 00000029 SystemErr     R 	... 73 more
> [5/4/11 16:41:04:396 EST] 00000029 SystemErr     R Caused by: java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData
> [5/4/11 16:41:04:397 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:160)
> [5/4/11 16:41:04:397 EST] 00000029 SystemErr     R 	... 73 more

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org


[jira] [Commented] (WSS-282) STRTransform JCE provider throws java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData in Websphere

Posted by "Jeremy Tadman (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WSS-282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13045798#comment-13045798 ] 

Jeremy Tadman commented on WSS-282:
-----------------------------------

Placing the following jars in the extension classloader's classpath will cause WSS4J to operate correct when using STRTransform with multiple applications and across application restarts.

bcprov-jdk16-1.45.jar
joda-time-1.6.2.jar
jul-to-slf4j-1.6.1.jar
log4j-1.2.16.jar
log4j-over-slf4j-1.6.1.jar
opensaml-2.4.1.jar
openws-1.4.1.jar
serializer-2.7.1.jar
slf4j-api-1.6.1.jar
slf4j-log4j12-1.6.1.jar
wss4j-1.6.0.jar
xalan-2.7.1.jar
xercesImpl-2.9.1.jar
xml-apis-1.3.04.jar
xmlsec-1.4.4.jar
xmltooling-1.3.1.jar

> STRTransform JCE provider throws  java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData in Websphere
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WSS-282
>                 URL: https://issues.apache.org/jira/browse/WSS-282
>             Project: WSS4J
>          Issue Type: Bug
>          Components: WSS4J Core
>    Affects Versions: 1.6
>         Environment: WebSphere 7.0.0.15
>            Reporter: Jeremy Tadman
>            Assignee: Colm O hEigeartaigh
>
> When using WSS4J to generate signed sender-vouches SAML tokens involving an STRTransform I get the below exception (right at the end). It only happens when there are multiple applications using WSS4J or the application is restarted.
> Seems to be related to the fact that the STRTransformProvider is added to WebSphere's JCE provider list using Security.addProvider(provider) but is loaded using the WAR module's classloader. When an app is restarted, this classloader hangs around and causes  issues because org.jcp.xml.dsig.internal.dom.DOMSubTreeData loaded by the new module instance's classloader is not considered an instance of the org.jcp.xml.dsig.internal.dom.DOMSubTreeData class loaded by the STRTransform instance. I tested this by modifying the source code and printing out which classloader had loaded the class. In the case where things work (first startup of the first application to use WSS4J) the classloaders are the same. In cases where things don't work the classloader of the DOMSubTreeData instance passed into the transform is different to the classloader of the DOMSubTreeData class itself. Similar result when trying from one application then another.
> This seems loosely related to https://issues.apache.org/jira/browse/WSS-82 and http://bouncy-castle.1462172.n4.nabble.com/Bug-in-Cipher-class-td1465452.html.
> Seems there are problems running custom JCE providers on WebSphere (and IBM say they don't support custom JCE providers). 
> Adding WSS4j to a higher level classloader causes all kinds of other errors to come up.
> Is there any way we can get this to work or are we WebSphere users out of luck? (Or am I just doing something horrible wrong?). I've already applied the fixes shown in https://issues.apache.org/jira/browse/WSS-273 (I got those errors before I got this one).
> [5/4/11 16:41:04:379 EST] 00000029 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/4/11 16:41:04:379 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.computeSignature(WSSecSignatureSAML.java:529)
> [5/4/11 16:41:04:379 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.build(WSSecSignatureSAML.java:155)
> ... servlet stack trace components ....
> [5/4/11 16:41:04:392 EST] 00000029 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/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.transform(DOMReference.java:412)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.digest(DOMReference.java:304)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMXMLSignature.digestReference(DOMXMLSignature.java:467)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMXMLSignature.sign(DOMXMLSignature.java:361)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.computeSignature(WSSecSignatureSAML.java:524)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	... 66 more
> [5/4/11 16:41:04:394 EST] 00000029 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/4/11 16:41:04:394 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:267)
> [5/4/11 16:41:04:394 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transform(STRTransform.java:122)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMTransform.transform(DOMTransform.java:147)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.transform(DOMReference.java:409)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	... 70 more
> [5/4/11 16:41:04:395 EST] 00000029 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/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:163)
> [5/4/11 16:41:04:396 EST] 00000029 SystemErr     R 	... 73 more
> [5/4/11 16:41:04:396 EST] 00000029 SystemErr     R Caused by: java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData
> [5/4/11 16:41:04:397 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:160)
> [5/4/11 16:41:04:397 EST] 00000029 SystemErr     R 	... 73 more

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org


[jira] [Updated] (WSS-282) STRTransform JCE provider throws java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData in Websphere

Posted by "Colm O hEigeartaigh (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WSS-282?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Colm O hEigeartaigh updated WSS-282:
------------------------------------

    Attachment:     (was: xmlsec-1.5.0-SNAPSHOT.jar)
    
> STRTransform JCE provider throws  java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData in Websphere
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WSS-282
>                 URL: https://issues.apache.org/jira/browse/WSS-282
>             Project: WSS4J
>          Issue Type: Bug
>          Components: WSS4J Core
>    Affects Versions: 1.6
>         Environment: WebSphere 7.0.0.15
>            Reporter: Jeremy Tadman
>            Assignee: Colm O hEigeartaigh
>         Attachments: wss4j-1.6.4-SNAPSHOT.jar, xmlsec-1.5.0-SNAPSHOT.jar
>
>
> When using WSS4J to generate signed sender-vouches SAML tokens involving an STRTransform I get the below exception (right at the end). It only happens when there are multiple applications using WSS4J or the application is restarted.
> Seems to be related to the fact that the STRTransformProvider is added to WebSphere's JCE provider list using Security.addProvider(provider) but is loaded using the WAR module's classloader. When an app is restarted, this classloader hangs around and causes  issues because org.jcp.xml.dsig.internal.dom.DOMSubTreeData loaded by the new module instance's classloader is not considered an instance of the org.jcp.xml.dsig.internal.dom.DOMSubTreeData class loaded by the STRTransform instance. I tested this by modifying the source code and printing out which classloader had loaded the class. In the case where things work (first startup of the first application to use WSS4J) the classloaders are the same. In cases where things don't work the classloader of the DOMSubTreeData instance passed into the transform is different to the classloader of the DOMSubTreeData class itself. Similar result when trying from one application then another.
> This seems loosely related to https://issues.apache.org/jira/browse/WSS-82 and http://bouncy-castle.1462172.n4.nabble.com/Bug-in-Cipher-class-td1465452.html.
> Seems there are problems running custom JCE providers on WebSphere (and IBM say they don't support custom JCE providers). 
> Adding WSS4j to a higher level classloader causes all kinds of other errors to come up.
> Is there any way we can get this to work or are we WebSphere users out of luck? (Or am I just doing something horrible wrong?). I've already applied the fixes shown in https://issues.apache.org/jira/browse/WSS-273 (I got those errors before I got this one).
> [5/4/11 16:41:04:379 EST] 00000029 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/4/11 16:41:04:379 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.computeSignature(WSSecSignatureSAML.java:529)
> [5/4/11 16:41:04:379 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.build(WSSecSignatureSAML.java:155)
> ... servlet stack trace components ....
> [5/4/11 16:41:04:392 EST] 00000029 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/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.transform(DOMReference.java:412)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.digest(DOMReference.java:304)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMXMLSignature.digestReference(DOMXMLSignature.java:467)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMXMLSignature.sign(DOMXMLSignature.java:361)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.computeSignature(WSSecSignatureSAML.java:524)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	... 66 more
> [5/4/11 16:41:04:394 EST] 00000029 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/4/11 16:41:04:394 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:267)
> [5/4/11 16:41:04:394 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transform(STRTransform.java:122)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMTransform.transform(DOMTransform.java:147)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.transform(DOMReference.java:409)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	... 70 more
> [5/4/11 16:41:04:395 EST] 00000029 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/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:163)
> [5/4/11 16:41:04:396 EST] 00000029 SystemErr     R 	... 73 more
> [5/4/11 16:41:04:396 EST] 00000029 SystemErr     R Caused by: java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData
> [5/4/11 16:41:04:397 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:160)
> [5/4/11 16:41:04:397 EST] 00000029 SystemErr     R 	... 73 more

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org


[jira] [Updated] (WSS-282) STRTransform JCE provider throws java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData in Websphere

Posted by "Colm O hEigeartaigh (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WSS-282?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Colm O hEigeartaigh updated WSS-282:
------------------------------------

    Attachment:     (was: wss4j-1.6.4-SNAPSHOT.jar)
    
> STRTransform JCE provider throws  java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData in Websphere
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WSS-282
>                 URL: https://issues.apache.org/jira/browse/WSS-282
>             Project: WSS4J
>          Issue Type: Bug
>          Components: WSS4J Core
>    Affects Versions: 1.6
>         Environment: WebSphere 7.0.0.15
>            Reporter: Jeremy Tadman
>            Assignee: Colm O hEigeartaigh
>         Attachments: wss4j-1.6.4-SNAPSHOT.jar, xmlsec-1.5.0-SNAPSHOT.jar
>
>
> When using WSS4J to generate signed sender-vouches SAML tokens involving an STRTransform I get the below exception (right at the end). It only happens when there are multiple applications using WSS4J or the application is restarted.
> Seems to be related to the fact that the STRTransformProvider is added to WebSphere's JCE provider list using Security.addProvider(provider) but is loaded using the WAR module's classloader. When an app is restarted, this classloader hangs around and causes  issues because org.jcp.xml.dsig.internal.dom.DOMSubTreeData loaded by the new module instance's classloader is not considered an instance of the org.jcp.xml.dsig.internal.dom.DOMSubTreeData class loaded by the STRTransform instance. I tested this by modifying the source code and printing out which classloader had loaded the class. In the case where things work (first startup of the first application to use WSS4J) the classloaders are the same. In cases where things don't work the classloader of the DOMSubTreeData instance passed into the transform is different to the classloader of the DOMSubTreeData class itself. Similar result when trying from one application then another.
> This seems loosely related to https://issues.apache.org/jira/browse/WSS-82 and http://bouncy-castle.1462172.n4.nabble.com/Bug-in-Cipher-class-td1465452.html.
> Seems there are problems running custom JCE providers on WebSphere (and IBM say they don't support custom JCE providers). 
> Adding WSS4j to a higher level classloader causes all kinds of other errors to come up.
> Is there any way we can get this to work or are we WebSphere users out of luck? (Or am I just doing something horrible wrong?). I've already applied the fixes shown in https://issues.apache.org/jira/browse/WSS-273 (I got those errors before I got this one).
> [5/4/11 16:41:04:379 EST] 00000029 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/4/11 16:41:04:379 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.computeSignature(WSSecSignatureSAML.java:529)
> [5/4/11 16:41:04:379 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.build(WSSecSignatureSAML.java:155)
> ... servlet stack trace components ....
> [5/4/11 16:41:04:392 EST] 00000029 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/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.transform(DOMReference.java:412)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.digest(DOMReference.java:304)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMXMLSignature.digestReference(DOMXMLSignature.java:467)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMXMLSignature.sign(DOMXMLSignature.java:361)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.computeSignature(WSSecSignatureSAML.java:524)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	... 66 more
> [5/4/11 16:41:04:394 EST] 00000029 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/4/11 16:41:04:394 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:267)
> [5/4/11 16:41:04:394 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transform(STRTransform.java:122)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMTransform.transform(DOMTransform.java:147)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.transform(DOMReference.java:409)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	... 70 more
> [5/4/11 16:41:04:395 EST] 00000029 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/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:163)
> [5/4/11 16:41:04:396 EST] 00000029 SystemErr     R 	... 73 more
> [5/4/11 16:41:04:396 EST] 00000029 SystemErr     R Caused by: java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData
> [5/4/11 16:41:04:397 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:160)
> [5/4/11 16:41:04:397 EST] 00000029 SystemErr     R 	... 73 more

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org


[jira] [Updated] (WSS-282) STRTransform JCE provider throws java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData in Websphere

Posted by "Colm O hEigeartaigh (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WSS-282?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Colm O hEigeartaigh updated WSS-282:
------------------------------------

    Fix Version/s:     (was: 1.6.1)

> STRTransform JCE provider throws  java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData in Websphere
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WSS-282
>                 URL: https://issues.apache.org/jira/browse/WSS-282
>             Project: WSS4J
>          Issue Type: Bug
>          Components: WSS4J Core
>    Affects Versions: 1.6
>         Environment: WebSphere 7.0.0.15
>            Reporter: Jeremy Tadman
>            Assignee: Colm O hEigeartaigh
>
> When using WSS4J to generate signed sender-vouches SAML tokens involving an STRTransform I get the below exception (right at the end). It only happens when there are multiple applications using WSS4J or the application is restarted.
> Seems to be related to the fact that the STRTransformProvider is added to WebSphere's JCE provider list using Security.addProvider(provider) but is loaded using the WAR module's classloader. When an app is restarted, this classloader hangs around and causes  issues because org.jcp.xml.dsig.internal.dom.DOMSubTreeData loaded by the new module instance's classloader is not considered an instance of the org.jcp.xml.dsig.internal.dom.DOMSubTreeData class loaded by the STRTransform instance. I tested this by modifying the source code and printing out which classloader had loaded the class. In the case where things work (first startup of the first application to use WSS4J) the classloaders are the same. In cases where things don't work the classloader of the DOMSubTreeData instance passed into the transform is different to the classloader of the DOMSubTreeData class itself. Similar result when trying from one application then another.
> This seems loosely related to https://issues.apache.org/jira/browse/WSS-82 and http://bouncy-castle.1462172.n4.nabble.com/Bug-in-Cipher-class-td1465452.html.
> Seems there are problems running custom JCE providers on WebSphere (and IBM say they don't support custom JCE providers). 
> Adding WSS4j to a higher level classloader causes all kinds of other errors to come up.
> Is there any way we can get this to work or are we WebSphere users out of luck? (Or am I just doing something horrible wrong?). I've already applied the fixes shown in https://issues.apache.org/jira/browse/WSS-273 (I got those errors before I got this one).
> [5/4/11 16:41:04:379 EST] 00000029 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/4/11 16:41:04:379 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.computeSignature(WSSecSignatureSAML.java:529)
> [5/4/11 16:41:04:379 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.build(WSSecSignatureSAML.java:155)
> ... servlet stack trace components ....
> [5/4/11 16:41:04:392 EST] 00000029 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/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.transform(DOMReference.java:412)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.digest(DOMReference.java:304)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMXMLSignature.digestReference(DOMXMLSignature.java:467)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMXMLSignature.sign(DOMXMLSignature.java:361)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.computeSignature(WSSecSignatureSAML.java:524)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	... 66 more
> [5/4/11 16:41:04:394 EST] 00000029 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/4/11 16:41:04:394 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:267)
> [5/4/11 16:41:04:394 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transform(STRTransform.java:122)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMTransform.transform(DOMTransform.java:147)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.transform(DOMReference.java:409)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	... 70 more
> [5/4/11 16:41:04:395 EST] 00000029 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/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:163)
> [5/4/11 16:41:04:396 EST] 00000029 SystemErr     R 	... 73 more
> [5/4/11 16:41:04:396 EST] 00000029 SystemErr     R Caused by: java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData
> [5/4/11 16:41:04:397 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:160)
> [5/4/11 16:41:04:397 EST] 00000029 SystemErr     R 	... 73 more

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org


[jira] [Commented] (WSS-282) STRTransform JCE provider throws java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData in Websphere

Posted by "sureshkumar (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WSS-282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13153055#comment-13153055 ] 

sureshkumar commented on WSS-282:
---------------------------------

I tired using wss4j-1.6.4-SNAPSHOT and xmlsec-1.5.0-SNAPSHOT and i got the below exception 

Server : WAS7.0
JDK 1.6.29

Jars Used
----------------
bcprov-jdk15-1.46.jar
commons-logging-1.1.1.jar
joda-time-1.6.2.jar
jul-to-slf4j-1.6.1.jar
log4j-1.2.16.jar
log4j-over-slf4j-1.6.1.jar
opensaml-2.5.1-1.jar
openws-1.4.2-1.jar
serializer-2.7.1.jar
slf4j-api-1.6.1.jar
slf4j-log4j12-1.6.1.jar
wss4j-1.6.4-SNAPSHOT.jar
xalan-2.7.1.jar
xercesImpl-2.9.1.jar
xml-apis-1.3.04.jar
xmlsec-1.5.0-SNAPSHOT.jar
xmltooling-1.3.2-1.jar


org.apache.ws.security.message.WSSecSignature prepare 
                                 java.lang.ClassCastException: org.apache.jcp.xml.dsig.internal.dom.DOMExcC14NMethod incompatible with javax.xml.crypto.dsig.CanonicalizationMethod
	at com.ibm.xml.crypto.dsig.dom.FactoryImpl.newCanonicalizationMethod(FactoryImpl.java:197)
	at org.apache.ws.security.message.WSSecSignature.prepare(WSSecSignature.java:178)
	at org.apache.ws.security.message.WSSecSignature.build(WSSecSignature.java:362)
	at com.bcbssc.wms.security.handler.WSSecurityHandlerUtil.insertSecurityElement(WSSecurityHandlerUtil.java:110)
	at com.bcbssc.wms.security.handler.WSSecurityHandler.handleMessage(WSSecurityHandler.java:56)
	at com.bcbssc.wms.security.handler.WSSecurityHandler.handleMessage(WSSecurityHandler.java:1)
	at org.apache.axis2.jaxws.handler.HandlerChainProcessor.callHandleMessageWithTracker(HandlerChainProcessor.java:832)
	at org.apache.axis2.jaxws.handler.HandlerChainProcessor.handleMessage(HandlerChainProcessor.java:494)
	at org.apache.axis2.jaxws.handler.HandlerChainProcessor.callGenericHandlers(HandlerChainProcessor.java:256)
	at org.apache.axis2.jaxws.handler.HandlerChainProcessor.processChain(HandlerChainProcessor.java:206)
	at org.apache.axis2.jaxws.handler.HandlerInvokerUtils.invokeOutboundHandlers(HandlerInvokerUtils.java:139)
	at org.apache.axis2.jaxws.core.controller.impl.InvocationControllerImpl.invoke(InvocationControllerImpl.java:81)

                
> STRTransform JCE provider throws  java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData in Websphere
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WSS-282
>                 URL: https://issues.apache.org/jira/browse/WSS-282
>             Project: WSS4J
>          Issue Type: Bug
>          Components: WSS4J Core
>    Affects Versions: 1.6
>         Environment: WebSphere 7.0.0.15
>            Reporter: Jeremy Tadman
>            Assignee: Colm O hEigeartaigh
>         Attachments: wss4j-1.6.4-SNAPSHOT.jar, xmlsec-1.5.0-SNAPSHOT.jar
>
>
> When using WSS4J to generate signed sender-vouches SAML tokens involving an STRTransform I get the below exception (right at the end). It only happens when there are multiple applications using WSS4J or the application is restarted.
> Seems to be related to the fact that the STRTransformProvider is added to WebSphere's JCE provider list using Security.addProvider(provider) but is loaded using the WAR module's classloader. When an app is restarted, this classloader hangs around and causes  issues because org.jcp.xml.dsig.internal.dom.DOMSubTreeData loaded by the new module instance's classloader is not considered an instance of the org.jcp.xml.dsig.internal.dom.DOMSubTreeData class loaded by the STRTransform instance. I tested this by modifying the source code and printing out which classloader had loaded the class. In the case where things work (first startup of the first application to use WSS4J) the classloaders are the same. In cases where things don't work the classloader of the DOMSubTreeData instance passed into the transform is different to the classloader of the DOMSubTreeData class itself. Similar result when trying from one application then another.
> This seems loosely related to https://issues.apache.org/jira/browse/WSS-82 and http://bouncy-castle.1462172.n4.nabble.com/Bug-in-Cipher-class-td1465452.html.
> Seems there are problems running custom JCE providers on WebSphere (and IBM say they don't support custom JCE providers). 
> Adding WSS4j to a higher level classloader causes all kinds of other errors to come up.
> Is there any way we can get this to work or are we WebSphere users out of luck? (Or am I just doing something horrible wrong?). I've already applied the fixes shown in https://issues.apache.org/jira/browse/WSS-273 (I got those errors before I got this one).
> [5/4/11 16:41:04:379 EST] 00000029 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/4/11 16:41:04:379 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.computeSignature(WSSecSignatureSAML.java:529)
> [5/4/11 16:41:04:379 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.build(WSSecSignatureSAML.java:155)
> ... servlet stack trace components ....
> [5/4/11 16:41:04:392 EST] 00000029 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/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.transform(DOMReference.java:412)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.digest(DOMReference.java:304)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMXMLSignature.digestReference(DOMXMLSignature.java:467)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMXMLSignature.sign(DOMXMLSignature.java:361)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.computeSignature(WSSecSignatureSAML.java:524)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	... 66 more
> [5/4/11 16:41:04:394 EST] 00000029 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/4/11 16:41:04:394 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:267)
> [5/4/11 16:41:04:394 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transform(STRTransform.java:122)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMTransform.transform(DOMTransform.java:147)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.transform(DOMReference.java:409)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	... 70 more
> [5/4/11 16:41:04:395 EST] 00000029 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/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:163)
> [5/4/11 16:41:04:396 EST] 00000029 SystemErr     R 	... 73 more
> [5/4/11 16:41:04:396 EST] 00000029 SystemErr     R Caused by: java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData
> [5/4/11 16:41:04:397 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:160)
> [5/4/11 16:41:04:397 EST] 00000029 SystemErr     R 	... 73 more

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org


[jira] [Commented] (WSS-282) STRTransform JCE provider throws java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData in Websphere

Posted by "Colm O hEigeartaigh (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WSS-282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13035252#comment-13035252 ] 

Colm O hEigeartaigh commented on WSS-282:
-----------------------------------------


Note the comment on WSS-273:

https://issues.apache.org/jira/browse/WSS-273?focusedCommentId=13035251&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13035251

Do the fixes applied to the attached jar fix this issue? Or is further work required?

Colm.

> STRTransform JCE provider throws  java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData in Websphere
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WSS-282
>                 URL: https://issues.apache.org/jira/browse/WSS-282
>             Project: WSS4J
>          Issue Type: Bug
>          Components: WSS4J Core
>    Affects Versions: 1.6
>         Environment: WebSphere 7.0.0.15
>            Reporter: Jeremy Tadman
>            Assignee: Colm O hEigeartaigh
>             Fix For: 1.6.1
>
>
> When using WSS4J to generate signed sender-vouches SAML tokens involving an STRTransform I get the below exception (right at the end). It only happens when there are multiple applications using WSS4J or the application is restarted.
> Seems to be related to the fact that the STRTransformProvider is added to WebSphere's JCE provider list using Security.addProvider(provider) but is loaded using the WAR module's classloader. When an app is restarted, this classloader hangs around and causes  issues because org.jcp.xml.dsig.internal.dom.DOMSubTreeData loaded by the new module instance's classloader is not considered an instance of the org.jcp.xml.dsig.internal.dom.DOMSubTreeData class loaded by the STRTransform instance. I tested this by modifying the source code and printing out which classloader had loaded the class. In the case where things work (first startup of the first application to use WSS4J) the classloaders are the same. In cases where things don't work the classloader of the DOMSubTreeData instance passed into the transform is different to the classloader of the DOMSubTreeData class itself. Similar result when trying from one application then another.
> This seems loosely related to https://issues.apache.org/jira/browse/WSS-82 and http://bouncy-castle.1462172.n4.nabble.com/Bug-in-Cipher-class-td1465452.html.
> Seems there are problems running custom JCE providers on WebSphere (and IBM say they don't support custom JCE providers). 
> Adding WSS4j to a higher level classloader causes all kinds of other errors to come up.
> Is there any way we can get this to work or are we WebSphere users out of luck? (Or am I just doing something horrible wrong?). I've already applied the fixes shown in https://issues.apache.org/jira/browse/WSS-273 (I got those errors before I got this one).
> [5/4/11 16:41:04:379 EST] 00000029 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/4/11 16:41:04:379 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.computeSignature(WSSecSignatureSAML.java:529)
> [5/4/11 16:41:04:379 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.build(WSSecSignatureSAML.java:155)
> ... servlet stack trace components ....
> [5/4/11 16:41:04:392 EST] 00000029 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/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.transform(DOMReference.java:412)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.digest(DOMReference.java:304)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMXMLSignature.digestReference(DOMXMLSignature.java:467)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMXMLSignature.sign(DOMXMLSignature.java:361)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.computeSignature(WSSecSignatureSAML.java:524)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	... 66 more
> [5/4/11 16:41:04:394 EST] 00000029 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/4/11 16:41:04:394 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:267)
> [5/4/11 16:41:04:394 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transform(STRTransform.java:122)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMTransform.transform(DOMTransform.java:147)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.transform(DOMReference.java:409)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	... 70 more
> [5/4/11 16:41:04:395 EST] 00000029 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/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:163)
> [5/4/11 16:41:04:396 EST] 00000029 SystemErr     R 	... 73 more
> [5/4/11 16:41:04:396 EST] 00000029 SystemErr     R Caused by: java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData
> [5/4/11 16:41:04:397 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:160)
> [5/4/11 16:41:04:397 EST] 00000029 SystemErr     R 	... 73 more

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org


[jira] [Commented] (WSS-282) STRTransform JCE provider throws java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData in Websphere

Posted by "sureshkumar (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WSS-282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13154233#comment-13154233 ] 

sureshkumar commented on WSS-282:
---------------------------------

Thanks colm.

The problem is after WAS7.0 server starts and application got deployed , it fails in the very first invocation, after that it works perfectly.

I ran with latest jars and got the exception. 

WSSecSignature sec509 = new WSSecSignature();
sec509.setUserInfo(alias_name, keystore_password);
sec509.setKeyIdentifierType(WSConstants.BST_DIRECT_REFERENCE);
sec509.setSignatureAlgorithm("http://www.w3.org/2000/09/xmldsig#rsa-sha1");
sec509.setSigCanonicalization("http://www.w3.org/2001/10/xml-exc-c14n#WithComments");
sec509.setDigestAlgo("http://www.w3.org/2001/04/xmlenc#sha256");


[11/21/11 9:52:17:461 EST] 0000001d WSSecSignatur E org.apache.ws.security.message.WSSecSignature prepare 
   java.lang.ClassCastException: org.apache.jcp.xml.dsig.internal.dom.DOMExcC14NMethod incompatible with javax.xml.crypto.dsig.CanonicalizationMethod
	at com.ibm.xml.crypto.dsig.dom.FactoryImpl.newCanonicalizationMethod(FactoryImpl.java:197)
	at org.apache.ws.security.message.WSSecSignature.prepare(WSSecSignature.java:180)
	at org.apache.ws.security.message.WSSecSignature.build(WSSecSignature.java:372)
	at org.apache.axis2.jaxws.handler.HandlerChainProcessor.callHandleMessageWithTracker(HandlerChainProcessor.java:832)
	at org.apache.axis2.jaxws.handler.HandlerChainProcessor.handleMessage(HandlerChainProcessor.java:494)
	at org.apache.axis2.jaxws.handler.HandlerChainProcessor.callGenericHandlers(HandlerChainProcessor.java:256)
	at org.apache.axis2.jaxws.handler.HandlerChainProcessor.processChain(HandlerChainProcessor.java:206)
	at org.apache.axis2.jaxws.handler.HandlerInvokerUtils.invokeOutboundHandlers(HandlerInvokerUtils.java:139)
	at org.apache.axis2.jaxws.core.controller.impl.InvocationControllerImpl.invoke(InvocationControllerImpl.java:81)
	at org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.invokeSEIMethod(JAXWSProxyHandler.java:364)
	at org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.invoke(JAXWSProxyHandler.java:185)



[11/21/11 9:52:17:477 EST] 0000001d SystemErr     R org.apache.ws.security.WSSecurityException: Signature creation failed (Cannot setup signature data structure)
[11/21/11 9:52:17:477 EST] 0000001d SystemErr     R 	at org.apache.ws.security.message.WSSecSignature.prepare(WSSecSignature.java:191)
[11/21/11 9:52:17:477 EST] 0000001d SystemErr     R 	at org.apache.ws.security.message.WSSecSignature.build(WSSecSignature.java:372)
[11/21/11 9:52:17:477 EST] 0000001d SystemErr     R 	at com.######.wms.security.handler.WSSecurityHandlerUtil.insertSecurityElement(WSSecurityHandlerUtil.java:105)
[11/21/11 9:52:17:477 EST] 0000001d SystemErr     R 	at com.######.wms.security.handler.WSSecurityHandler.handleMessage(WSSecurityHandler.java:56)
[11/21/11 9:52:17:477 EST] 0000001d SystemErr     R 	at com.######.wms.security.handler.WSSecurityHandler.handleMessage(WSSecurityHandler.java:1)
[11/21/11 9:52:17:477 EST] 0000001d SystemErr     R 	at org.apache.axis2.jaxws.handler.HandlerChainProcessor.callHandleMessageWithTracker(HandlerChainProcessor.java:832)
[11/21/11 9:52:17:477 EST] 0000001d SystemErr     R 	at org.apache.axis2.jaxws.handler.HandlerChainProcessor.handleMessage(HandlerChainProcessor.java:494)
[11/21/11 9:52:17:477 EST] 0000001d SystemErr     R 	at org.apache.axis2.jaxws.handler.HandlerChainProcessor.callGenericHandlers(HandlerChainProcessor.java:256)
[11/21/11 9:52:17:477 EST] 0000001d SystemErr     R 	at org.apache.axis2.jaxws.handler.HandlerChainProcessor.processChain(HandlerChainProcessor.java:206)
[11/21/11 9:52:17:477 EST] 0000001d SystemErr     R 	at org.apache.axis2.jaxws.handler.HandlerInvokerUtils.invokeOutboundHandlers(HandlerInvokerUtils.java:139)
[11/21/11 9:52:17:477 EST] 0000001d SystemErr     R 	at org.apache.axis2.jaxws.core.controller.impl.InvocationControllerImpl.invoke(InvocationControllerImpl.java:81)
[11/21/11 9:52:17:477 EST] 0000001d SystemErr     R 	at org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.invokeSEIMethod(JAXWSProxyHandler.java:364)
[11/21/11 9:52:17:477 EST] 0000001d SystemErr     R 	at org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.invoke(JAXWSProxyHandler.java:185)

                
> STRTransform JCE provider throws  java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData in Websphere
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WSS-282
>                 URL: https://issues.apache.org/jira/browse/WSS-282
>             Project: WSS4J
>          Issue Type: Bug
>          Components: WSS4J Core
>    Affects Versions: 1.6
>         Environment: WebSphere 7.0.0.15
>            Reporter: Jeremy Tadman
>            Assignee: Colm O hEigeartaigh
>         Attachments: wss4j-1.6.4-SNAPSHOT.jar, xmlsec-1.5.0-SNAPSHOT.jar
>
>
> When using WSS4J to generate signed sender-vouches SAML tokens involving an STRTransform I get the below exception (right at the end). It only happens when there are multiple applications using WSS4J or the application is restarted.
> Seems to be related to the fact that the STRTransformProvider is added to WebSphere's JCE provider list using Security.addProvider(provider) but is loaded using the WAR module's classloader. When an app is restarted, this classloader hangs around and causes  issues because org.jcp.xml.dsig.internal.dom.DOMSubTreeData loaded by the new module instance's classloader is not considered an instance of the org.jcp.xml.dsig.internal.dom.DOMSubTreeData class loaded by the STRTransform instance. I tested this by modifying the source code and printing out which classloader had loaded the class. In the case where things work (first startup of the first application to use WSS4J) the classloaders are the same. In cases where things don't work the classloader of the DOMSubTreeData instance passed into the transform is different to the classloader of the DOMSubTreeData class itself. Similar result when trying from one application then another.
> This seems loosely related to https://issues.apache.org/jira/browse/WSS-82 and http://bouncy-castle.1462172.n4.nabble.com/Bug-in-Cipher-class-td1465452.html.
> Seems there are problems running custom JCE providers on WebSphere (and IBM say they don't support custom JCE providers). 
> Adding WSS4j to a higher level classloader causes all kinds of other errors to come up.
> Is there any way we can get this to work or are we WebSphere users out of luck? (Or am I just doing something horrible wrong?). I've already applied the fixes shown in https://issues.apache.org/jira/browse/WSS-273 (I got those errors before I got this one).
> [5/4/11 16:41:04:379 EST] 00000029 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/4/11 16:41:04:379 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.computeSignature(WSSecSignatureSAML.java:529)
> [5/4/11 16:41:04:379 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.build(WSSecSignatureSAML.java:155)
> ... servlet stack trace components ....
> [5/4/11 16:41:04:392 EST] 00000029 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/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.transform(DOMReference.java:412)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.digest(DOMReference.java:304)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMXMLSignature.digestReference(DOMXMLSignature.java:467)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMXMLSignature.sign(DOMXMLSignature.java:361)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.computeSignature(WSSecSignatureSAML.java:524)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	... 66 more
> [5/4/11 16:41:04:394 EST] 00000029 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/4/11 16:41:04:394 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:267)
> [5/4/11 16:41:04:394 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transform(STRTransform.java:122)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMTransform.transform(DOMTransform.java:147)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.transform(DOMReference.java:409)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	... 70 more
> [5/4/11 16:41:04:395 EST] 00000029 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/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:163)
> [5/4/11 16:41:04:396 EST] 00000029 SystemErr     R 	... 73 more
> [5/4/11 16:41:04:396 EST] 00000029 SystemErr     R Caused by: java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData
> [5/4/11 16:41:04:397 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:160)
> [5/4/11 16:41:04:397 EST] 00000029 SystemErr     R 	... 73 more

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org


[jira] [Commented] (WSS-282) STRTransform JCE provider throws java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData in Websphere

Posted by "Jeremy Tadman (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WSS-282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042643#comment-13042643 ] 

Jeremy Tadman commented on WSS-282:
-----------------------------------

Sorry I was taken off the project that uses this to troubleshoot some production problems. I will test this at home on the weekend.

> STRTransform JCE provider throws  java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData in Websphere
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WSS-282
>                 URL: https://issues.apache.org/jira/browse/WSS-282
>             Project: WSS4J
>          Issue Type: Bug
>          Components: WSS4J Core
>    Affects Versions: 1.6
>         Environment: WebSphere 7.0.0.15
>            Reporter: Jeremy Tadman
>            Assignee: Colm O hEigeartaigh
>             Fix For: 1.6.1
>
>
> When using WSS4J to generate signed sender-vouches SAML tokens involving an STRTransform I get the below exception (right at the end). It only happens when there are multiple applications using WSS4J or the application is restarted.
> Seems to be related to the fact that the STRTransformProvider is added to WebSphere's JCE provider list using Security.addProvider(provider) but is loaded using the WAR module's classloader. When an app is restarted, this classloader hangs around and causes  issues because org.jcp.xml.dsig.internal.dom.DOMSubTreeData loaded by the new module instance's classloader is not considered an instance of the org.jcp.xml.dsig.internal.dom.DOMSubTreeData class loaded by the STRTransform instance. I tested this by modifying the source code and printing out which classloader had loaded the class. In the case where things work (first startup of the first application to use WSS4J) the classloaders are the same. In cases where things don't work the classloader of the DOMSubTreeData instance passed into the transform is different to the classloader of the DOMSubTreeData class itself. Similar result when trying from one application then another.
> This seems loosely related to https://issues.apache.org/jira/browse/WSS-82 and http://bouncy-castle.1462172.n4.nabble.com/Bug-in-Cipher-class-td1465452.html.
> Seems there are problems running custom JCE providers on WebSphere (and IBM say they don't support custom JCE providers). 
> Adding WSS4j to a higher level classloader causes all kinds of other errors to come up.
> Is there any way we can get this to work or are we WebSphere users out of luck? (Or am I just doing something horrible wrong?). I've already applied the fixes shown in https://issues.apache.org/jira/browse/WSS-273 (I got those errors before I got this one).
> [5/4/11 16:41:04:379 EST] 00000029 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/4/11 16:41:04:379 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.computeSignature(WSSecSignatureSAML.java:529)
> [5/4/11 16:41:04:379 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.build(WSSecSignatureSAML.java:155)
> ... servlet stack trace components ....
> [5/4/11 16:41:04:392 EST] 00000029 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/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.transform(DOMReference.java:412)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.digest(DOMReference.java:304)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMXMLSignature.digestReference(DOMXMLSignature.java:467)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMXMLSignature.sign(DOMXMLSignature.java:361)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.computeSignature(WSSecSignatureSAML.java:524)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	... 66 more
> [5/4/11 16:41:04:394 EST] 00000029 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/4/11 16:41:04:394 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:267)
> [5/4/11 16:41:04:394 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transform(STRTransform.java:122)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMTransform.transform(DOMTransform.java:147)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.transform(DOMReference.java:409)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	... 70 more
> [5/4/11 16:41:04:395 EST] 00000029 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/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:163)
> [5/4/11 16:41:04:396 EST] 00000029 SystemErr     R 	... 73 more
> [5/4/11 16:41:04:396 EST] 00000029 SystemErr     R Caused by: java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData
> [5/4/11 16:41:04:397 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:160)
> [5/4/11 16:41:04:397 EST] 00000029 SystemErr     R 	... 73 more

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org


[jira] [Commented] (WSS-282) STRTransform JCE provider throws java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData in Websphere

Posted by "Colm O hEigeartaigh (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WSS-282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13155012#comment-13155012 ] 

Colm O hEigeartaigh commented on WSS-282:
-----------------------------------------

Hi,

Are you sure you are using the latest SNAPSHOT jars attached to this JIRA? 

Colm.
                
> STRTransform JCE provider throws  java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData in Websphere
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WSS-282
>                 URL: https://issues.apache.org/jira/browse/WSS-282
>             Project: WSS4J
>          Issue Type: Bug
>          Components: WSS4J Core
>    Affects Versions: 1.6
>         Environment: WebSphere 7.0.0.15
>            Reporter: Jeremy Tadman
>            Assignee: Colm O hEigeartaigh
>         Attachments: wss4j-1.6.4-SNAPSHOT.jar, xmlsec-1.5.0-SNAPSHOT.jar
>
>
> When using WSS4J to generate signed sender-vouches SAML tokens involving an STRTransform I get the below exception (right at the end). It only happens when there are multiple applications using WSS4J or the application is restarted.
> Seems to be related to the fact that the STRTransformProvider is added to WebSphere's JCE provider list using Security.addProvider(provider) but is loaded using the WAR module's classloader. When an app is restarted, this classloader hangs around and causes  issues because org.jcp.xml.dsig.internal.dom.DOMSubTreeData loaded by the new module instance's classloader is not considered an instance of the org.jcp.xml.dsig.internal.dom.DOMSubTreeData class loaded by the STRTransform instance. I tested this by modifying the source code and printing out which classloader had loaded the class. In the case where things work (first startup of the first application to use WSS4J) the classloaders are the same. In cases where things don't work the classloader of the DOMSubTreeData instance passed into the transform is different to the classloader of the DOMSubTreeData class itself. Similar result when trying from one application then another.
> This seems loosely related to https://issues.apache.org/jira/browse/WSS-82 and http://bouncy-castle.1462172.n4.nabble.com/Bug-in-Cipher-class-td1465452.html.
> Seems there are problems running custom JCE providers on WebSphere (and IBM say they don't support custom JCE providers). 
> Adding WSS4j to a higher level classloader causes all kinds of other errors to come up.
> Is there any way we can get this to work or are we WebSphere users out of luck? (Or am I just doing something horrible wrong?). I've already applied the fixes shown in https://issues.apache.org/jira/browse/WSS-273 (I got those errors before I got this one).
> [5/4/11 16:41:04:379 EST] 00000029 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/4/11 16:41:04:379 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.computeSignature(WSSecSignatureSAML.java:529)
> [5/4/11 16:41:04:379 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.build(WSSecSignatureSAML.java:155)
> ... servlet stack trace components ....
> [5/4/11 16:41:04:392 EST] 00000029 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/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.transform(DOMReference.java:412)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.digest(DOMReference.java:304)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMXMLSignature.digestReference(DOMXMLSignature.java:467)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMXMLSignature.sign(DOMXMLSignature.java:361)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.computeSignature(WSSecSignatureSAML.java:524)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	... 66 more
> [5/4/11 16:41:04:394 EST] 00000029 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/4/11 16:41:04:394 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:267)
> [5/4/11 16:41:04:394 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transform(STRTransform.java:122)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMTransform.transform(DOMTransform.java:147)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.transform(DOMReference.java:409)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	... 70 more
> [5/4/11 16:41:04:395 EST] 00000029 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/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:163)
> [5/4/11 16:41:04:396 EST] 00000029 SystemErr     R 	... 73 more
> [5/4/11 16:41:04:396 EST] 00000029 SystemErr     R Caused by: java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData
> [5/4/11 16:41:04:397 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:160)
> [5/4/11 16:41:04:397 EST] 00000029 SystemErr     R 	... 73 more

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org


[jira] [Issue Comment Edited] (WSS-282) STRTransform JCE provider throws java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData in Websphere

Posted by "sureshkumar (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WSS-282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13153055#comment-13153055 ] 

sureshkumar edited comment on WSS-282 at 11/18/11 7:35 PM:
-----------------------------------------------------------

I tired using wss4j-1.6.4-SNAPSHOT and xmlsec-1.5.0-SNAPSHOT and i got the below exception 

Server : WAS7.0
JDK 1.6.29

Jars Used
----------------
bcprov-jdk15-1.46.jar
commons-logging-1.1.1.jar
joda-time-1.6.2.jar
jul-to-slf4j-1.6.1.jar
log4j-1.2.16.jar
log4j-over-slf4j-1.6.1.jar
opensaml-2.5.1-1.jar
openws-1.4.2-1.jar
serializer-2.7.1.jar
slf4j-api-1.6.1.jar
slf4j-log4j12-1.6.1.jar
wss4j-1.6.4-SNAPSHOT.jar
xalan-2.7.1.jar
xercesImpl-2.9.1.jar
xml-apis-1.3.04.jar
xmlsec-1.5.0-SNAPSHOT.jar
xmltooling-1.3.2-1.jar


org.apache.ws.security.message.WSSecSignature prepare 
                                 java.lang.ClassCastException: org.apache.jcp.xml.dsig.internal.dom.DOMExcC14NMethod incompatible with javax.xml.crypto.dsig.CanonicalizationMethod
	at com.ibm.xml.crypto.dsig.dom.FactoryImpl.newCanonicalizationMethod(FactoryImpl.java:197)
	at org.apache.ws.security.message.WSSecSignature.prepare(WSSecSignature.java:178)
	at org.apache.ws.security.message.WSSecSignature.build(WSSecSignature.java:362)
	at org.apache.axis2.jaxws.handler.HandlerChainProcessor.callHandleMessageWithTracker(HandlerChainProcessor.java:832)
	at org.apache.axis2.jaxws.handler.HandlerChainProcessor.handleMessage(HandlerChainProcessor.java:494)
	at org.apache.axis2.jaxws.handler.HandlerChainProcessor.callGenericHandlers(HandlerChainProcessor.java:256)
	at org.apache.axis2.jaxws.handler.HandlerChainProcessor.processChain(HandlerChainProcessor.java:206)
	at org.apache.axis2.jaxws.handler.HandlerInvokerUtils.invokeOutboundHandlers(HandlerInvokerUtils.java:139)
	at org.apache.axis2.jaxws.core.controller.impl.InvocationControllerImpl.invoke(InvocationControllerImpl.java:81)


[11/18/11 14:34:32:209 EST] 00000013 SystemErr     R org.apache.ws.security.WSSecurityException: Signature creation failed (Cannot setup signature data structure)
[11/18/11 14:34:32:209 EST] 00000013 SystemErr     R 	at org.apache.ws.security.message.WSSecSignature.prepare(WSSecSignature.java:181)
[11/18/11 14:34:32:209 EST] 00000013 SystemErr     R 	at org.apache.ws.security.message.WSSecSignature.build(WSSecSignature.java:362)
[11/18/11 14:34:32:209 EST] 00000013 SystemErr     R 	at com.bcbssc.wms.security.handler.WSSecurityHandlerUtil.insertSecurityElement(WSSecurityHandlerUtil.java:119)
[11/18/11 14:34:32:209 EST] 00000013 SystemErr     R 	at com.bcbssc.wms.security.handler.WSSecurityHandler.handleMessage(WSSecurityHandler.java:56)
[11/18/11 14:34:32:209 EST] 00000013 SystemErr     R 	at com.bcbssc.wms.security.handler.WSSecurityHandler.handleMessage(WSSecurityHandler.java:1)
[11/18/11 14:34:32:209 EST] 00000013 SystemErr     R 	at org.apache.axis2.jaxws.handler.HandlerChainProcessor.callHandleMessageWithTracker(HandlerChainProcessor.java:832)
[11/18/11 14:34:32:209 EST] 00000013 SystemErr     R 	at org.apache.axis2.jaxws.handler.HandlerChainProcessor.handleMessage(HandlerChainProcessor.java:494)
[11/18/11 14:34:32:209 EST] 00000013 SystemErr     R 	at org.apache.axis2.jaxws.handler.HandlerChainProcessor.callGenericHandlers(HandlerChainProcessor.java:256)
[11/18/11 14:34:32:209 EST] 00000013 SystemErr     R 	at org.apache.axis2.jaxws.handler.HandlerChainProcessor.processChain(HandlerChainProcessor.java:206)
[11/18/11 14:34:32:209 EST] 00000013 SystemErr     R 	at org.apache.axis2.jaxws.handler.HandlerInvokerUtils.invokeOutboundHandlers(HandlerInvokerUtils.java:139)
[11/18/11 14:34:32:209 EST] 00000013 SystemErr     R 	at org.apache.axis2.jaxws.core.controller.impl.InvocationControllerImpl.invoke(InvocationControllerImpl.java:81)
[11/18/11 14:34:32:209 EST] 00000013 SystemErr     R 	at org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.invokeSEIMethod(JAXWSProxyHandler.java:364)
[11/18/11 14:34:32:209 EST] 00000013 SystemErr     R 	at org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.invoke(JAXWSProxyHandler.java:185)
[

                
      was (Author: skrajaram@ymail.com):
    I tired using wss4j-1.6.4-SNAPSHOT and xmlsec-1.5.0-SNAPSHOT and i got the below exception 

Server : WAS7.0
JDK 1.6.29

Jars Used
----------------
bcprov-jdk15-1.46.jar
commons-logging-1.1.1.jar
joda-time-1.6.2.jar
jul-to-slf4j-1.6.1.jar
log4j-1.2.16.jar
log4j-over-slf4j-1.6.1.jar
opensaml-2.5.1-1.jar
openws-1.4.2-1.jar
serializer-2.7.1.jar
slf4j-api-1.6.1.jar
slf4j-log4j12-1.6.1.jar
wss4j-1.6.4-SNAPSHOT.jar
xalan-2.7.1.jar
xercesImpl-2.9.1.jar
xml-apis-1.3.04.jar
xmlsec-1.5.0-SNAPSHOT.jar
xmltooling-1.3.2-1.jar


org.apache.ws.security.message.WSSecSignature prepare 
                                 java.lang.ClassCastException: org.apache.jcp.xml.dsig.internal.dom.DOMExcC14NMethod incompatible with javax.xml.crypto.dsig.CanonicalizationMethod
	at com.ibm.xml.crypto.dsig.dom.FactoryImpl.newCanonicalizationMethod(FactoryImpl.java:197)
	at org.apache.ws.security.message.WSSecSignature.prepare(WSSecSignature.java:178)
	at org.apache.ws.security.message.WSSecSignature.build(WSSecSignature.java:362)
	at com.bcbssc.wms.security.handler.WSSecurityHandlerUtil.insertSecurityElement(WSSecurityHandlerUtil.java:110)
	at com.bcbssc.wms.security.handler.WSSecurityHandler.handleMessage(WSSecurityHandler.java:56)
	at com.bcbssc.wms.security.handler.WSSecurityHandler.handleMessage(WSSecurityHandler.java:1)
	at org.apache.axis2.jaxws.handler.HandlerChainProcessor.callHandleMessageWithTracker(HandlerChainProcessor.java:832)
	at org.apache.axis2.jaxws.handler.HandlerChainProcessor.handleMessage(HandlerChainProcessor.java:494)
	at org.apache.axis2.jaxws.handler.HandlerChainProcessor.callGenericHandlers(HandlerChainProcessor.java:256)
	at org.apache.axis2.jaxws.handler.HandlerChainProcessor.processChain(HandlerChainProcessor.java:206)
	at org.apache.axis2.jaxws.handler.HandlerInvokerUtils.invokeOutboundHandlers(HandlerInvokerUtils.java:139)
	at org.apache.axis2.jaxws.core.controller.impl.InvocationControllerImpl.invoke(InvocationControllerImpl.java:81)

                  
> STRTransform JCE provider throws  java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData in Websphere
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WSS-282
>                 URL: https://issues.apache.org/jira/browse/WSS-282
>             Project: WSS4J
>          Issue Type: Bug
>          Components: WSS4J Core
>    Affects Versions: 1.6
>         Environment: WebSphere 7.0.0.15
>            Reporter: Jeremy Tadman
>            Assignee: Colm O hEigeartaigh
>         Attachments: wss4j-1.6.4-SNAPSHOT.jar, xmlsec-1.5.0-SNAPSHOT.jar
>
>
> When using WSS4J to generate signed sender-vouches SAML tokens involving an STRTransform I get the below exception (right at the end). It only happens when there are multiple applications using WSS4J or the application is restarted.
> Seems to be related to the fact that the STRTransformProvider is added to WebSphere's JCE provider list using Security.addProvider(provider) but is loaded using the WAR module's classloader. When an app is restarted, this classloader hangs around and causes  issues because org.jcp.xml.dsig.internal.dom.DOMSubTreeData loaded by the new module instance's classloader is not considered an instance of the org.jcp.xml.dsig.internal.dom.DOMSubTreeData class loaded by the STRTransform instance. I tested this by modifying the source code and printing out which classloader had loaded the class. In the case where things work (first startup of the first application to use WSS4J) the classloaders are the same. In cases where things don't work the classloader of the DOMSubTreeData instance passed into the transform is different to the classloader of the DOMSubTreeData class itself. Similar result when trying from one application then another.
> This seems loosely related to https://issues.apache.org/jira/browse/WSS-82 and http://bouncy-castle.1462172.n4.nabble.com/Bug-in-Cipher-class-td1465452.html.
> Seems there are problems running custom JCE providers on WebSphere (and IBM say they don't support custom JCE providers). 
> Adding WSS4j to a higher level classloader causes all kinds of other errors to come up.
> Is there any way we can get this to work or are we WebSphere users out of luck? (Or am I just doing something horrible wrong?). I've already applied the fixes shown in https://issues.apache.org/jira/browse/WSS-273 (I got those errors before I got this one).
> [5/4/11 16:41:04:379 EST] 00000029 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/4/11 16:41:04:379 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.computeSignature(WSSecSignatureSAML.java:529)
> [5/4/11 16:41:04:379 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.build(WSSecSignatureSAML.java:155)
> ... servlet stack trace components ....
> [5/4/11 16:41:04:392 EST] 00000029 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/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.transform(DOMReference.java:412)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.digest(DOMReference.java:304)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMXMLSignature.digestReference(DOMXMLSignature.java:467)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMXMLSignature.sign(DOMXMLSignature.java:361)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.computeSignature(WSSecSignatureSAML.java:524)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	... 66 more
> [5/4/11 16:41:04:394 EST] 00000029 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/4/11 16:41:04:394 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:267)
> [5/4/11 16:41:04:394 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transform(STRTransform.java:122)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMTransform.transform(DOMTransform.java:147)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.transform(DOMReference.java:409)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	... 70 more
> [5/4/11 16:41:04:395 EST] 00000029 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/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:163)
> [5/4/11 16:41:04:396 EST] 00000029 SystemErr     R 	... 73 more
> [5/4/11 16:41:04:396 EST] 00000029 SystemErr     R Caused by: java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData
> [5/4/11 16:41:04:397 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:160)
> [5/4/11 16:41:04:397 EST] 00000029 SystemErr     R 	... 73 more

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org


[jira] [Commented] (WSS-282) STRTransform JCE provider throws java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData in Websphere

Posted by "Colm O hEigeartaigh (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WSS-282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13143937#comment-13143937 ] 

Colm O hEigeartaigh commented on WSS-282:
-----------------------------------------


If someone could try again with the attached SNAPSHOT jars (wss4j-1.6.4-SNAPSHOT and xmlsec-1.5.0-SNAPSHOT) that would be great. If it doesn't work then please attach a stacktrace.

Colm.
                
> STRTransform JCE provider throws  java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData in Websphere
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WSS-282
>                 URL: https://issues.apache.org/jira/browse/WSS-282
>             Project: WSS4J
>          Issue Type: Bug
>          Components: WSS4J Core
>    Affects Versions: 1.6
>         Environment: WebSphere 7.0.0.15
>            Reporter: Jeremy Tadman
>            Assignee: Colm O hEigeartaigh
>         Attachments: wss4j-1.6.4-SNAPSHOT.jar, xmlsec-1.5.0-SNAPSHOT.jar
>
>
> When using WSS4J to generate signed sender-vouches SAML tokens involving an STRTransform I get the below exception (right at the end). It only happens when there are multiple applications using WSS4J or the application is restarted.
> Seems to be related to the fact that the STRTransformProvider is added to WebSphere's JCE provider list using Security.addProvider(provider) but is loaded using the WAR module's classloader. When an app is restarted, this classloader hangs around and causes  issues because org.jcp.xml.dsig.internal.dom.DOMSubTreeData loaded by the new module instance's classloader is not considered an instance of the org.jcp.xml.dsig.internal.dom.DOMSubTreeData class loaded by the STRTransform instance. I tested this by modifying the source code and printing out which classloader had loaded the class. In the case where things work (first startup of the first application to use WSS4J) the classloaders are the same. In cases where things don't work the classloader of the DOMSubTreeData instance passed into the transform is different to the classloader of the DOMSubTreeData class itself. Similar result when trying from one application then another.
> This seems loosely related to https://issues.apache.org/jira/browse/WSS-82 and http://bouncy-castle.1462172.n4.nabble.com/Bug-in-Cipher-class-td1465452.html.
> Seems there are problems running custom JCE providers on WebSphere (and IBM say they don't support custom JCE providers). 
> Adding WSS4j to a higher level classloader causes all kinds of other errors to come up.
> Is there any way we can get this to work or are we WebSphere users out of luck? (Or am I just doing something horrible wrong?). I've already applied the fixes shown in https://issues.apache.org/jira/browse/WSS-273 (I got those errors before I got this one).
> [5/4/11 16:41:04:379 EST] 00000029 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/4/11 16:41:04:379 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.computeSignature(WSSecSignatureSAML.java:529)
> [5/4/11 16:41:04:379 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.build(WSSecSignatureSAML.java:155)
> ... servlet stack trace components ....
> [5/4/11 16:41:04:392 EST] 00000029 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/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.transform(DOMReference.java:412)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.digest(DOMReference.java:304)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMXMLSignature.digestReference(DOMXMLSignature.java:467)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMXMLSignature.sign(DOMXMLSignature.java:361)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.computeSignature(WSSecSignatureSAML.java:524)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	... 66 more
> [5/4/11 16:41:04:394 EST] 00000029 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/4/11 16:41:04:394 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:267)
> [5/4/11 16:41:04:394 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transform(STRTransform.java:122)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMTransform.transform(DOMTransform.java:147)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.transform(DOMReference.java:409)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	... 70 more
> [5/4/11 16:41:04:395 EST] 00000029 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/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:163)
> [5/4/11 16:41:04:396 EST] 00000029 SystemErr     R 	... 73 more
> [5/4/11 16:41:04:396 EST] 00000029 SystemErr     R Caused by: java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData
> [5/4/11 16:41:04:397 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:160)
> [5/4/11 16:41:04:397 EST] 00000029 SystemErr     R 	... 73 more

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org


[jira] [Commented] (WSS-282) STRTransform JCE provider throws java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData in Websphere

Posted by "sureshkumar (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WSS-282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13154271#comment-13154271 ] 

sureshkumar commented on WSS-282:
---------------------------------

This is the full stack trace i got 

 WSSecSignatur E org.apache.ws.security.message.WSSecSignature prepare 
                                 java.lang.ClassCastException: org.apache.jcp.xml.dsig.internal.dom.DOMExcC14NMethod incompatible with javax.xml.crypto.dsig.CanonicalizationMethod
	at com.ibm.xml.crypto.dsig.dom.FactoryImpl.newCanonicalizationMethod(FactoryImpl.java:197)
	at org.apache.ws.security.message.WSSecSignature.prepare(WSSecSignature.java:180)
	at org.apache.ws.security.message.WSSecSignature.build(WSSecSignature.java:372)
	at ###.######.wms.security.handler.WSSecurityHandlerUtil.insertSecurityElement(WSSecurityHandlerUtil.java:105)
	at ###.######.wms.security.handler.WSSecurityHandler.handleMessage(WSSecurityHandler.java:56)
	at ###.######.wms.security.handler.WSSecurityHandler.handleMessage(WSSecurityHandler.java:1)
	at org.apache.axis2.jaxws.handler.HandlerChainProcessor.callHandleMessageWithTracker(HandlerChainProcessor.java:832)
	at org.apache.axis2.jaxws.handler.HandlerChainProcessor.handleMessage(HandlerChainProcessor.java:494)
	at org.apache.axis2.jaxws.handler.HandlerChainProcessor.callGenericHandlers(HandlerChainProcessor.java:256)
	at org.apache.axis2.jaxws.handler.HandlerChainProcessor.processChain(HandlerChainProcessor.java:206)
	at org.apache.axis2.jaxws.handler.HandlerInvokerUtils.invokeOutboundHandlers(HandlerInvokerUtils.java:139)
	at org.apache.axis2.jaxws.core.controller.impl.InvocationControllerImpl.invoke(InvocationControllerImpl.java:81)
	at org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.invokeSEIMethod(JAXWSProxyHandler.java:364)
	at org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.invoke(JAXWSProxyHandler.java:185)
	at $Proxy36.######(Unknown Source)
	at ###.######.wms.client.######.######(######.java:46)
	at ###.######.wms.TestServlet.doGet(TestServlet.java:36)
	at ###.######.wms.TestServlet.doPost(TestServlet.java:42)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
	at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1657)
	at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:939)
	at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:502)
	at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:179)
	at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3935)
	at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:276)
	at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:931)
	at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1583)
	at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186)
	at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452)
	at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511)
	at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305)
	at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83)
	at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
	at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
	at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
	at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
	at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
	at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
	at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
	at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1604)

[11/21/11 11:11:04:913 EST] 0000001a SystemErr     R org.apache.ws.security.WSSecurityException: Signature creation failed (Cannot setup signature data structure)
[11/21/11 11:11:04:913 EST] 0000001a SystemErr     R 	at org.apache.ws.security.message.WSSecSignature.prepare(WSSecSignature.java:191)
[11/21/11 11:11:04:913 EST] 0000001a SystemErr     R 	at org.apache.ws.security.message.WSSecSignature.build(WSSecSignature.java:372)
[11/21/11 11:11:04:913 EST] 0000001a SystemErr     R 	at ###.######.wms.security.handler.WSSecurityHandlerUtil.insertSecurityElement(WSSecurityHandlerUtil.java:105)
[11/21/11 11:11:04:913 EST] 0000001a SystemErr     R 	at ###.######.wms.security.handler.WSSecurityHandler.handleMessage(WSSecurityHandler.java:56)
[11/21/11 11:11:04:913 EST] 0000001a SystemErr     R 	at ###.######.wms.security.handler.WSSecurityHandler.handleMessage(WSSecurityHandler.java:1)
[11/21/11 11:11:04:913 EST] 0000001a SystemErr     R 	at org.apache.axis2.jaxws.handler.HandlerChainProcessor.callHandleMessageWithTracker(HandlerChainProcessor.java:832)
[11/21/11 11:11:04:913 EST] 0000001a SystemErr     R 	at org.apache.axis2.jaxws.handler.HandlerChainProcessor.handleMessage(HandlerChainProcessor.java:494)
[11/21/11 11:11:04:913 EST] 0000001a SystemErr     R 	at org.apache.axis2.jaxws.handler.HandlerChainProcessor.callGenericHandlers(HandlerChainProcessor.java:256)
[11/21/11 11:11:04:913 EST] 0000001a SystemErr     R 	at org.apache.axis2.jaxws.handler.HandlerChainProcessor.processChain(HandlerChainProcessor.java:206)
[11/21/11 11:11:04:913 EST] 0000001a SystemErr     R 	at org.apache.axis2.jaxws.handler.HandlerInvokerUtils.invokeOutboundHandlers(HandlerInvokerUtils.java:139)
[11/21/11 11:11:04:913 EST] 0000001a SystemErr     R 	at org.apache.axis2.jaxws.core.controller.impl.InvocationControllerImpl.invoke(InvocationControllerImpl.java:81)
[11/21/11 11:11:04:913 EST] 0000001a SystemErr     R 	at org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.invokeSEIMethod(JAXWSProxyHandler.java:364)
[11/21/11 11:11:04:913 EST] 0000001a SystemErr     R 	at org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.invoke(JAXWSProxyHandler.java:185)
[11/21/11 11:11:04:913 EST] 0000001a SystemErr     R 	at $Proxy36.######(Unknown Source)
[11/21/11 11:11:04:913 EST] 0000001a SystemErr     R 	at ###.######.wms.client.######.######(######.java:46)
[11/21/11 11:11:04:913 EST] 0000001a SystemErr     R 	at ###.######.wms.TestServlet.doGet(TestServlet.java:36)
[11/21/11 11:11:04:913 EST] 0000001a SystemErr     R 	at ###.######.wms.TestServlet.doPost(TestServlet.java:42)
[11/21/11 11:11:04:913 EST] 0000001a SystemErr     R 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
[11/21/11 11:11:04:913 EST] 0000001a SystemErr     R 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
[11/21/11 11:11:04:913 EST] 0000001a SystemErr     R 	at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1657)
[11/21/11 11:11:04:913 EST] 0000001a SystemErr     R 	at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:939)
[11/21/11 11:11:04:913 EST] 0000001a SystemErr     R 	at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:502)
[11/21/11 11:11:04:913 EST] 0000001a SystemErr     R 	at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:179)
[11/21/11 11:11:04:913 EST] 0000001a SystemErr     R 	at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3935)
[11/21/11 11:11:04:913 EST] 0000001a SystemErr     R 	at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:276)
[11/21/11 11:11:04:913 EST] 0000001a SystemErr     R 	at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:931)
[11/21/11 11:11:04:913 EST] 0000001a SystemErr     R 	at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1583)
[11/21/11 11:11:04:913 EST] 0000001a SystemErr     R 	at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186)
[11/21/11 11:11:04:913 EST] 0000001a SystemErr     R 	at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452)
[11/21/11 11:11:04:913 EST] 0000001a SystemErr     R 	at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511)
[11/21/11 11:11:04:913 EST] 0000001a SystemErr     R 	at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305)
[11/21/11 11:11:04:913 EST] 0000001a SystemErr     R 	at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83)
[11/21/11 11:11:04:913 EST] 0000001a SystemErr     R 	at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
[11/21/11 11:11:04:913 EST] 0000001a SystemErr     R 	at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
[11/21/11 11:11:04:913 EST] 0000001a SystemErr     R 	at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
[11/21/11 11:11:04:913 EST] 0000001a SystemErr     R 	at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
[11/21/11 11:11:04:913 EST] 0000001a SystemErr     R 	at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
[11/21/11 11:11:04:913 EST] 0000001a SystemErr     R 	at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
[11/21/11 11:11:04:913 EST] 0000001a SystemErr     R 	at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
[11/21/11 11:11:04:913 EST] 0000001a SystemErr     R 	at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1604)
[11/21/11 11:11:04:913 EST] 0000001a SystemErr     R Caused by: java.lang.ClassCastException: org.apache.jcp.xml.dsig.internal.dom.DOMExcC14NMethod incompatible with javax.xml.crypto.dsig.CanonicalizationMethod
[11/21/11 11:11:04:913 EST] 0000001a SystemErr     R 	at com.ibm.xml.crypto.dsig.dom.FactoryImpl.newCanonicalizationMethod(FactoryImpl.java:197)
[11/21/11 11:11:04:913 EST] 0000001a SystemErr     R 	at org.apache.ws.security.message.WSSecSignature.prepare(WSSecSignature.java:180)
[11/21/11 11:11:04:913 EST] 0000001a SystemErr     R 	... 39 more
[11/21/11 11:11:04:945 EST] 0000001a SystemErr     R javax.xml.ws.WebServiceException: org.apache.axis2.jaxws.wrapper.impl.JAXBWrapperException: An internal assertion error occurred. The ###.######.wms.retrieval.ig.###### JAXB object does not have a ######Return xml property.
[11/21/11 11:11:04:945 EST] 0000001a SystemErr     R 	at org.apache.axis2.jaxws.ExceptionFactory.createWebServiceException(ExceptionFactory.java:175)
[11/21/11 11:11:04:945 EST] 0000001a SystemErr     R 	at org.apache.axis2.jaxws.ExceptionFactory.makeWebServiceException(ExceptionFactory.java:70)
[11/21/11 11:11:04:945 EST] 0000001a SystemErr     R 	at org.apache.axis2.jaxws.ExceptionFactory.makeWebServiceException(ExceptionFactory.java:128)
[11/21/11 11:11:04:945 EST] 0000001a SystemErr     R 	at org.apache.axis2.jaxws.marshaller.impl.alt.DocLitWrappedMethodMarshaller.demarshalResponse(DocLitWrappedMethodMarshaller.java:203)
[11/21/11 11:11:04:945 EST] 0000001a SystemErr     R 	at org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.createResponse(JAXWSProxyHandler.java:496)
[11/21/11 11:11:04:945 EST] 0000001a SystemErr     R 	at org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.invokeSEIMethod(JAXWSProxyHandler.java:377)
[11/21/11 11:11:04:945 EST] 0000001a SystemErr     R 	at org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.invoke(JAXWSProxyHandler.java:185)
[11/21/11 11:11:04:945 EST] 0000001a SystemErr     R 	at $Proxy36.######(Unknown Source)
[11/21/11 11:11:04:945 EST] 0000001a SystemErr     R 	at ###.######.wms.client.######.######(######.java:46)
[11/21/11 11:11:04:945 EST] 0000001a SystemErr     R 	at ###.######.wms.TestServlet.doGet(TestServlet.java:36)
[11/21/11 11:11:04:945 EST] 0000001a SystemErr     R 	at ###.######.wms.TestServlet.doPost(TestServlet.java:42)
[11/21/11 11:11:04:945 EST] 0000001a SystemErr     R 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
[11/21/11 11:11:04:945 EST] 0000001a SystemErr     R 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
[11/21/11 11:11:04:945 EST] 0000001a SystemErr     R 	at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1657)
[11/21/11 11:11:04:945 EST] 0000001a SystemErr     R 	at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:939)
[11/21/11 11:11:04:945 EST] 0000001a SystemErr     R 	at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:502)
[11/21/11 11:11:04:945 EST] 0000001a SystemErr     R 	at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:179)
[11/21/11 11:11:04:945 EST] 0000001a SystemErr     R 	at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3935)
[11/21/11 11:11:04:945 EST] 0000001a SystemErr     R 	at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:276)
[11/21/11 11:11:04:945 EST] 0000001a SystemErr     R 	at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:931)
[11/21/11 11:11:04:945 EST] 0000001a SystemErr     R 	at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1583)
[11/21/11 11:11:04:945 EST] 0000001a SystemErr     R 	at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186)
[11/21/11 11:11:04:945 EST] 0000001a SystemErr     R 	at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452)
[11/21/11 11:11:04:945 EST] 0000001a SystemErr     R 	at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511)
[11/21/11 11:11:04:945 EST] 0000001a SystemErr     R 	at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305)
[11/21/11 11:11:04:945 EST] 0000001a SystemErr     R 	at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83)
[11/21/11 11:11:04:945 EST] 0000001a SystemErr     R 	at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
[11/21/11 11:11:04:945 EST] 0000001a SystemErr     R 	at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
[11/21/11 11:11:04:945 EST] 0000001a SystemErr     R 	at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
[11/21/11 11:11:04:945 EST] 0000001a SystemErr     R 	at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
[11/21/11 11:11:04:945 EST] 0000001a SystemErr     R 	at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
[11/21/11 11:11:04:945 EST] 0000001a SystemErr     R 	at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
[11/21/11 11:11:04:945 EST] 0000001a SystemErr     R 	at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
[11/21/11 11:11:04:945 EST] 0000001a SystemErr     R 	at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1604)
[11/21/11 11:11:04:945 EST] 0000001a SystemErr     R Caused by: org.apache.axis2.jaxws.wrapper.impl.JAXBWrapperException: An internal assertion error occurred. The ###.######.wms.retrieval.ig.###### JAXB object does not have a ######Return xml property.
[11/21/11 11:11:04:945 EST] 0000001a SystemErr     R 	at org.apache.axis2.jaxws.wrapper.impl.JAXBWrapperToolImpl.unWrap(JAXBWrapperToolImpl.java:84)
[11/21/11 11:11:04:945 EST] 0000001a SystemErr     R 	at org.apache.axis2.jaxws.marshaller.impl.alt.DocLitWrappedMethodMarshaller.demarshalResponse(DocLitWrappedMethodMarshaller.java:156)
[11/21/11 11:11:04:945 EST] 0000001a SystemErr     R 	... 30 more



                
> STRTransform JCE provider throws  java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData in Websphere
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WSS-282
>                 URL: https://issues.apache.org/jira/browse/WSS-282
>             Project: WSS4J
>          Issue Type: Bug
>          Components: WSS4J Core
>    Affects Versions: 1.6
>         Environment: WebSphere 7.0.0.15
>            Reporter: Jeremy Tadman
>            Assignee: Colm O hEigeartaigh
>         Attachments: wss4j-1.6.4-SNAPSHOT.jar, xmlsec-1.5.0-SNAPSHOT.jar
>
>
> When using WSS4J to generate signed sender-vouches SAML tokens involving an STRTransform I get the below exception (right at the end). It only happens when there are multiple applications using WSS4J or the application is restarted.
> Seems to be related to the fact that the STRTransformProvider is added to WebSphere's JCE provider list using Security.addProvider(provider) but is loaded using the WAR module's classloader. When an app is restarted, this classloader hangs around and causes  issues because org.jcp.xml.dsig.internal.dom.DOMSubTreeData loaded by the new module instance's classloader is not considered an instance of the org.jcp.xml.dsig.internal.dom.DOMSubTreeData class loaded by the STRTransform instance. I tested this by modifying the source code and printing out which classloader had loaded the class. In the case where things work (first startup of the first application to use WSS4J) the classloaders are the same. In cases where things don't work the classloader of the DOMSubTreeData instance passed into the transform is different to the classloader of the DOMSubTreeData class itself. Similar result when trying from one application then another.
> This seems loosely related to https://issues.apache.org/jira/browse/WSS-82 and http://bouncy-castle.1462172.n4.nabble.com/Bug-in-Cipher-class-td1465452.html.
> Seems there are problems running custom JCE providers on WebSphere (and IBM say they don't support custom JCE providers). 
> Adding WSS4j to a higher level classloader causes all kinds of other errors to come up.
> Is there any way we can get this to work or are we WebSphere users out of luck? (Or am I just doing something horrible wrong?). I've already applied the fixes shown in https://issues.apache.org/jira/browse/WSS-273 (I got those errors before I got this one).
> [5/4/11 16:41:04:379 EST] 00000029 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/4/11 16:41:04:379 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.computeSignature(WSSecSignatureSAML.java:529)
> [5/4/11 16:41:04:379 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.build(WSSecSignatureSAML.java:155)
> ... servlet stack trace components ....
> [5/4/11 16:41:04:392 EST] 00000029 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/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.transform(DOMReference.java:412)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.digest(DOMReference.java:304)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMXMLSignature.digestReference(DOMXMLSignature.java:467)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMXMLSignature.sign(DOMXMLSignature.java:361)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.computeSignature(WSSecSignatureSAML.java:524)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	... 66 more
> [5/4/11 16:41:04:394 EST] 00000029 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/4/11 16:41:04:394 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:267)
> [5/4/11 16:41:04:394 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transform(STRTransform.java:122)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMTransform.transform(DOMTransform.java:147)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.transform(DOMReference.java:409)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	... 70 more
> [5/4/11 16:41:04:395 EST] 00000029 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/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:163)
> [5/4/11 16:41:04:396 EST] 00000029 SystemErr     R 	... 73 more
> [5/4/11 16:41:04:396 EST] 00000029 SystemErr     R Caused by: java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData
> [5/4/11 16:41:04:397 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:160)
> [5/4/11 16:41:04:397 EST] 00000029 SystemErr     R 	... 73 more

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org


[jira] [Commented] (WSS-282) STRTransform JCE provider throws java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData in Websphere

Posted by "Colm O hEigeartaigh (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WSS-282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13071150#comment-13071150 ] 

Colm O hEigeartaigh commented on WSS-282:
-----------------------------------------


Hi Jeremy,

I recently made some changes to the STRTransform to fix WSS-301, that *might* have fixed this problem. Could you check with the jar that is attached here?

https://issues.apache.org/jira/secure/attachment/12487842/wss4j-1.6.2-SNAPSHOT.jar

Thanks,

Colm.

> STRTransform JCE provider throws  java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData in Websphere
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WSS-282
>                 URL: https://issues.apache.org/jira/browse/WSS-282
>             Project: WSS4J
>          Issue Type: Bug
>          Components: WSS4J Core
>    Affects Versions: 1.6
>         Environment: WebSphere 7.0.0.15
>            Reporter: Jeremy Tadman
>            Assignee: Colm O hEigeartaigh
>
> When using WSS4J to generate signed sender-vouches SAML tokens involving an STRTransform I get the below exception (right at the end). It only happens when there are multiple applications using WSS4J or the application is restarted.
> Seems to be related to the fact that the STRTransformProvider is added to WebSphere's JCE provider list using Security.addProvider(provider) but is loaded using the WAR module's classloader. When an app is restarted, this classloader hangs around and causes  issues because org.jcp.xml.dsig.internal.dom.DOMSubTreeData loaded by the new module instance's classloader is not considered an instance of the org.jcp.xml.dsig.internal.dom.DOMSubTreeData class loaded by the STRTransform instance. I tested this by modifying the source code and printing out which classloader had loaded the class. In the case where things work (first startup of the first application to use WSS4J) the classloaders are the same. In cases where things don't work the classloader of the DOMSubTreeData instance passed into the transform is different to the classloader of the DOMSubTreeData class itself. Similar result when trying from one application then another.
> This seems loosely related to https://issues.apache.org/jira/browse/WSS-82 and http://bouncy-castle.1462172.n4.nabble.com/Bug-in-Cipher-class-td1465452.html.
> Seems there are problems running custom JCE providers on WebSphere (and IBM say they don't support custom JCE providers). 
> Adding WSS4j to a higher level classloader causes all kinds of other errors to come up.
> Is there any way we can get this to work or are we WebSphere users out of luck? (Or am I just doing something horrible wrong?). I've already applied the fixes shown in https://issues.apache.org/jira/browse/WSS-273 (I got those errors before I got this one).
> [5/4/11 16:41:04:379 EST] 00000029 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/4/11 16:41:04:379 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.computeSignature(WSSecSignatureSAML.java:529)
> [5/4/11 16:41:04:379 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.build(WSSecSignatureSAML.java:155)
> ... servlet stack trace components ....
> [5/4/11 16:41:04:392 EST] 00000029 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/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.transform(DOMReference.java:412)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.digest(DOMReference.java:304)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMXMLSignature.digestReference(DOMXMLSignature.java:467)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMXMLSignature.sign(DOMXMLSignature.java:361)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.computeSignature(WSSecSignatureSAML.java:524)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	... 66 more
> [5/4/11 16:41:04:394 EST] 00000029 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/4/11 16:41:04:394 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:267)
> [5/4/11 16:41:04:394 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transform(STRTransform.java:122)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMTransform.transform(DOMTransform.java:147)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.transform(DOMReference.java:409)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	... 70 more
> [5/4/11 16:41:04:395 EST] 00000029 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/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:163)
> [5/4/11 16:41:04:396 EST] 00000029 SystemErr     R 	... 73 more
> [5/4/11 16:41:04:396 EST] 00000029 SystemErr     R Caused by: java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData
> [5/4/11 16:41:04:397 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:160)
> [5/4/11 16:41:04:397 EST] 00000029 SystemErr     R 	... 73 more

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org


[jira] [Updated] (WSS-282) STRTransform JCE provider throws java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData in Websphere

Posted by "Colm O hEigeartaigh (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WSS-282?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Colm O hEigeartaigh updated WSS-282:
------------------------------------

    Fix Version/s: 1.6.1

> STRTransform JCE provider throws  java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData in Websphere
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WSS-282
>                 URL: https://issues.apache.org/jira/browse/WSS-282
>             Project: WSS4J
>          Issue Type: Bug
>          Components: WSS4J Core
>    Affects Versions: 1.6
>         Environment: WebSphere 7.0.0.15
>            Reporter: Jeremy Tadman
>            Assignee: Colm O hEigeartaigh
>             Fix For: 1.6.1
>
>
> When using WSS4J to generate signed sender-vouches SAML tokens involving an STRTransform I get the below exception (right at the end). It only happens when there are multiple applications using WSS4J or the application is restarted.
> Seems to be related to the fact that the STRTransformProvider is added to WebSphere's JCE provider list using Security.addProvider(provider) but is loaded using the WAR module's classloader. When an app is restarted, this classloader hangs around and causes  issues because org.jcp.xml.dsig.internal.dom.DOMSubTreeData loaded by the new module instance's classloader is not considered an instance of the org.jcp.xml.dsig.internal.dom.DOMSubTreeData class loaded by the STRTransform instance. I tested this by modifying the source code and printing out which classloader had loaded the class. In the case where things work (first startup of the first application to use WSS4J) the classloaders are the same. In cases where things don't work the classloader of the DOMSubTreeData instance passed into the transform is different to the classloader of the DOMSubTreeData class itself. Similar result when trying from one application then another.
> This seems loosely related to https://issues.apache.org/jira/browse/WSS-82 and http://bouncy-castle.1462172.n4.nabble.com/Bug-in-Cipher-class-td1465452.html.
> Seems there are problems running custom JCE providers on WebSphere (and IBM say they don't support custom JCE providers). 
> Adding WSS4j to a higher level classloader causes all kinds of other errors to come up.
> Is there any way we can get this to work or are we WebSphere users out of luck? (Or am I just doing something horrible wrong?). I've already applied the fixes shown in https://issues.apache.org/jira/browse/WSS-273 (I got those errors before I got this one).
> [5/4/11 16:41:04:379 EST] 00000029 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/4/11 16:41:04:379 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.computeSignature(WSSecSignatureSAML.java:529)
> [5/4/11 16:41:04:379 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.build(WSSecSignatureSAML.java:155)
> ... servlet stack trace components ....
> [5/4/11 16:41:04:392 EST] 00000029 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/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.transform(DOMReference.java:412)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.digest(DOMReference.java:304)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMXMLSignature.digestReference(DOMXMLSignature.java:467)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMXMLSignature.sign(DOMXMLSignature.java:361)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.computeSignature(WSSecSignatureSAML.java:524)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	... 66 more
> [5/4/11 16:41:04:394 EST] 00000029 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/4/11 16:41:04:394 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:267)
> [5/4/11 16:41:04:394 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transform(STRTransform.java:122)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMTransform.transform(DOMTransform.java:147)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.transform(DOMReference.java:409)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	... 70 more
> [5/4/11 16:41:04:395 EST] 00000029 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/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:163)
> [5/4/11 16:41:04:396 EST] 00000029 SystemErr     R 	... 73 more
> [5/4/11 16:41:04:396 EST] 00000029 SystemErr     R Caused by: java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData
> [5/4/11 16:41:04:397 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:160)
> [5/4/11 16:41:04:397 EST] 00000029 SystemErr     R 	... 73 more

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org


[jira] [Commented] (WSS-282) STRTransform JCE provider throws java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData in Websphere

Posted by "John Lazos (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WSS-282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13129750#comment-13129750 ] 

John Lazos commented on WSS-282:
--------------------------------

I suspect I may be having a similar class loader issue with Tomcat https://issues.apache.org/jira/browse/WSS-320
                
> STRTransform JCE provider throws  java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData in Websphere
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WSS-282
>                 URL: https://issues.apache.org/jira/browse/WSS-282
>             Project: WSS4J
>          Issue Type: Bug
>          Components: WSS4J Core
>    Affects Versions: 1.6
>         Environment: WebSphere 7.0.0.15
>            Reporter: Jeremy Tadman
>            Assignee: Colm O hEigeartaigh
>
> When using WSS4J to generate signed sender-vouches SAML tokens involving an STRTransform I get the below exception (right at the end). It only happens when there are multiple applications using WSS4J or the application is restarted.
> Seems to be related to the fact that the STRTransformProvider is added to WebSphere's JCE provider list using Security.addProvider(provider) but is loaded using the WAR module's classloader. When an app is restarted, this classloader hangs around and causes  issues because org.jcp.xml.dsig.internal.dom.DOMSubTreeData loaded by the new module instance's classloader is not considered an instance of the org.jcp.xml.dsig.internal.dom.DOMSubTreeData class loaded by the STRTransform instance. I tested this by modifying the source code and printing out which classloader had loaded the class. In the case where things work (first startup of the first application to use WSS4J) the classloaders are the same. In cases where things don't work the classloader of the DOMSubTreeData instance passed into the transform is different to the classloader of the DOMSubTreeData class itself. Similar result when trying from one application then another.
> This seems loosely related to https://issues.apache.org/jira/browse/WSS-82 and http://bouncy-castle.1462172.n4.nabble.com/Bug-in-Cipher-class-td1465452.html.
> Seems there are problems running custom JCE providers on WebSphere (and IBM say they don't support custom JCE providers). 
> Adding WSS4j to a higher level classloader causes all kinds of other errors to come up.
> Is there any way we can get this to work or are we WebSphere users out of luck? (Or am I just doing something horrible wrong?). I've already applied the fixes shown in https://issues.apache.org/jira/browse/WSS-273 (I got those errors before I got this one).
> [5/4/11 16:41:04:379 EST] 00000029 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/4/11 16:41:04:379 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.computeSignature(WSSecSignatureSAML.java:529)
> [5/4/11 16:41:04:379 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.build(WSSecSignatureSAML.java:155)
> ... servlet stack trace components ....
> [5/4/11 16:41:04:392 EST] 00000029 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/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.transform(DOMReference.java:412)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.digest(DOMReference.java:304)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMXMLSignature.digestReference(DOMXMLSignature.java:467)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMXMLSignature.sign(DOMXMLSignature.java:361)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.computeSignature(WSSecSignatureSAML.java:524)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	... 66 more
> [5/4/11 16:41:04:394 EST] 00000029 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/4/11 16:41:04:394 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:267)
> [5/4/11 16:41:04:394 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transform(STRTransform.java:122)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMTransform.transform(DOMTransform.java:147)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.transform(DOMReference.java:409)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	... 70 more
> [5/4/11 16:41:04:395 EST] 00000029 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/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:163)
> [5/4/11 16:41:04:396 EST] 00000029 SystemErr     R 	... 73 more
> [5/4/11 16:41:04:396 EST] 00000029 SystemErr     R Caused by: java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData
> [5/4/11 16:41:04:397 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:160)
> [5/4/11 16:41:04:397 EST] 00000029 SystemErr     R 	... 73 more

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org


[jira] [Commented] (WSS-282) STRTransform JCE provider throws java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData in Websphere

Posted by "Colm O hEigeartaigh (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WSS-282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13154244#comment-13154244 ] 

Colm O hEigeartaigh commented on WSS-282:
-----------------------------------------


Are there some debug statement in the log detailing the security providers that are installed? I added them where the exception is being caught in WSSecSignature.

Colm.
                
> STRTransform JCE provider throws  java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData in Websphere
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WSS-282
>                 URL: https://issues.apache.org/jira/browse/WSS-282
>             Project: WSS4J
>          Issue Type: Bug
>          Components: WSS4J Core
>    Affects Versions: 1.6
>         Environment: WebSphere 7.0.0.15
>            Reporter: Jeremy Tadman
>            Assignee: Colm O hEigeartaigh
>         Attachments: wss4j-1.6.4-SNAPSHOT.jar, xmlsec-1.5.0-SNAPSHOT.jar
>
>
> When using WSS4J to generate signed sender-vouches SAML tokens involving an STRTransform I get the below exception (right at the end). It only happens when there are multiple applications using WSS4J or the application is restarted.
> Seems to be related to the fact that the STRTransformProvider is added to WebSphere's JCE provider list using Security.addProvider(provider) but is loaded using the WAR module's classloader. When an app is restarted, this classloader hangs around and causes  issues because org.jcp.xml.dsig.internal.dom.DOMSubTreeData loaded by the new module instance's classloader is not considered an instance of the org.jcp.xml.dsig.internal.dom.DOMSubTreeData class loaded by the STRTransform instance. I tested this by modifying the source code and printing out which classloader had loaded the class. In the case where things work (first startup of the first application to use WSS4J) the classloaders are the same. In cases where things don't work the classloader of the DOMSubTreeData instance passed into the transform is different to the classloader of the DOMSubTreeData class itself. Similar result when trying from one application then another.
> This seems loosely related to https://issues.apache.org/jira/browse/WSS-82 and http://bouncy-castle.1462172.n4.nabble.com/Bug-in-Cipher-class-td1465452.html.
> Seems there are problems running custom JCE providers on WebSphere (and IBM say they don't support custom JCE providers). 
> Adding WSS4j to a higher level classloader causes all kinds of other errors to come up.
> Is there any way we can get this to work or are we WebSphere users out of luck? (Or am I just doing something horrible wrong?). I've already applied the fixes shown in https://issues.apache.org/jira/browse/WSS-273 (I got those errors before I got this one).
> [5/4/11 16:41:04:379 EST] 00000029 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/4/11 16:41:04:379 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.computeSignature(WSSecSignatureSAML.java:529)
> [5/4/11 16:41:04:379 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.build(WSSecSignatureSAML.java:155)
> ... servlet stack trace components ....
> [5/4/11 16:41:04:392 EST] 00000029 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/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.transform(DOMReference.java:412)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.digest(DOMReference.java:304)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMXMLSignature.digestReference(DOMXMLSignature.java:467)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMXMLSignature.sign(DOMXMLSignature.java:361)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.computeSignature(WSSecSignatureSAML.java:524)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	... 66 more
> [5/4/11 16:41:04:394 EST] 00000029 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/4/11 16:41:04:394 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:267)
> [5/4/11 16:41:04:394 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transform(STRTransform.java:122)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMTransform.transform(DOMTransform.java:147)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.transform(DOMReference.java:409)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	... 70 more
> [5/4/11 16:41:04:395 EST] 00000029 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/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:163)
> [5/4/11 16:41:04:396 EST] 00000029 SystemErr     R 	... 73 more
> [5/4/11 16:41:04:396 EST] 00000029 SystemErr     R Caused by: java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData
> [5/4/11 16:41:04:397 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:160)
> [5/4/11 16:41:04:397 EST] 00000029 SystemErr     R 	... 73 more

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org


[jira] [Commented] (WSS-282) STRTransform JCE provider throws java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData in Websphere

Posted by "Jeremy Tadman (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WSS-282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13076113#comment-13076113 ] 

Jeremy Tadman commented on WSS-282:
-----------------------------------

I still get a similar class cast exception, but they are different classes now. 

[02/08/11 19:38:09:273 EST] 00000025 SystemErr     R org.apache.ws.security.WSSecurityException: Signature creation failed; nested exception is: 
	javax.xml.crypto.dsig.XMLSignatureException: javax.xml.crypto.dsig.TransformException: java.lang.ClassCastException: org.apache.ws.security.WSDocInfo incompatible with org.apache.ws.security.WSDocInfo
[02/08/11 19:38:09:274 EST] 00000025 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.computeSignature(WSSecSignatureSAML.java:534)
[02/08/11 19:38:09:274 EST] 00000025 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.build(WSSecSignatureSAML.java:153)
...spring webflow stuff...
[02/08/11 19:38:09:282 EST] 00000025 SystemErr     R Caused by: javax.xml.crypto.dsig.XMLSignatureException: javax.xml.crypto.dsig.TransformException: java.lang.ClassCastException: org.apache.ws.security.WSDocInfo incompatible with org.apache.ws.security.WSDocInfo
[02/08/11 19:38:09:282 EST] 00000025 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.transform(Unknown Source)
[02/08/11 19:38:09:282 EST] 00000025 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.digest(Unknown Source)
[02/08/11 19:38:09:282 EST] 00000025 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMXMLSignature.digestReference(Unknown Source)
[02/08/11 19:38:09:282 EST] 00000025 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMXMLSignature.sign(Unknown Source)
[02/08/11 19:38:09:282 EST] 00000025 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.computeSignature(WSSecSignatureSAML.java:529)
[02/08/11 19:38:09:283 EST] 00000025 SystemErr     R 	... 71 more
[02/08/11 19:38:09:283 EST] 00000025 SystemErr     R Caused by: javax.xml.crypto.dsig.TransformException: java.lang.ClassCastException: org.apache.ws.security.WSDocInfo incompatible with org.apache.ws.security.WSDocInfo
[02/08/11 19:38:09:283 EST] 00000025 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:264)
[02/08/11 19:38:09:283 EST] 00000025 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transform(STRTransform.java:121)
[02/08/11 19:38:09:283 EST] 00000025 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMTransform.transform(Unknown Source)
[02/08/11 19:38:09:283 EST] 00000025 SystemErr     R 	... 76 more
[02/08/11 19:38:09:283 EST] 00000025 SystemErr     R Caused by: java.lang.ClassCastException: org.apache.ws.security.WSDocInfo incompatible with org.apache.ws.security.WSDocInfo
[02/08/11 19:38:09:284 EST] 00000025 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:184)
[02/08/11 19:38:09:284 EST] 00000025 SystemErr     R 	... 78 more

> STRTransform JCE provider throws  java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData in Websphere
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WSS-282
>                 URL: https://issues.apache.org/jira/browse/WSS-282
>             Project: WSS4J
>          Issue Type: Bug
>          Components: WSS4J Core
>    Affects Versions: 1.6
>         Environment: WebSphere 7.0.0.15
>            Reporter: Jeremy Tadman
>            Assignee: Colm O hEigeartaigh
>
> When using WSS4J to generate signed sender-vouches SAML tokens involving an STRTransform I get the below exception (right at the end). It only happens when there are multiple applications using WSS4J or the application is restarted.
> Seems to be related to the fact that the STRTransformProvider is added to WebSphere's JCE provider list using Security.addProvider(provider) but is loaded using the WAR module's classloader. When an app is restarted, this classloader hangs around and causes  issues because org.jcp.xml.dsig.internal.dom.DOMSubTreeData loaded by the new module instance's classloader is not considered an instance of the org.jcp.xml.dsig.internal.dom.DOMSubTreeData class loaded by the STRTransform instance. I tested this by modifying the source code and printing out which classloader had loaded the class. In the case where things work (first startup of the first application to use WSS4J) the classloaders are the same. In cases where things don't work the classloader of the DOMSubTreeData instance passed into the transform is different to the classloader of the DOMSubTreeData class itself. Similar result when trying from one application then another.
> This seems loosely related to https://issues.apache.org/jira/browse/WSS-82 and http://bouncy-castle.1462172.n4.nabble.com/Bug-in-Cipher-class-td1465452.html.
> Seems there are problems running custom JCE providers on WebSphere (and IBM say they don't support custom JCE providers). 
> Adding WSS4j to a higher level classloader causes all kinds of other errors to come up.
> Is there any way we can get this to work or are we WebSphere users out of luck? (Or am I just doing something horrible wrong?). I've already applied the fixes shown in https://issues.apache.org/jira/browse/WSS-273 (I got those errors before I got this one).
> [5/4/11 16:41:04:379 EST] 00000029 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/4/11 16:41:04:379 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.computeSignature(WSSecSignatureSAML.java:529)
> [5/4/11 16:41:04:379 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.build(WSSecSignatureSAML.java:155)
> ... servlet stack trace components ....
> [5/4/11 16:41:04:392 EST] 00000029 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/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.transform(DOMReference.java:412)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.digest(DOMReference.java:304)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMXMLSignature.digestReference(DOMXMLSignature.java:467)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMXMLSignature.sign(DOMXMLSignature.java:361)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.computeSignature(WSSecSignatureSAML.java:524)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	... 66 more
> [5/4/11 16:41:04:394 EST] 00000029 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/4/11 16:41:04:394 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:267)
> [5/4/11 16:41:04:394 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transform(STRTransform.java:122)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMTransform.transform(DOMTransform.java:147)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.transform(DOMReference.java:409)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	... 70 more
> [5/4/11 16:41:04:395 EST] 00000029 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/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:163)
> [5/4/11 16:41:04:396 EST] 00000029 SystemErr     R 	... 73 more
> [5/4/11 16:41:04:396 EST] 00000029 SystemErr     R Caused by: java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData
> [5/4/11 16:41:04:397 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:160)
> [5/4/11 16:41:04:397 EST] 00000029 SystemErr     R 	... 73 more

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org


[jira] [Updated] (WSS-282) STRTransform JCE provider throws java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData in Websphere

Posted by "Colm O hEigeartaigh (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WSS-282?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Colm O hEigeartaigh updated WSS-282:
------------------------------------

    Attachment: wss4j-1.6.4-SNAPSHOT.jar
                xmlsec-1.5.0-SNAPSHOT.jar
    
> STRTransform JCE provider throws  java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData in Websphere
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WSS-282
>                 URL: https://issues.apache.org/jira/browse/WSS-282
>             Project: WSS4J
>          Issue Type: Bug
>          Components: WSS4J Core
>    Affects Versions: 1.6
>         Environment: WebSphere 7.0.0.15
>            Reporter: Jeremy Tadman
>            Assignee: Colm O hEigeartaigh
>         Attachments: wss4j-1.6.4-SNAPSHOT.jar, xmlsec-1.5.0-SNAPSHOT.jar
>
>
> When using WSS4J to generate signed sender-vouches SAML tokens involving an STRTransform I get the below exception (right at the end). It only happens when there are multiple applications using WSS4J or the application is restarted.
> Seems to be related to the fact that the STRTransformProvider is added to WebSphere's JCE provider list using Security.addProvider(provider) but is loaded using the WAR module's classloader. When an app is restarted, this classloader hangs around and causes  issues because org.jcp.xml.dsig.internal.dom.DOMSubTreeData loaded by the new module instance's classloader is not considered an instance of the org.jcp.xml.dsig.internal.dom.DOMSubTreeData class loaded by the STRTransform instance. I tested this by modifying the source code and printing out which classloader had loaded the class. In the case where things work (first startup of the first application to use WSS4J) the classloaders are the same. In cases where things don't work the classloader of the DOMSubTreeData instance passed into the transform is different to the classloader of the DOMSubTreeData class itself. Similar result when trying from one application then another.
> This seems loosely related to https://issues.apache.org/jira/browse/WSS-82 and http://bouncy-castle.1462172.n4.nabble.com/Bug-in-Cipher-class-td1465452.html.
> Seems there are problems running custom JCE providers on WebSphere (and IBM say they don't support custom JCE providers). 
> Adding WSS4j to a higher level classloader causes all kinds of other errors to come up.
> Is there any way we can get this to work or are we WebSphere users out of luck? (Or am I just doing something horrible wrong?). I've already applied the fixes shown in https://issues.apache.org/jira/browse/WSS-273 (I got those errors before I got this one).
> [5/4/11 16:41:04:379 EST] 00000029 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/4/11 16:41:04:379 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.computeSignature(WSSecSignatureSAML.java:529)
> [5/4/11 16:41:04:379 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.build(WSSecSignatureSAML.java:155)
> ... servlet stack trace components ....
> [5/4/11 16:41:04:392 EST] 00000029 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/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.transform(DOMReference.java:412)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.digest(DOMReference.java:304)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMXMLSignature.digestReference(DOMXMLSignature.java:467)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMXMLSignature.sign(DOMXMLSignature.java:361)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	at org.apache.ws.security.saml.WSSecSignatureSAML.computeSignature(WSSecSignatureSAML.java:524)
> [5/4/11 16:41:04:393 EST] 00000029 SystemErr     R 	... 66 more
> [5/4/11 16:41:04:394 EST] 00000029 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/4/11 16:41:04:394 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:267)
> [5/4/11 16:41:04:394 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transform(STRTransform.java:122)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMTransform.transform(DOMTransform.java:147)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.jcp.xml.dsig.internal.dom.DOMReference.transform(DOMReference.java:409)
> [5/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	... 70 more
> [5/4/11 16:41:04:395 EST] 00000029 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/4/11 16:41:04:395 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:163)
> [5/4/11 16:41:04:396 EST] 00000029 SystemErr     R 	... 73 more
> [5/4/11 16:41:04:396 EST] 00000029 SystemErr     R Caused by: java.lang.ClassCastException: org.jcp.xml.dsig.internal.dom.DOMSubTreeData incompatible with javax.xml.crypto.OctetStreamData
> [5/4/11 16:41:04:397 EST] 00000029 SystemErr     R 	at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:160)
> [5/4/11 16:41:04:397 EST] 00000029 SystemErr     R 	... 73 more

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org