I am trying to integrate CardSpace authentication in our application using the Higgins Token disassembly module. However my application also uses xerces-j libraries (xml-apis.jar and xercesImpl.jar) version 2.6.2. Therefore the CLASSPATH of my application also contains the path to xml-apis.jar. When I try to run the CardSpace auth module in our application, I get the following error:
March 20, 2008 2:14:51.375 PM[23257749:E] Exception Stack Trace: java.lang.NoSuchMethodError: org.w3c.dom.Node.getTextContent()Ljava/lang/String;
at com.infosys.ps.icas.higgins.TokenAdapter.getValueFromElement(TokenAdapter.java:146)
at com.infosys.ps.icas.higgins.TokenAdapter.getValueFromElements(TokenAdapter.java:141)
at com.infosys.ps.icas.higgins.TokenAdapter.init(TokenAdapter.java:104)
at com.infosys.ps.icas.InfoCardToken.getTokenPrimitive(CardToken.java:121)
at com.infosys.ps.icas.InfoCardToken.getClaims(CardToken.java:59)
at com.infosys.ps.icas.InfoCardToken.getVPPID(CardToken.java:51)
at com.infosys.ps.icas.Authenticator.Lookup(Authenticate.java:240)
at com.infosys.ps.icas.Authenticator.authenticateCardSpace(Authenticate.java:222)
at com.infosys.ps.icas.Authenticator.authenticate(Authenticator.java:65)
This problem goes away if I remove or rename the xml-apis.jar from my application installation. However that is not an option (neither is modifying the CLASSPATH). That being the case, how can I resolve the above error? Please note that any change in the version of xml-apis.jar will also incur a cascading effect on other components that depend on this jar, so I am looking for a solution that will help me localize the fix to my auth module only, in case possible.