cancel
Showing results for 
Search instead for 
Did you mean: 

Exception in Java Mapping on SAP PI 7.3 EHP 1

Former Member
0 Kudos

Dear Friends,

I'm facing an exception while executing the Java Mapping on the application server. My SAP system is SAP PI 7.3 EHP 1 AS Java (Single Stack).

My scenario is File to Database and I'm trying to JAXB in Java Mapping to translate the file data XML into DB XML SQL Format.

The java mapping is getting executed properly in local NWDS, but when I create the iFlow and deploy the same on the SAP application server, it throws an exception.

The line below in bold throws the exception in Java Mapping:

InputStream is = arg0.getInputPayload().getInputStream();

JAXBContext jaxbContext = JAXBContext.newInstance(DTCustDtlsRecords.class);

Unmarshaller unMarshaller = jaxbContext.createUnmarshaller();

JAXBElement<DTCustDtlsRecords> dtCustDtlsRecords = (JAXBElement<DTCustDtlsRecords>) unMarshaller.unmarshal(new StreamSource(is), DTCustDtlsRecords.class);

DTInsertCustRecords dtInsertCustRecords = new DTInsertCustRecords();

List<DTCustDtls> record = dtCustDtlsRecords.getValue().getRecord();

The exception stack track is as below:

#2.#2014 02 17 18:17:30:195#+0530#Error#/Applications/ExchangeInfrastructure#

#BC-XI-IBD#com.sap.xi.util.misc#C0000A0007C0016D0000001A0000084A#7443050000002499#sap.com/com.sap.xi.services#com.sap.aii.ib.server.mapping.execution.JavaMapping#Guest#0##8750975D97CE11E38F0006AE32000005#8750975d97ce11e38f0006ae32000005#00000000000000000000000000000000#0#MS Queue Worker [File_http://sap.com/xi/XI/SystemSend]#Plain##

Error during appliction Java mapping com/fg/pi/jm/CustRecordsInsert

Thrown:

javax.xml.parsers.FactoryConfigurationError: Provider com.sap.aii.ib.server.mapping.execution.jaxpfactories.MappingSaxParserFactory not found

        at javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:134)

        at javax.xml.bind.helpers.AbstractUnmarshallerImpl.getXMLReader(AbstractUnmarshallerImpl.java:80)

        at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:241)

        at com.fg.pi.jm.CustRecordsInsert.transform(CustRecordsInsert.java:88)

        at com.sap.aii.ib.server.mapping.execution.JavaMapping.executeStep(JavaMapping.java:92)

        at com.sap.aii.ib.server.mapping.execution.Mapping.execute(Mapping.java:60)

        at com.sap.aii.ib.server.mapping.execution.MappingHandler.map(MappingHandler.java:87)

        at com.sap.aii.ib.server.mapping.execution.MappingHandler.map(MappingHandler.java:71)

        at com.sap.aii.ibrun.sbeans.mapping.MappingAccessBean.executeMappingSteps(MappingAccessBean.java:238)

        at com.sap.aii.ibrun.sbeans.mapping.MappingAccessBean.executeMapping(MappingAccessBean.java:178)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

        at java.lang.reflect.Method.invoke(Method.java:597)

        at com.sap.engine.services.ejb3.runtime.impl.RequestInvocationContext.proceedFinal(RequestInvocationContext.java:47)

        at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:166)

        at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatesTransition.invoke(Interceptors_StatesTransition.java:19)

Please let me know if any setup or something else is missing. I'm not able to locate the jar file with class - com.sap.aii.ib.server.mapping.execution.jaxpfactories.MappingSaxParserFactory.

Regards,

Shreyansh

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos



found a Note 609804 - References to SAPXMLToolkit in J2EE Engine 6.30

Answers (3)

Answers (3)

Former Member
0 Kudos

Thanks Hanumantha! The given note helped resolving the issue. I was using the SAP XML Toolkit option, but wasn't updating the Class Loader as mentioned in the SAP Note. Inclusion of those lines resolved the issue.

Appreciate everyone's time!

Regards,

Shreyansh

Former Member
0 Kudos

Shah,

JAXP implementation classes have reference in SAP tool kit .

Check the SAP XML Toolkit option in Operation mapping as suggested by Venkat.

http://help.sap.com/saphelp_nw70ehp1/helpdata/en/34/f1353e39011a38e10000000a114084/content.htm

Regards,

Pranav

Former Member
0 Kudos

Hi ,

Have you tried using "SAP XML Toolkit" option in the Operations Mapping?

Regards

Venkat