Search code examples
javaccompilationwebspherezos

java.lang.UnsatisfiedLinkError - when running z/OS application


When I am trying to run one of my Java application (which is deployed in IBM Websphere App server), I am getting the below error,

java.lang.UnsatisfiedLinkError: PATH/file.so (EDC5253S An AMODE64 application is attempting to load an AMODE31 DLL load module. (errno2=some_address)) at java.lang.ClassLoader.loadLibraryWithPath(ClassLoader.java:1344)

Did anyone face the same issue of AMODE64 ?

Or could someone provide info on how to compile code to AMODE64.

Any reference in this would also be of great help.

Thanks in advance.


Solution

  • On z/OS, you can't have a mixed single-address application that has some parts compiled 31-bit and some parts compiled 64-bit, if you are using Language Environment. All modern high level languages -do- use Language Environment (e.g. C, C++, Java, COBOL, PL/I), and so this is what is causing your problem. Depending on the version of Java you are using, you can either switch to a 31-bit JVM or (preferably) recompile and relink your C DLLs as 64-bit.