ClassCastException: org.apache.jcp.xml.dsig.internal.dom.DOMXMLSignatureFactory cannot be cast to javax.xml.crypto.dsig.XMLSignatureFactory in FSW 6.0 and EAP 6.2

Solution Unverified - Updated -

Issue

import javax.xml.crypto.dsig.XMLSignatureFactory;

...
XMLSignatureFactory factory = XMLSignatureFactory.getInstance();
....
java.lang.ClassCastException: org.apache.jcp.xml.dsig.internal.dom.DOMXMLSignatureFactory cannot be cast to javax.xml.crypto.dsig.XMLSignatureFactory
  at javax.xml.crypto.dsig.XMLSignatureFactory.getInstance(XMLSignatureFactory.java:179) [rt.jar:1.6.0_30]
  at javax.xml.crypto.dsig.XMLSignatureFactory.getInstance(XMLSignatureFactory.java:297) [rt.jar:1.6.0_30]
  ...

Environment

Red Hat JBoss Fuse Service Works (EAP) 6.0.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In