I'm getting this error pointing to some .so file when running my application on a Solaris machine. However, the application runs just fine in my Windows machine. If I'm not mistaken, my application is expecting for the 64-bit version but I only have a 32-bit version of the .so file in the Solaris machine. Is there a way I can fix this so it will use the 32-bit version instead? I understand it has nothing to do with the bytecodes but probably with the JVM. I tried running using -d32 or -d64 but it has no effect.
UPDATE:
This is the exact error:
Exception in thread "main" java.lang.UnsatisfiedLinkError: librvjs11.so: ld.so.1: java: fatal: librvjs11.so: wrong ELF class: ELFCLASS32<br>
at java.lang.ClassLoader$NativeLibrary.load(Native Method)<br>
at java.lang.ClassLoader.loadLibrary0(Unknown Source)<br>
at java.lang.ClassLoader.loadLibrary(Unknown Source)<br>
at java.lang.Runtime.loadLibrary0(Unknown Source)<br>
at java.lang.System.loadLibrary(Unknown Source)<br>
I've already updated LD_LIBRARY_PATH so it includes the directory containing the file above.
Description. ELFCLASS32 or ELFCLASS64 errors refer to a architecture mismatch between the running environment and the environment the library/software was compiled in. Solution. Here is an example of this type of error that occurred during a R12 WAM UI install.
@Vineet: jasonline means a "wrong ELF class" error. If you've ever seen one, it doesn't carry much information -- just the filename. It does indeed mean that the app is trying to use a 32-bit binary in a 64 bit environment.
Based on the conversation in the other answer, it was inferred that the JVM was a 64-bit process. This was confirmed using the pflags
command in Solaris.
Apparently the -d32
flag passed to the JVM was being ignored. This was due to the possibility of the JVM being a 64-bit one, which was incapable of operating in the 32-bit mode. The resolution might therefore be to install a 32-bit version of JVM, and use the same.
What I think is happening is that your app is using a library that has its own pre-compiled binaries, and those are 32 bit.
Your options are either to get a 64 bit version of the binaries, or force java to run in 32 bit which is what -d32
is supposed to do.
However, can the jvm on that machine run in 32 bit? If it can't then the -d32
will cause java to spit out a warning that it can't run in 32 bit and that it will continue in 64 bit.
Are you getting that warning?
I'ma CW this since Vineet is doing all the helping.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With