cancel
Showing results for 
Search instead for 
Did you mean: 

SAX Transformation

0 Kudos

Hi,

we are facing an exception at sax transform step when we execute the java mapping program in PI 7.3.1 dual stack.

Error caught in conversion javax.xml.transform.TransformerException: java.lang.ClassCastException: class com.sap.aii.ib.server.mapping.execution.jaxpfactories.MappingTransformerFactory:sap.com/com.sap.xi.repository@com.sap.engine.boot.loader.ResourceMultiParentClassLoader@728d7bb7@alive incompatible with class javax.xml.transform.sax.SAXTransformerFactory:null

The same mapping program when executed locally in NWDS, we are getting the excepted output but we are getting the exception when the mapping is executed in PI.

Kindly provide your valuable suggestions to fix the issue.

Thanks

Arshath

Accepted Solutions (0)

Answers (2)

Answers (2)

iaki_vila
Active Contributor
0 Kudos

Hi Mohamed,

The problem seems to be an incompatibility between the jar that includes javax.xml.transform.sax.SAXTransformerFactory and PI java vm, try to assure the jar has be compiled in the same java version than PI.

Regards.

engswee
Active Contributor
0 Kudos

Hi Arshath

Can you share your mapping code?

Rgds

Eng Swee

0 Kudos

Hi Eng swee yeoh,

we are generating a PDF file from XML using fop jar. I have also uploaded all relevant jars into the imported archives. we are facing issue exactly in the below line.

TransformerFactory factory = TransformerFactory.newInstance();

Transformer transformer = factory.newTransformer(transformSource);

Thanks

Arshath

engswee
Active Contributor
0 Kudos

Arshath

What is the import statements for TransformerFactory and Transformer. What type is transformSource?

Rgds

Eng Swee

stefan_grube
Active Contributor
0 Kudos

SAP PI works with JAXP as SAX library, FOP has own SAX library which is not compatible to JAXP.

Remove the SAX parser library xml-apis from your project and from your imported archives and try if it is working then.