Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

ClassCastException:__redirected.__XMLInputFactory cannot be cast

SA-75678

Summary



ClassCastException occurs and SOAP connector does not work.

Below is the code snippet from CL:Rule-Connect-SOAP ID:InvokeAxis2 RS:Pega-IntegrationEngine:08-01-01:

      //HFix-45582
       com.ctc.wstx.stax.WstxInputFactory  wInputFactory =  (com.ctc.wstx.stax.WstxInputFactory)inputFactory;
       wInputFactory.getConfig().setConfigFlag(1);
      //HFix-45582


Error Messages



Caused by: java.lang.ClassCastException: __redirected.__XMLInputFactory cannot be cast to com.ctc.wstx.stax.WstxInputFactory)


Steps to Reproduce



Upgrade Pega 7.2.1 to Pega 8.1.3.


Root Cause



A backwards compatibility defect in Pegasystems’ code or rules introduced in Pega 8.1.


Resolution



Perform the following local-change:
  1. Save As the rule to the application ruleset.
  2. Add the below line of code,

    System.setProperty("javax.xml.stream.XMLInputFactory", "com.ctc.wstx.stax.WstxInputFactory");

    before 

    com.ctc.wstx.stax.WstxInputFactory  wInputFactory =  (com.ctc.wstx.stax.WstxInputFactory)inputFactory;

Published April 4, 2019 - Updated December 2, 2021

Was this useful?

100% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us