Liblsxbe.so: wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch)

Hi,first of all our environment:

  • Suse SLES 10 64 bit

  • Domino 8.5.1 32 bit

  • Glassfish v3

We are using the Notes.jar to access a Notes database from a JSF application. This works perfect in a 32 bit environment. Although in the 32/64 bit environment described above we are experiencing the following error:

javax.faces.el.EvaluationException: java.lang.UnsatisfiedLinkError: /opt/ibm/lotus/notes/85010/linux/liblsxbe.so: /opt/ibm/lotus/notes/85010/linux/liblsxbe.so: wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch)

We are starting the Glassfish with an absolute path to the java binary included within the domino server. We are also using the -d32 flag and -Djava.library.path=/opt/ibm/lotus/notes/85010/linux/

System.getProperty(“os.arch”) still says 64…

Does anyone have an idea how to fix this?

Regards, Kilian

Subject: Solved

Hi,we found the solution. Change startserv in glassfish/bin to the following:

AS_JAVA in /usr/GF_OSSO_AS/glassfish/config/asenv.conf has to point to a 32 bit JRE

chown -R notes:notes /usr/GF_OSSO_AS/glassfish

Start Glassfish using: sudo -u notes ./startserv

export LD_LIBRARY_PATH=/opt/ibm/lotus/notes/85010/linux

export PATH=$PATH:/data/…/directoryContainingNotes.ini

AS_INSTALL=dirname "$0"/…

AS_INSTALL_LIB=“$AS_INSTALL/modules”

exec /usr/java/jre1.6.0_22/bin/java -jar -Djava.library.path=/opt/ibm/lotus/notes/85010/linux “$AS_INSTALL_LIB/admin-cli.jar” start-domain --verbose “$@”