This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 169293 - New updater.jar is not installed on the first IDE restart
Summary: New updater.jar is not installed on the first IDE restart
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Launchers&CLI (show other bugs)
Version: 6.x
Hardware: All Windows XP
: P1 blocker (vote)
Assignee: t_h
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-28 10:03 UTC by dlipin
Modified: 2009-09-24 12:30 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
first IDE start "--trace" log (80.05 KB, text/plain)
2009-07-28 10:04 UTC, dlipin
Details
second IDE start "--trace" log (27.27 KB, text/plain)
2009-07-28 10:05 UTC, dlipin
Details
autoupdate.services/1.13 nbm (303.14 KB, application/octet-stream)
2009-09-22 10:34 UTC, dlipin
Details
bin/netbeans.exe --trace C:\trace.log (71.18 KB, text/plain)
2009-09-22 10:35 UTC, dlipin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dlipin 2009-07-28 10:03:47 UTC
To reproduce:
1. install full NB 6.7, run it with "--trace out.txt"
2. wait for updates notification, accept 2 updates, install them
3. restart IDE

Check the out.txt. It contains the following lines:

checkForNewUpdater() at C:\Program Files\NetBeans 6.7\platform10
New updater found: C:\Program Files\NetBeans 6.7\platform10\update\new_updater\updater.jar
Creating directory "C:\Program Files\NetBeans 6.7\platform10\modules\ext\updater.jar"
Failed to move "C:\Program Files\NetBeans 6.7\platform10\update\new_updater\updater.jar" to "C:\Program Files\NetBeans 
6.7\platform10\modules\ext\updater.jar" Access is denied. (5)

As the result the new updater is not installed this time.
The file "C:\Program Files\NetBeans 6.7\platform10\update\new_updater\updater.jar" exists after that and it is newer 
than "C:\Program Files\NetBeans 6.7\platform10\modules\ext\updater.jar".

It definitely results in not fixing the Issue 168937. Likely 169289 and 169212 are due to this issue as well.

The good thing is that the updater is nevertheless installed on the next IDE start (attaching out2.txt as well).
Comment 1 dlipin 2009-07-28 10:04:53 UTC
Created attachment 85302 [details]
first IDE start "--trace" log
Comment 2 dlipin 2009-07-28 10:05:43 UTC
Created attachment 85303 [details]
second IDE start "--trace" log
Comment 3 t_h 2009-07-28 12:50:40 UTC
The reason for this issue is that updater.jar is still loaded in memory by current process (after JVM exit) and
therefore cannot be replaced (by the same process). Possible workaround is to run java in separate process (--fork-java
command line option). Issue #169289 is not connected to this one (1st - it is reported on Solaris, 2nd - on Windows new
updater is just renamed so either it succeeds and new updater is present or it fails and old one remains in its place -
as did in this issue). The result of this issue is just old updater is replaced little bit later (on next start),
otherwise it should not make other problems so I think there is no connection with issue #169212 as well.
Comment 4 t_h 2009-07-28 12:58:27 UTC
core-main #42e3afb95aee
Comment 5 Antonin Nebuzelsky 2009-07-28 13:55:25 UTC
Fixed in the trunk (6.8).

It does not make sense to backport the fix to 6.7(.1) because this fix in launcher would not get applied before launcher
tries to patch updater.jar.
Comment 6 Marian Mirilovic 2009-07-28 14:09:53 UTC
> It does not make sense to backport the fix to 6.7(.1)
ok documented not for Patches, but what about 6.7.2 ? .... just in case ;)
Comment 7 Antonin Nebuzelsky 2009-07-28 15:08:39 UTC
> what about 6.7.2 ?

Yes, for 6.7.2 delivered via installers this fix would make sense.
Comment 8 Quality Engineering 2009-07-29 05:58:19 UTC
Integrated into 'main-golden', will be available in build *200907290201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/42e3afb95aee
User: Tomas Holy <t_h@netbeans.org>
Log: #169293: New updater.jar is not installed on the first IDE restart
Comment 9 dlipin 2009-09-22 10:34:03 UTC
That still does not work in the latest daily builds.
Steps to reproduce:
1) Run any latest daily build (<=2009-09-22_02-01-00)
2) Install attached NBM (autoupdate.services/1.13), restart
3) After restart updater.jar is still available in new_updater directory and platform11/modules/ext/updater.jar is old
The worst thing is that it is not even updated on the further IDE starts/restarts.

The same happens if I choose "restart later" at the last installation panel and then just close the IDE. The subsequent 
IDE starts does not update the updater.jar.

Sample trace.log (--trace trace.log) attached.
Comment 10 dlipin 2009-09-22 10:34:58 UTC
Created attachment 88088 [details]
autoupdate.services/1.13 nbm
Comment 11 dlipin 2009-09-22 10:35:23 UTC
Created attachment 88089 [details]
bin/netbeans.exe --trace C:\trace.log
Comment 12 t_h 2009-09-22 13:00:37 UTC
Works for me. Are you sure netbeans\platform11\modules\ext\updater.jar was not held by some other process? Maybe another
netbeans instance?
Comment 13 dlipin 2009-09-22 13:45:28 UTC
Maybe... I`ve tried to reproduce it again after system restart and I failed.
Comment 14 t_h 2009-09-22 15:26:17 UTC
Trying to wait for short time to avoid theoretical possibility that previous NB instance did not finished before updater
update: core-main #7da95c34fdeb.
Comment 15 Quality Engineering 2009-09-24 12:30:54 UTC
Integrated into 'main-golden', will be available in build *200909230201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/7da95c34fdeb
User: Tomas Holy <t_h@netbeans.org>
Log: #169293: New updater.jar is not installed on the first IDE restart