Bug 72102 - AutoUpdate doesn't work after uninstall of module that provides its own AUC
AutoUpdate doesn't work after uninstall of module that provides its own AUC
Status: VERIFIED FIXED
Product: platform
Classification: Unclassified
Component: Autoupdate
5.x
All All
: P2 (vote)
: 5.x
Assigned To: Jiri Rechtacek
issues@platform
5.5_fix
: RELNOTE
: 72348 72501 72632 73191 73506 73903 74652 77682 79309 82962 83172 89128 95498 103953 (view as bug list)
Depends on:
Blocks: 72435
  Show dependency treegraph
 
Reported: 2006-02-01 07:19 UTC by Lukas Hasik
Modified: 2007-05-15 09:20 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
messages.log - looong (300.87 KB, text/plain)
2006-02-01 07:20 UTC, Lukas Hasik
Details
NPE when updatecenters module uninstalled (16.12 KB, text/plain)
2006-02-01 09:36 UTC, Adam Sotona
Details
a patch applicable in NB5.0/NB5.5 (6.91 KB, patch)
2006-03-02 14:37 UTC, Jiri Rechtacek
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lukas Hasik 2006-02-01 07:19:50 UTC
5.0 fcs build

-uninstall mobility pack 
-restart IDE
-open Tools | Update Center
-exceptions appeared

java.lang.NullPointerException
	at
org.netbeans.modules.autoupdate.XMLAutoupdateType.getDefaultURL(XMLAutoupdateType.java:326)

and 

Annotation: Missing resource from class:
org.netbeans.modules.kjava.j2meplatform.catalog.Bundle
java.util.MissingResourceException: No such bundle
org.netbeans.modules.kjava.j2meplatform.catalog.Bundle
	at org.openide.util.NbBundle.getBundle(NbBundle.java:417)

full stacktrace is available in attachment
Comment 1 Lukas Hasik 2006-02-01 07:20:54 UTC
Created attachment 28688 [details]
messages.log - looong
Comment 2 Lukas Hasik 2006-02-01 07:56:24 UTC
there is easy work around for this issue

-Go to Tools | Options
-switch to Advanced Options
-collapse IDE Configuration | System | AutoUpdate Types
-right click Java ME Platform SDK Catalog and Delete it
-restart NetBeans

-Update Center works again
Comment 3 Adam Sotona 2006-02-01 09:35:16 UTC
The same happens when uninstalling any module providing update center - for
example org.netbeans.modules.updatecenters module
Comment 4 Adam Sotona 2006-02-01 09:36:54 UTC
Created attachment 28690 [details]
NPE when updatecenters module uninstalled
Comment 5 Marian Mirilovic 2006-02-01 13:39:33 UTC
Too serious, it has to be fixed for NB.next
Comment 6 Lukas Hasik 2006-02-01 13:46:59 UTC
changed Summary to be more generic. It appears after uninstall of any module
that provided AutoUpdate Center to IDE
Comment 7 Jiri Rechtacek 2006-02-01 14:11:04 UTC
Worksforme with NB5.0 RC2 if install/uninstall/restart IDE with Extra Update
Centers module. Reproducible with NetBeans Update Centers module (which is a
eager module and it's crucial maybe).
Lukas, Adam, on what kind of module did you found this problem? Eager? Normal?
Comment 8 Jiri Rechtacek 2006-02-01 15:16:06 UTC
Worksforme with nbextras module on NB5.0 FCS.
Problems appears when an user uninstall some eager module, a eager module isn't
correctly deleted from SFS cache. IMHO I can decrease the priority.

Jesse, core/startup/ModuleList.stepDelete() cannot handle deletion of enabled
eager module. Should be fixed in module system or should be restricted Uninstall
of this kind of modules?
Comment 9 Jiri Rechtacek 2006-02-01 15:17:10 UTC
Jesse, core/startup/ModuleList.stepDelete() cannot handle deletion of enabled
eager module. Should be fixed in module system or should be restricted Uninstall
of this kind of modules?
Comment 10 Jesse Glick 2006-02-01 15:48:20 UTC
"Should be fixed in module system or should be restricted Uninstall of this kind
of modules?" - both (in the opposite order). It is not currently possible to
delete an eager module while NB is running; would require changes in core of
module system to support it. So Module Manager should not offer the possibility
until that is done.
Comment 11 Marian Mirilovic 2006-02-07 16:02:49 UTC
*** Issue 72348 has been marked as a duplicate of this issue. ***
Comment 12 Jiri Rechtacek 2006-02-13 18:18:13 UTC
*** Issue 72501 has been marked as a duplicate of this issue. ***
Comment 13 Jiri Rechtacek 2006-02-13 18:21:47 UTC
*** Issue 72501 has been marked as a duplicate of this issue. ***
Comment 14 Jiri Rechtacek 2006-02-14 08:53:20 UTC
*** Issue 72632 has been marked as a duplicate of this issue. ***
Comment 15 Jiri Rechtacek 2006-02-24 09:50:24 UTC
Evaluation
==========
How to reproduce (w/ mobility and also generally):
1. install Mobility pack via installer / add a module which declares Update Center
2. connect the Update Center what declared above
3.A uninstall Mobility pack via uninstaller (btw. IDE is not running while
uninstalling)
3.B uninstall Mobility pack via Module Manager (btw. IDE is running),
in general: remove the module which declares UC from installation
4. restart IDE
5. open Update Center Wizard or Options|Advanced options|Autoupdate Type
==> NPE is always thrown XMLAutoupdateType.getDefaultURL

What's problem?
The most important step to reproduction is "2. connect the Update Center" Why?
Because when AutoUpdate successfully done connection then writes into
AutoupdateType a timestamp of this connection. But this change of AutoupdateType
setting is *put into userdir*. None of uninstallation can remove this record
from userdir. AutoupdateType setting contains path to localizing bundle, a path
is invalid if it's a abandoned setting of removed module.

Conclusion: It's means it's a general problem which can appear always when
removing a module which writes any settings into userdir. Not a problem of
Module Manager, not a direct problem of Autoupdate code.

Workaround:
Remove the broken setting via Options|Advanced options|Autoupdate Types. However
an user have to ignore thrown exceptions when removing this setting. Of course,
an user can also delete userdir and start IDE w/ fresh dir.
Comment 16 Jesse Glick 2006-02-24 17:48:49 UTC
It is certainly a problem of the autoupdate module. The fact that we have a poor
settings system is unfortunate but it is working as designed. autoupdate is at
fault for storing transient information such as a last-connect time into
AutoupdateType. It should keep this information somewhere else, e.g. in a
SystemOption as e.g. a Map<String,Date> where the key is the AuT .settings
file's getPath() in the system filesystem.
Comment 17 Jesse Glick 2006-02-24 17:49:38 UTC
Honzo note: another place where using Preferences would have avoided the bug to
begin with...
Comment 18 Jan Chalupa 2006-02-24 17:58:26 UTC
I know. We gotta do it.
Comment 19 Jiri Rechtacek 2006-03-02 14:36:43 UTC
Hotfix of this problem was integrated in main trunk. This hotfix is applicable
in NB5.5
To NB6.0 should be the Autoupdate settings handled better, tracked as issue 73180.


Checking in autoupdate/src/org/netbeans/modules/autoupdate/AutoupdateType.java;
/shared/data/ccvs/repository/autoupdate/src/org/netbeans/modules/autoupdate/AutoupdateType.java,v
 <--  AutoupdateType.java
new revision: 1.18; previous revision: 1.17
done
Checking in autoupdate/src/org/netbeans/modules/autoupdate/Bundle.properties;
/shared/data/ccvs/repository/autoupdate/src/org/netbeans/modules/autoupdate/Bundle.properties,v
 <--  Bundle.properties
new revision: 1.173; previous revision: 1.172
done
Checking in autoupdate/src/org/netbeans/modules/autoupdate/XMLAutoupdateType.java;
/shared/data/ccvs/repository/autoupdate/src/org/netbeans/modules/autoupdate/XMLAutoupdateType.java,v
 <--  XMLAutoupdateType.java
new revision: 1.41; previous revision: 1.40
done
Comment 20 Jiri Rechtacek 2006-03-02 14:37:44 UTC
Created attachment 29097 [details]
a patch applicable in NB5.0/NB5.5
Comment 21 Jesse Glick 2006-03-02 18:19:35 UTC
Isn't the bundle key CTL_QuantumAutoupdateType_Name now unreferenced?
Comment 22 Jiri Rechtacek 2006-03-03 10:51:57 UTC
*** Issue 73191 has been marked as a duplicate of this issue. ***
Comment 23 Jiri Rechtacek 2006-03-13 13:50:02 UTC
*** Issue 73506 has been marked as a duplicate of this issue. ***
Comment 24 Jaroslav Tulach 2006-03-22 14:19:47 UTC
Would not a small, little, simple test better than nothing? Otherwise ok, this 
is the safest direction to fix the problem compatibly.
Comment 25 Jiri Rechtacek 2006-03-23 07:35:19 UTC
*** Issue 73903 has been marked as a duplicate of this issue. ***
Comment 26 Jiri Rechtacek 2006-03-27 08:54:47 UTC
Backport in release55 branch.

Checking in autoupdate/src/org/netbeans/modules/autoupdate/AutoupdateType.java;
/shared/data/ccvs/repository/autoupdate/src/org/netbeans/modules/autoupdate/AutoupdateType.java,v
 <--  AutoupdateType.java
new revision: 1.17.50.1; previous revision: 1.17
done
Checking in autoupdate/src/org/netbeans/modules/autoupdate/Bundle.properties;
/shared/data/ccvs/repository/autoupdate/src/org/netbeans/modules/autoupdate/Bundle.properties,v
 <--  Bundle.properties
new revision: 1.158.2.3.2.1; previous revision: 1.158.2.3
done
Checking in autoupdate/src/org/netbeans/modules/autoupdate/XMLAutoupdateType.java;
/shared/data/ccvs/repository/autoupdate/src/org/netbeans/modules/autoupdate/XMLAutoupdateType.java,v
 <--  XMLAutoupdateType.java
new revision: 1.32.6.2.2.2; previous revision: 1.32.6.2.2.1
done
Comment 27 Marian Mirilovic 2006-04-03 13:45:57 UTC
Lukas,
could you please verify this ? Thanks in advance.
Comment 28 Lukas Hasik 2006-04-03 16:51:18 UTC
seems to be fixed. Tested with nb trunk 060402 + mobility 060403 on linux machine.
I'll mark it verified later when I'll test it on windows.
Comment 29 Jiri Prox 2006-04-10 12:08:47 UTC
*** Issue 74652 has been marked as a duplicate of this issue. ***
Comment 30 Lukas Hasik 2006-04-28 09:48:31 UTC
verified in release55 branch
Comment 31 Jiri Rechtacek 2006-06-12 12:18:30 UTC
*** Issue 77682 has been marked as a duplicate of this issue. ***
Comment 32 Jiri Rechtacek 2006-06-28 09:47:07 UTC
*** Issue 79309 has been marked as a duplicate of this issue. ***
Comment 33 Jiri Rechtacek 2006-08-18 08:48:50 UTC
*** Issue 82962 has been marked as a duplicate of this issue. ***
Comment 34 Jiri Rechtacek 2006-08-22 14:46:33 UTC
*** Issue 83172 has been marked as a duplicate of this issue. ***
Comment 35 Jiri Rechtacek 2006-12-13 16:55:10 UTC
*** Issue 89128 has been marked as a duplicate of this issue. ***
Comment 36 Jiri Rechtacek 2007-02-14 06:49:48 UTC
*** Issue 95498 has been marked as a duplicate of this issue. ***
Comment 37 Jiri Rechtacek 2007-05-15 09:20:06 UTC
*** Issue 103953 has been marked as a duplicate of this issue. ***


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo