ELFCLASS32 or ELFCLASS64 errors refer to a architecture mismatch between the running environment and the environment the library/software was compiled in.
Here is an example of this type of error that occurred during a R12 WAM UI install. From the JBOSS log:
/disk1/CA/IAM_Suite/siteminderWAM/agentframework/bin/libsmcommonutil.so: wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch)
The 32-bit SiteMinder R12 WAM UI was being installed into a 64-bit Redhat/64-bit Java JRE environment. The WAM UI is not supported in 64-bit environments, please refer to SiteMinder 12.0 Platform Support matrix.
The solution is to do a clean install in a 32-bit Java JRE environment.