JDK-6719502 : NullPointerException while uninstalling appln from system cache and the user cache is readonly
  • Type: Bug
  • Component: deploy
  • Sub-Component: webstart
  • Affected Version: 6u10
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: windows
  • CPU: x86
  • Submitted: 2008-06-26
  • Updated: 2010-09-26
  • Resolved: 2009-05-17
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
6u14 b01Fixed 7Fixed
Description
NullPointerException while uninstalling appln from system cache and the user cache is configured to the directory which is not writable

Tested build : 6U10 b27 PIT
Tested OS : windows

->  Install jre
->  Clear user cache and system cache
->  Enable System cache
->  Launch Java Control Panel
->  Click "Settings..."
->  Enter a path for user cache location, which does not have write permission
->  Save the changes and close JCP
->  Launch a JNLP Application using system cache
(javaws -system http://java.sun.com/products/javawebstart/apps/notepad.jnlp)
notepad appln launched successfully
->  try to uninstall notepad appln from system cache using javaws -system -uninstall
or
javaws -system -uninstall http://java.sun.com/products/javawebstart/apps/notepad.jnlp

Unable to uninstall application dialog came up. clicking Details button show the NullPointerException :

Unexpected exception: java.lang.NullPointerException
java.lang.NullPointerException
        at com.sun.deploy.cache.Cache.removeAllCacheEntries(Unknown Source)
        at com.sun.javaws.CacheUtil.removeEntries(Unknown Source)
        at com.sun.javaws.CacheUtil.remove(Unknown Source)
        at com.sun.javaws.CacheUtil.remove(Unknown Source)
        at com.sun.javaws.CacheUtil.remove(Unknown Source)
        at com.sun.javaws.Main.uninstallAll(Unknown Source)
        at com.sun.javaws.Main.uninstall(Unknown Source)
        at com.sun.javaws.Main.uninstallCache(Unknown Source)
        at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
        at com.sun.javaws.Main$1.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

Image file attached

Comments
EVALUATION Cache.removeAllCacheEntries(CacheEntry ce) first removes the given entry - then looks in the userCache to remove all equal entries. It needs to check if it is in systemCache mode, and in that case look in the sysCache, instead of the userCache. This is an easy fix - but it is not a regression or a high priority bug, so postponing till later release
14-11-2008