cancel
Showing results for 
Search instead for 
Did you mean: 

Incompatible class versions (linkage error)

Former Member
0 Kudos

Hi All,

Recently we have upgraded our PI SP level from 18 to 25. We are having few java archies used in mappings and after upgrade

we are facing mapping error as below

 

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

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

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

<SAP:P1>EncryptAndSign</SAP:P1>
<SAP:P4>-1</SAP:P4>

<SAP:AdditionalText />

<SAP:ApplicationFaultMessage namespace="" />

<SAP:Stack>Incompatible class versions (linkage error)</SAP:Stack>

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

</SAP:Error>

After upgrade our JDK version is 1.3 and JRE version 1.4.2_05.

We are assuming that we need to create Java class with above versions and import again in to repsoitory.

Please suggest on this.

Regards,

Siva

Accepted Solutions (1)

Accepted Solutions (1)

aashish_sinha
Active Contributor
0 Kudos

Hi,

The problem "Linkage Error" is due to JDK version mismatch between XI / PI and your Java IDE.

XI uses JDK1.4/JDK1.6 so you have to use JDK 1.4/JDK1.6 to compile your java code and generate .jar file.

To use different jdk version at netbeans go to your project ->select the jdk version here and follow the wizard.

Visit - Linkage Error Question 3 for solutions.

Regards

Aashish Sinha

Answers (3)

Answers (3)

baskar_gopalakrishnan2
Active Contributor
0 Kudos

>>>After upgrade our JDK version is 1.3 and JRE version 1.4.2_05. We are assuming that we need to create Java class with above versions and import again in to repsoitory.

Your compiled code with one version and running on JVM version higher. So you get incompatible issues. This is so simple. Plus Sun/Oracle does not encourage to use jdk 1.3 at all. So I would recommend you to install jdk 1.4 and compile all your mapping UDF/Java mapping if any in that version. You can maintain still Java 1.4 for jvm (runtime environment). Then you can avoid this issue.  Since oracle has recommended the base version now is 1.4 and default version seems Jdk 1.5, you will have even backward compatible issues in the future.

Since your PI version 7.0 is 32 bit, you have to go upgrade java only to Jdk 1.4.  

Hope this helps

Former Member
0 Kudos

Hi Baskar,

Thanks for reply.

I have checked with BASIS consultant and they were saying JRE and JVM are 1.4.2_14.

But when i check in XI home page in Administration->software build information JDK is 1.3 only.

Could you please let me know how to upgrade JDK version to 1.4 in XI server.

Thanks,

Siva

baskar_gopalakrishnan2
Active Contributor
0 Kudos

> Could you please let me know how to upgrade JDK version to 1.4 in XI server.

If you want to upgrade to 1.4, you might want to check this link

http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javase14-4194...

anupam_ghosh2
Active Contributor
0 Kudos

Hi Siva,

             you have not mentioned the version of SAP-PI you are working in.If you are working in SAP-PI 7.0 . Then download all java mapping source files recompile them again with  java2sdkse v 1.4.2_15 and  java2 runtime enviornment V 1.4.2_15. You will need external jar file to be aii_map_api.jar. If you are working in PI7.1 then try with java2sdkse v 1.5.0 and   java2 runtime enviornment V 1.5.0. The external jar file required is different.use http://wiki.sdn.sap.com/wiki/display/XI/Where+to+get+the+libraries+for+XI+development

this link to find the external jar files to recompile the java code.

Upload the mappings again and I hope error will be gone.Linkage error is shown in SAP-PI is there is a version mismatch between compiled java class files and actual java installed in SAP-PI server.

Regards

Anupam

Former Member
0 Kudos

Hi Anupam,

Thanks for your reply.

Here  PI is 7.0 version and SP 25. JRE version 1.4.2_14.

I have installed 1.4.2_15 JRE for Java web start and JDK 1.4.2_15 for recompile the Java code.

To recompile the Java class I need below Jar files

  1. com.sap.aii.mapping.api.MappingTrace;
  2. com.sap.aii.mapping.api.StreamTransformation;
  3. com.sap.engine.interfaces.keystore.KeystoreManager;
  4. com.sap.security.core.server.jaas.spnego.util.Base64;
  5. com.sap.security.core.server.ssf.SsfDataPKCS7;
  6. com.sap.security.core.server.ssf.SsfProfileKeyStore;

From XI Server i have got all Jar file except

for com.sap.security.core.server.jaas.spnego.util.Base64

Could you please let me know the exact Jar file where i could get?

Thanks in advance,

Siva

sunilchandra007
Active Contributor
0 Kudos

Check tc_sec_jaas.jar in folder  /usr/sap/<SID>/DVEBMGS<nr>/j2ee/cluster/server0/bin/ext/security.class

Regards,

Sunil Chandra

anupam_ghosh2
Active Contributor
0 Kudos

Hi Siva,

              Please try upgrading the java version in PI server to   java2sdkse v 1.4.2_15 and  java2 runtime environment V 1.4.2_15.  Secondly try searching the link provided by Sunil. Indeed your compilation environment lacks a jar file. Now this code was running in server previously thus the all the jar files to run this code must be present in PI server itself. Try accessing the server in Operating system level maybe using WINSCP software and search for all jar files present. Try picking up jar files related to base64 encoding. Try Google search with piece of java code where the imported classes are being used.

Regards

Anupam 

Former Member
0 Kudos

Hi Sunil,

I have already imported tc_sec_jass.jar. even i could not find the class. and after importing few other security related Jar files i have got the class com.sap.security.core.server.jaas.spnego.legacy.util.Base64 and compiled the program.

Could you please let me know whether these two classes give same functionality.

Thanks,

Siva

sunilchandra007
Active Contributor
0 Kudos

Although I can very well see the Base64 class in tc_sec_jass.jar, but I am not sure why you need this jar. If you have the java mapping code, you just check those jars that comes in the import statement in your java mapping code.

Again the error Incompatible class versions (linkage error) is due to different java version of PI server than what you used to compile the code. So I would advice to first compile the java mapping code in same Java version on which your PI is installed and then test again after importing in PI.

Regards,

Sunil Chandra

iaki_vila
Active Contributor
0 Kudos

Hi Siva,

This problem usually appears when you don't compile all java files in one project at the same time or like your case, in an uppgrade situation. I recommend you to compile in local with the same new java version all the mapping classes, import to your PI system and refresh the CPA Cache before to test it.

Regards.