cancel
Showing results for 
Search instead for 
Did you mean: 

Getting Java mapping errors when testing my Interface mapping

Former Member
0 Kudos

Hi,

I'm trying to test my interface mapping from IR, I keep getting these exceptions. All I'm doing in my interface mapping is I have two mapping programs a XSLT mapping with java helper functions with the XSL and a message mapping. In the test it pass thru the XSLT mapping but fails at Message mapping and throws the following exception. Any help on this is really appreciated.

10:03:26 Start of test

Call XSLT processor with stylsheet com/earthlink/xi/mapping/xmlc_to_crm_resp.xsl.

      • START APPLICATION TRACE ***

Response:

0

      • END APPLICATION TRACE ***

Returned form XSLT processor.

Call method execute of the application Java mapping com.sap.xi.tf._MM_XMLC_RESP_

Error during appliction Java mapping com/sap/xi/tf/_MM_XMLC_RESP_

java.lang.NullPointerException at com.sap.aii.mappingtool.tf3.AMappingProgram.exceptionCaught$(AMappingProgram.java:59) at com.sap.aii.mappingtool.tf3.Transformer.checkParserException(Transformer.java:182) at com.sap.aii.mappingtool.tf3.Transformer.start(Transformer.java:149) at com.sap.aii.mappingtool.tf3.AMappingProgram.execute(AMappingProgram.java:102) at com.sap.aii.ibrep.server.mapping.ibrun.RepJavaMapping.execute(RepJavaMapping.java:73) at com.sap.aii.ibrep.server.mapping.ibrun.RepSequenceMapping.execute(RepSequenceMapping.java:54) at com.sap.aii.ibrep.server.mapping.ibrun.RepMappingHandler.run(RepMappingHandler.java:80) at com.sap.aii.ibrep.server.mapping.rt.MappingHandlerAdapter.run(MappingHandlerAdapter.java:107) at com.sap.aii.ibrep.server.mapping.ServerMapService.transformInterfaceMapping(ServerMapService.java:127) at com.sap.aii.ibrep.server.mapping.ServerMapService.transform(ServerMapService.java:104) at com.sap.aii.ibrep.sbeans.mapping.MapServiceBean.transform(MapServiceBean.java:40) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0.transform(MapServiceRemoteObjectImpl0.java:167) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0p4_Skel.dispatch(MapServiceRemoteObjectImpl0p4_Skel.java:104) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:320) at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:198) at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:129) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)

10:03:26 End of test

Accepted Solutions (1)

Accepted Solutions (1)

ravi_raman2
Active Contributor
0 Kudos

Joe,

Try this...surround the java mapping program in a try catch block...then catch the null pointer..though it will clear out your trace..thats not the right way.

This is being thrown by the internal xml parser which is being implemented by the sap transformer class, your mappings are not ok, seems to me you are leaving out smthing in the mapping and hence when that is being parsed to convert it into an xml document there is an element or attribute that should be there but isint.

Regards

Ravi Raman

Former Member
0 Kudos

Hi Raman,

Thanks for responding to my post. do you know how I can trace my java System.out, in XI I trying to debug my java code I do have some trace statements in there and also some System.out statements. how ever I don't see those message in moni.

thanks,

Joe.P

Answers (1)

Answers (1)

henrique_pinto
Active Contributor
0 Kudos

Joe,

most likely your XSLT is outputting a not well-formed XML message.

Remove message mapping from the mapping list and execute it again, to check output.

Also, for mapping debugging in java enhanced function inside XSLT mappings, use the following:

1st, you need to pass the "inputparam" parameter from the XSLT runtime to the Java function (it needs to be one of the input parameters for the executed java function).

In the Java code itself, implement the following code:


AbstractTrace trace = (AbstractTrace) param.get(StreamTransformationConstants.MAPPING_TRACE);
trace.addInfo("Log your message here!");

where <i>param</i> is the input parameter refering to the <i>inputparam</i> from XSLT.

The AbstractTrace and StreamTransformationConstants classes can be found in the aii_map_api.jar file (used in Java mappings).

Regards,

Henrique.

Former Member
0 Kudos

Hi Pinto,

I'm using the trace calls within my java code, but I was not able to see my traces in XSMB_MONI. Do I have to set some trace level within moni to see my trace statement.

Thanks,

Joe.

henrique_pinto
Active Contributor
0 Kudos

Default would be fine (trace = 1, by default, I think).

Also, set the value of LOGGING parameter of SXMB_ADM to 1.

Check for the "trace" node in the "request message mapping" pipeline entry.

And even without that, you should be able to see it in Interface Mapping test tab.

Regards,

Henrique.