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 236251 - Create new Maven project w/clean userdir & cachedir--Downloading Archetype stuck
Summary: Create new Maven project w/clean userdir & cachedir--Downloading Archetype stuck
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Progress (show other bugs)
Version: 7.4
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Jan Peska
URL:
Keywords:
Depends on:
Blocks: 241656
  Show dependency tree
 
Reported: 2013-09-23 03:05 UTC by MackSix
Modified: 2015-09-17 16:58 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
log file (39.62 KB, text/plain)
2013-09-23 03:05 UTC, MackSix
Details

Note You need to log in before you can comment on or make changes to this bug.
Description MackSix 2013-09-23 03:05:38 UTC
Created attachment 140359 [details]
log file

1. Install NetBeans 7.4 RC1 or delete userdir and cachedir.
2. Create new Maven POM project.
3. Downloading Archetype is stuck and won't go away.

First time I restarted NetBeans and it still happened when I created another new project. After that, every time I delete the userdir and cachedir, this happens first time but works after the first restart.


Product Version: NetBeans IDE 7.4 RC1 (Build 201309162201)
Java: 1.8.0-ea; Java HotSpot(TM) 64-Bit Server VM 25.0-b50
Runtime: Java(TM) SE Runtime Environment 1.8.0-ea-b108
Comment 1 Milos Kleint 2013-09-23 09:59:38 UTC
Downloading Archetype apparently covers indexing the local repository the first time around. We add the archetype to local repo to be able to find it in the list of all archetypes. But I think in  7.4 (or 7.3) the list of archetypes from index was replaced by list of archetypes from archetype-catalog.xml files. (in local/remote repository roots)

http://hg.netbeans.org/core-main/rev/f1801de319ee
indexing is skipped when there is no index is present during deleteArtifact() and updateArtifact() calls. 

still a bit curious why this is happening as the code is still almost the same as when issue 154913 was fixed.
Comment 2 Tomas Danek 2013-11-06 09:11:54 UTC
verified in

Product Version: NetBeans IDE 7.4 (Build 201310111528)
Java: 1.7.0_45; Java HotSpot(TM) 64-Bit Server VM 24.45-b08
Runtime: Java(TM) SE Runtime Environment 1.7.0_45-b18
System: Mac OS X version 10.9 running on x86_64; UTF-8; en_US (nb)
User directory: /Users/tomas/Library/Application Support/NetBeans/7.4
Cache directory: /Users/tomas/Library/Caches/NetBeans/7.4
Comment 3 Tomas Danek 2013-11-06 09:57:15 UTC
Unfortunately, this seem to still randomly occur, even if initial indexing of local repo does not happen.
Comment 4 Milos Kleint 2013-11-06 10:14:19 UTC
(In reply to Tomas Danek from comment #3)
> Unfortunately, this seem to still randomly occur, even if initial indexing
> of local repo does not happen.

can you be more specific here?

we skip the update of index when we believe that the index is not there yet.                     

if (!loc.exists() || !new File(loc, "timestamp").exists() || !IndexReader.indexExists(new SimpleFSDirectory(loc))) {

I can imagine scenarios when there's a false positive however even in that case we only supposed to add the artifacts related to current build.
Comment 5 Milos Kleint 2013-11-06 11:43:39 UTC
it's not actually random.
1. the downloading task is triggered when maven coordinates panel is used. depending on how long you stay in that panel, the progress bar will either be shown or not.
2. the indexing of the archetype was correctly skipped the first time (on each IDE startup) but later on it went on, could have been eventually delayed by the indexing going on through other means.

not a patch candidate after all, fix will be more complex.
Comment 7 Milos Kleint 2014-02-13 10:29:12 UTC
http://hg.netbeans.org/core-main/rev/1f233e7a4a93 attempt to prevent duplicate finish calls one way, the other way is still open and causes stuck progress bars. I've reverted the workaround due to issue 241656 and passing on to progress for evaluation
Comment 8 Quality Engineering 2014-02-14 02:51:59 UTC
Integrated into 'main-silver', will be available in build *201402140001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/1f233e7a4a93
User: Milos Kleint <mkleint@netbeans.org>
Log: #236251 more attempts to tackle the stuck progress bar
Comment 9 SIvakin 2014-02-16 14:32:44 UTC
I have the same problem on JDK 7.51 and Windows XP SP3 32 bit.
Comment 10 SIvakin 2014-03-08 17:23:39 UTC
Still present in 8.0 FCS.
Comment 11 MackSix 2015-09-17 16:58:09 UTC
Problem seems to have been fixed in:

Product Version: NetBeans IDE 8.0.2 (Build 201411181905)
Updates: NetBeans IDE is updated to version NetBeans 8.0.2 Patch 2
Java: 1.8.0_60; Java HotSpot(TM) 64-Bit Server VM 25.60-b23
Runtime: Java(TM) SE Runtime Environment 1.8.0_60-b27

and

Product Version: NetBeans IDE Dev (Build 201509170002)
Java: 1.8.0_60; Java HotSpot(TM) 64-Bit Server VM 25.60-b23
Runtime: Java(TM) SE Runtime Environment 1.8.0_60-b27
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)