Native IO dramatically increases performance of your Oracle Middleware servers (SOA Suite, OSB etc). However, it requires some native libraries to be loaded, specific for your operating system and system architecture. No big deal, we all know that.
I recently fell into the trap of the mixed mode JVM on Solaris 11 Intel. You see, when you install the JDK on Solaris, you basically install the 32bits version, and afterwards you “upgrade it” with the 64bits binaries on top of it. When you do not specify the “-d64” java command line option, it will run in 32bits mode. When starting the WebLogic servers, you’d explicitly set the “-d64” Java option, and all is well. Or is it?
However, what if the Native IO errors keep popping up (line breaks added for readability):
<Error> <Socket> <BEA-000438> <Unable to load performance pack. Using Java I/O instead. Please ensure that a native performance library is in: '/opt/app/weblogic/middleware/patch_wls1036/profiles/default/native: /opt/app/weblogic/middleware/patch_ocp371/profiles/default/native: /opt/app/weblogic/middleware/wlserver_10.3/server/native/solaris/x86: /opt/app/weblogic/middleware/Oracle_SOA1/soa/thirdparty/edifecs/XEngine/bin: /usr/jdk/packages/lib/amd64: /lib/64: /usr/lib/64'
<Warning> <Store> <BEA-280109> <Unable to load the native wlfileio library for the persistent file store "BPMJMSFileStore_auto_1". The store will use buffered I/O. The store is still operating in a transactionally safe synchronous mode. See store open log messages for the requested and final write policies.>
You might have the wrong Native IO libraries set. In my case, it being Solaris Intel, I assumed that in wlserver_10.3/server/native/solaris/x86 my native libraries for the x86 platform are present. Oops: x86 is Intel 32bits, x64 is the Intel 64bits. What happened is that the WebLogic Generic installer should have been run with the -d64 option, otherwise it installs a 32bits WebLogic, with the corresponding native libraries. A easy mistake for someone who is used to x86_64 Linux 🙂
- Install into a temp directory a new WebLogic, now starting the installer with java -d64 -jar <wls.jar>
- Copy the now available x64 native libraries to the corresponding location in your “real” WebLogic server
- Edit <middleware_home>/wlserver_10.3/common/bin/commEnv.sh and change
# Setup SUN_ARCH_DATA_MODEL SUN_ARCH_DATA_MODEL="64" #JAVA_USE_64BIT, true if JVM uses 64 bit operations JAVA_USE_64BIT=true
Now commEnv.sh will set the correct Native libraries and Native IO will be enabled. You can also force it (just to be sure) by editing <domain_home>/bin/startWeblogic.sh and add:
export LD_LIBRARY_PATH=<your middleware home>/wlserver_10.3/server/native/solaris/x64
This will bypass the uname -m checks in commEnv.sh and just sets the Native IO library path accordingly.