JDK-6681922 : rt.jar gets deleted after m/c restart
  • Type: Bug
  • Component: install
  • Sub-Component: install
  • Affected Version: 6u10
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_xp,windows_vista
  • CPU: x86
  • Submitted: 2008-03-31
  • Updated: 2010-09-17
  • Resolved: 2008-06-09
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6 JDK 7
6u10 b26Fixed 7Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
rt.jar gets deleted as part of completion process. ( b21 and b14 )
Install Kernel JRE.  do some action everything works fine.  During the completion process and after restart  ( might be completion process may be happening restart time )
when running Java Application  I am getting this error.
C:\Users\Pradeep>java -version
Error occurred during initialization of VM
java/lang/NoClassDefFoundError: java/lang/Object


The issue could be completion process - Here bundles  directory is removed , bin/kernel directory is removed,  rt.jar is removed.  But  the merged rt.jar is not copied to jre6/lib directory.  I have got this problem many a times on my desktop (Vista ) and I have seen this problem in jlab409.india.sun.com (vista) and  in a XP m/c.

This could be serious problem  but we dont know the exact step to reproduce this problem. 

This is not at all a consistent behavior.  Happens rarely. 

Here is the last log file from C:\Users\Pradeep\AppData\LocalLow\kerneljre1.6.0_10-bundles

Log opened
Checking for requested bundles...
Determining download URL...
System property kernel.download.url = null
getUrlFromRegistry = null
Final download URL: http://javadl.sun.com/webapps/download/GetList/1.6.0_10-b421-kernel/windows-i586/
Can't find resource_map, forcing complete to true
getBootClassPathEntryForResource(java/lang/System.class) == null

Comments
WORK AROUND The workaround/solution, if pending file rename entries exist for the jre installation directory after uninstall, is to reboot to cleanup the pending file rename operations. P.S. lib\bundles\tnp\merged-rt.jar would be located under C:\Program Files\Java\jre6\ on XP.
27-02-2009

SUGGESTED FIX Parse PendingFileRenameOperations value from registry, to detect when an entry matches the installation directory and stopping installation or patch-in-place with "Error 25025. A previous Java uninstallation was never completed. You need to restart your computer before installing Java." Added PendingFileRenameOperations to RegLocator.idt and AppSearch.idt so the registry entry is read and logged so we can tell the cause of the Error 25025 from a complete MSI log. testcase: http://oklahoma.east.sun.com/deployment/www/tests/1.6.0_10/testcase_6681922.txt webrev: http://sa.sfbay.sun.com/projects/deployment_data/6u10/6681922.0
28-05-2008

SUGGESTED FIX Read HKLM\SYSTEM\CurrentControlSet\Control\Session Manager, PendingFileRenameOperations, search data read for INSTALLDIR If found, block install with a new error message. Need to handle differences in case (C:\Progam Files\Java\jre6 and c:\program files\java\jre6) and shortnames vs longnames (C:\Progam Files\Java\jre6 and C:\PROGRA~1\JAVA\JRE6)
02-04-2008

EVALUATION removed "part of JRE completion process." from the synopsis since it does not require kernel to occur.
02-04-2008

EVALUATION This has likely been the behavior in all releases of Java. The fix should be to check the PendingFileRename key prior to installing, to make sure that files aren't going to get deleted after a reboot.
01-04-2008

EVALUATION Kernel performs the rt.jar replacement in two steps: 1) Delete lib/rt.jar 2) Move lib/bundles/tmp/merged-rt.jar to lib/rt.jar So if the Kernel completion got interrupted or otherwise didn't complete properly, you could potentially see a missing lib/rt.jar but a still-present lib/bundles/tmp/merged-rt.jar. The next JVM startup would then immediately attempt completion again (because the lib/bundles/tmp/finished file still exists). But the symptom you're seeing, of a missing lib/bundles plus a missing lib/rt.jar, doesn't make sense for Kerneel. Removing lib/bundles is the very last thing Kernel does. It would only remove lib/bundles if the rt.jar file had been successfully moved into place, and it would never remove lib/rt.jar after having already removed lib/bundles, since the trigger conditions are then gone. Chris suggested a plausble explanation for this: an uninstall notes some files being in use and marks them as delete-on-restart. You then continue to interact with the computer normally, installing a new Kernel JRE and so forth, without realizing the lurking danger. But when you eventually reboot the machine, the delete-on-restart time bomb goes off and lib/rt.jar is deleted, destroying your JRE. This explanation seems far more likely than it having to do with Kernel completion, especially since you specifically said it only happens after a reboot (reboots mean nothing to Kernel; it neither looks for them nor acts specially upon them). Reassigning to install team.
01-04-2008