cancel
Showing results for 
Search instead for 
Did you mean: 

JAVA MAPPING LINKAGE_ERROR java.lang.NoClassDefFoundError

Pranil1
Participant
0 Kudos

Hi all,

I am working on Java mapping. I imported java archive in mapping and after I execute the proxy to web service scenario in sxmb_moni, I am getting below error.

  <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>

- <!--  Request Message Mapping

  -->

- <SAP:Error SOAP:mustUnderstand="1" xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">

  <SAP:Category>Application</SAP:Category>

  <SAP:Code area="MAPPING">LINKAGE_ERROR</SAP:Code>

  <SAP:P1>***/***/***/***/***/***/mapping/SoapE~</SAP:P1>

  <SAP:P2>java.lang.NoClassDefFoundError: ***/***/***/xi</SAP:P2>

  <SAP:P3>***/***/***/***/***/***/mapping/SoapEnvelopeForSFDC (wro</SAP:P3>

  <SAP:P4>ng name: ***/***/***/***/***/***/mapping/So~</SAP:P4>

  <SAP:AdditionalText />

  <SAP:Stack>Linkage error while loading class ***/***/***/***/***/***/mapping/SoapE~; java.lang.NoClassDefFoundError: ***/***/***/***/***/***/mapping/SoapEnvelopeForSFDC (wrong name: ***/***/***/***/***/***/mapping/So~</SAP:Stack>

  <SAP:Retry>N</SAP:Retry>

  </SAP:Error>

please let me know if anyone knows the reason - or if anyone have come accross such situations.

Regards,

P S.

Accepted Solutions (1)

Accepted Solutions (1)

anupam_ghosh2
Active Contributor
0 Kudos

Hi Pranil,

                  What is the SAP-PI version you are working with?

If you are working in PI 7.0 or lower version the java mapping code has to be compiled  java2sdkse v 1.4.2_15, java2 runtime enviornment V 1.4.2_15.   In case you are working with higher version use j2se 1.5.0 to compile your code. Ensure you are using right library files also. For PI 7.0 its aii_map_api.jar. If its higher version of PI then use com.sap.xpi.ib.mapping.lib file as external jar files. The details where you will get these files are there in this link http://wiki.sdn.sap.com/wiki/display/XI/Where+to+get+the+libraries+for+XI+development

Linkage error results when there is a mismatch between java version of the compiled code and that expected by SAP-PI.

Regards

Anupam

Pranil1
Participant
0 Kudos

hi Anupam,

Thanks for your reply. I checked your link.

I am using PI 7.1 and I have used com.sap.xpi.ib.mapping.lib.jar files as suggested in the link.

Pls let me know if I am missing anything.

Regards,

P S

anupam_ghosh2
Active Contributor
0 Kudos

Hi Pranil,

              Check the java version you are compiling the code with. Is it j2sdk1.5.0 or not?

If not install proper java version inyour local system and recompile the code.

Regards

Anupam

Pranil1
Participant
0 Kudos

Thanks Anupam.

Answers (1)

Answers (1)

iaki_vila
Active Contributor
0 Kudos

Hi Pranil,

You should use as local JVM the same JVM that your PI, and you must compile all the classes implied in the java mapping.

Regards.