Products | Versions |
---|---|
TIBCO ActiveMatrix BusinessWorks | - |
Not Applicable | - |
When using the XMLInputFactory class in Java Code Activity
XMLInputFactory inputFactory = (XMLInputFactory) XMLInputFactory2.newInstance();
the following exception may be seen:
While executing [newInstance] encountered [java.lang.ClassCastException] : [com.tibco.xml.parsers.xmlfactories.XMLInputFactory cannot be cast to org.codehaus.stax.XMLInputFactory]
Inputfactory should be set before using the inputfactory.
System.setProperty("javax.xml.stream.XMLInputFactory", "com.ctc.wstx.stax.WstxInputFactory");