Return-Path: X-Original-To: apmail-ws-dev-archive@www.apache.org Delivered-To: apmail-ws-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 15311917C for ; Wed, 2 Nov 2011 14:53:57 +0000 (UTC) Received: (qmail 29691 invoked by uid 500); 2 Nov 2011 14:53:56 -0000 Delivered-To: apmail-ws-dev-archive@ws.apache.org Received: (qmail 29443 invoked by uid 500); 2 Nov 2011 14:53:56 -0000 Mailing-List: contact dev-help@ws.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ws.apache.org Delivered-To: mailing list dev@ws.apache.org Received: (qmail 29431 invoked by uid 99); 2 Nov 2011 14:53:55 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Nov 2011 14:53:55 +0000 X-ASF-Spam-Status: No, hits=-2001.2 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Nov 2011 14:53:53 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 678D532E185 for ; Wed, 2 Nov 2011 14:53:32 +0000 (UTC) Date: Wed, 2 Nov 2011 14:53:32 +0000 (UTC) From: "John Lazos (Commented) (JIRA)" To: dev@ws.apache.org Message-ID: <640545732.50606.1320245612425.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <86373783.6450.1318946896637.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (WSS-320) ClassCastException when verifying XML signature, multiple WARs deployed to same Tomcat instance MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/WSS-320?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13142196#comment-13142196 ] John Lazos commented on WSS-320: -------------------------------- Your most recent changes did the trick! I received no ClassCastException and signature verification worked without a hitch. Thanks! > ClassCastException when verifying XML signature, multiple WARs deployed to same Tomcat instance > ----------------------------------------------------------------------------------------------- > > Key: WSS-320 > URL: https://issues.apache.org/jira/browse/WSS-320 > Project: WSS4J > Issue Type: Bug > Components: WSS4J Core > Affects Versions: 1.6.2, 1.6.3 > Environment: Tomcat 7.0.16, 6.0.33 > Reporter: John Lazos > Assignee: Colm O hEigeartaigh > Labels: classloader > Attachments: wss4j-1.6.4-SNAPSHOT.jar > > > When I have multiple WARs deployed in the same Tomcat instance, I receive the following exception when attempting to verify a signature in the security header: > Caused by: javax.xml.crypto.dsig.XMLSignatureException: javax.xml.crypto.dsig.TransformException: java.lang.ClassCastException: org.apache.ws.security.WSDocInfo cannot be cast to org.apache.ws.security.WSDocInfo > at org.jcp.xml.dsig.internal.dom.DOMReference.transform(Unknown Source) > at org.jcp.xml.dsig.internal.dom.DOMReference.validate(Unknown Source) > at org.jcp.xml.dsig.internal.dom.DOMXMLSignature.validate(Unknown Source) > at org.apache.ws.security.processor.SignatureProcessor.verifyXMLSignature(SignatureProcessor.java:348) > ... 34 more > Caused by: javax.xml.crypto.dsig.TransformException: java.lang.ClassCastException: org.apache.ws.security.WSDocInfo cannot be cast to org.apache.ws.security.WSDocInfo > at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:264) > at org.apache.ws.security.transform.STRTransform.transform(STRTransform.java:121) > at org.jcp.xml.dsig.internal.dom.DOMTransform.transform(Unknown Source) > ... 38 more > Caused by: java.lang.ClassCastException: org.apache.ws.security.WSDocInfo cannot be cast to org.apache.ws.security.WSDocInfo > at org.apache.ws.security.transform.STRTransform.transformIt(STRTransform.java:184) > ... 40 more > When I put each WAR into its own Tomcat instance, the issue does not occur. I am using WSS4J with CXF on Tomcat 7.0.16. > I do not know much about the implementation of WSS4J, but I suspect this is a class loader issue related to https://issues.apache.org/jira/browse/WSS-282. -- 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