JDK-6199712 : Java won't run if installed in clearcase filesystem: could not find libjava.so
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 1.4.2
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: linux
  • CPU: x86
  • Submitted: 2004-11-24
  • Updated: 2010-08-06
  • Resolved: 2005-07-15
Related Reports
Duplicate :  
Description
FULL PRODUCT VERSION :
java version "1.4.2_05"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04)
Java HotSpot(TM) Client VM (build 1.4.2_05-b04, mixed mode)
(Doesn't actually work in clearcase file system.)

ADDITIONAL OS VERSION INFORMATION :
Linux version 2.4.18-14 (###@###.###) (gcc version 3.2 20020903 (Red Hat Linux 8.0 3.2-7)) #1 Wed Sep 4 13:35:50 EDT 2002

EXTRA RELEVANT SYSTEM CONFIGURATION :
JDK installed of clearcase version control system :
ClearCase version 2002.05.00 (Wed Jan 30 13:23:18 EST 2002)
clearcase_p2002.05.00-12 (Wed Sep 11 11:15:54 EDT 2002)
clearcase_p2002.05.00-13 (Fri Sep 13 08:12:11 EDT 2002)
clearcase_p2002.05.00-15 (Tue Nov 12 10:47:50 EST 2002)
clearcase_p2002.05.00-17 (Mon Dec 30 09:43:19 EST 2002)
clearcase_p2002.05.00-18 (Fri Jan 24 08:00:05 EST 2003)
clearcase_p2002.05.00-19 (Fri Jan 24 14:15:33 EST 2003)
multisite_p2002.05.00-3 (Mon Nov 11 15:50:00 EST 2002)
multisite_p2002.05.00-4 (Wed Jan 22 12:01:46 EST 2003)
multisite_p2002.05.00-6 (Tue Apr 08 13:01:16 EDT 2003)
clearcase_p2002.05.00-21 (Mon Mar 17 16:12:44 EST 2003)
clearcase_p2002.05.00-22 (Fri Mar 21 11:02:06 EST 2003)
TEST_clearcase_p2002.05.00-25 (Wed Jul 23 16:13:22 EDT 2003)
@(#) MVFS version 2002.05.00 (Wed Jul  2 18:16:22 EDT 2003)
cleartool                         2002.05.00 (Tue Jan 22 01:13:53 EST 2002)
db_server                         2002.05.00+ (Sun Feb  2 05:54:15 EST 2003)
VOB database schema version: 53


A DESCRIPTION OF THE PROBLEM :
If jdk 1.4.2 is installed on a clearcase file system then running Java gives
Error: could not find libjava.so
Error: could not find Java 2 Runtime Environment.
using strace gives the output
readlink("/proc/self/exe", "/.automount/vob/root/vobstore/linux/java/c/cdft/1/6/ef9c59fcf80d11d881490002b3956847", 4095) = 84
write(2, "Error: could not find libjava.so"..., 33Error: could not find libjava.so
) = 33
write(2, "Error: could not find Java 2 Run"..., 50Error: could not find Java 2 Runtime Environment.
) = 50
_exit(2)

on a normal filesystem this is

readlink("/proc/self/exe", "/usr/java/j2sdk1.4.2_05/jre/bin/java", 4095) = 36
access("/usr/java/j2sdk1.4.2_05/jre/lib/i386/libjava.so", F_OK) = 0
open("/usr/java/j2sdk1.4.2_05/jre/lib/i386/jvm.cfg", O_RDONLY) = 3

It would appear that the clearcase filesystem reads a symlink using readlink that the java application doesn't recognise.
The readlink mechanism is not used in 1.4.0.


STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Install jdk 1.4.2 on a clearcase system.
run java

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
java to work as normal and not give any errors.

messages.
ACTUAL -
Error: could not find libjava.so
Error: could not find Java 2 Runtime Environment.


ERROR MESSAGES/STACK TRACES THAT OCCUR :
Error: could not find libjava.so
Error: could not find Java 2 Runtime Environment.


REPRODUCIBILITY :
This bug can be reproduced always.

CUSTOMER SUBMITTED WORKAROUND :
Don't install java on clearcase filesystem.


Comments
EVALUATION This looks more like an issue with the launcher than with the installer. The user mentions an issue with the way 'readlink' is being used. Also, the error messages the user mentions are both in j2se/src/solaris/bin/java_md.c, lines 648 and 302. I'm re-assigning this to the runtime team. ###@###.### 2005-06-03 21:27:18 GMT
03-06-2005