/usr/lib/jvm VS /lib/jvm under overlayfs.
Attached is an strace that shows /lib/jvm as the location used to find libjli.so.
java: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directory
# This fixed the issue.
arcadia:~# ln -s /usr/lib/jvm /lib
arcadia:~# dpkg -S /lib/jvm /usr/lib/jvm
dpkg-query: no path found matching pattern /lib/jvm.
openjdk-7-jre-lib, openjdk-7-jre, icedtea-
After reading the first few lines of the strace, I realised the issue. /proc/self/exe CAN NOT be used to lookup what file is being run, because not every file-system supports it properly. For that you must at least fall back to using inode and device numbers.
DistroRelease: Ubuntu 12.04
Package: openjdk-7-jre 7~u3-2.
Uname: Linux 3.2.0-23-
Date: Sat Jul 21 17:29:43 2012
UpgradeStatus: Upgraded to precise on 2012-01-03 (200 days ago)
- /usr/lib/jvm VS /lib/jvm
+ /usr/lib/jvm VS /lib/jvm under overlayfs.