0

Here is my container environment and configuration Environment configuration depicting 64-Bit architecture of JVM and Linux and 64-Bit libraries being available As you can see the JVM and the Linux are both 64-Bit. The library location also has 64Bit liars3wapi64.so file available and that is what I have set as LD_LIBRARY_PATH using the following 2 commands in dockerfile.
ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/ibm/ondemand/V10.5/www:/opt/ibm/ondemand/V10.5/lib64
ENV CLASSPATH=/opt/ibm/ondemand/V10.5/www/api/ODApi.jar:${CLASSPATH}
However, during initialization I am getting the below error where it is reading the 32-Bit library.
Caused by: java.lang.UnsatisfiedLinkError: /opt/ibm/ondemand/V10.5/www/libars3wapi32.so: /opt/ibm/ondemand/V10.5/www/libars3wapi32.so: wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch)
I am not sure how to force the JVM to look for 64-Bit library. I have spent too many hours and haven't seen any difference in the outcome. Would appreciate any hint. Thanks.

Kabira Speaking
  • 227
  • 3
  • 18
  • If you `rm` the 32-bit library, does it pick the 64-bit version instead? – Nick ODell Mar 15 '23 at 01:36
  • Then it throws error saying couldn't find the ars3wapi32 on the library path. – Kabira Speaking Mar 15 '23 at 01:41
  • 2
    The `32` and `64` are not part of a standard to select architecture specific libraries. It’s just part of the name. When the Java application or library ask for a library named `libars3wapi32`, the JVM won’t change the name to `libars3wapi64`. You could workaround this by renaming `libars3wapi64.so` to `libars3wapi32.so`, but when the software comes with two versions, it’s strange that it selects the wrong one. – Holger Mar 15 '23 at 08:32
  • I'd say that the issue is in the ODApi.jar, which is trying to load the 32 bit library. You could try to find a version of that jar that works with the 64 bit version of the library. – Jorn Vernee Mar 15 '23 at 12:52
  • I tried renaming and got a different error. From what I understand, JARs are not 32 or 64-Bit. However, the jar may be loading wrong library. I will try to see what is going on with the ODApi.jar. Thanks – Kabira Speaking Mar 15 '23 at 13:30

0 Answers0