United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6719502 NullPointerException while uninstalling appln from system cache and the user cache is readonly
JDK-6719502 : NullPointerException while uninstalling appln from system cache and the user cache is readonly

Details
Type:
Bug
Submit Date:
2008-06-26
Status:
Closed
Updated Date:
2010-09-26
Project Name:
JDK
Resolved Date:
2009-05-17
Component:
deploy
OS:
windows
Sub-Component:
webstart
CPU:
x86
Priority:
P3
Resolution:
Fixed
Affected Versions:
6u10
Fixed Versions:
6u14 (b01)

Related Reports
Backport:

Sub Tasks

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
                                     
2008-11-14



Hardware and Software, Engineered to Work Together