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 145775 - java.util.NoSuchElementException at java.util.HashMap$HashIterator.nextEntry
Summary: java.util.NoSuchElementException at java.util.HashMap$HashIterator.nextEntry
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Filesystems (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Jiri Skrivanek
URL: http://statistics.netbeans.org/except...
Keywords: JDK_SPECIFIC
: 167588 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-09-01 10:09 UTC by Tomasz Slota
Modified: 2011-06-09 09:54 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 60078


Attachments
stacktrace (2.27 KB, text/plain)
2008-09-01 10:10 UTC, Tomasz Slota
Details
stacktrace (2.27 KB, text/plain)
2008-09-02 00:15 UTC, davisn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tomasz Slota 2008-09-01 10:09:58 UTC
Build: NetBeans IDE Dev (Build 080901)
VM: Java HotSpot(TM) Client VM, 1.5.0_13-119, Java(TM) 2 Runtime Environment, Standard Edition, 1.5.0_13-b05-237
OS: Mac OS X, 10.5.4, i386

User Comments: 
used "Resolve missing server problem" action on a web project from issue 141287 and chose GF2

Stacktrace: 
java.util.NoSuchElementException
        at java.util.HashMap$HashIterator.nextEntry(HashMap.java:844)
        at java.util.HashMap$ValueIterator.next(HashMap.java:871)
        at java.util.AbstractCollection.toArray(AbstractCollection.java:176)
        at org.netbeans.core.startup.layers.BinaryFS$BFSFolder.getChildren(BinaryFS.java:838)
        at org.openide.filesystems.MultiFileObject.list(MultiFileObject.java:408)
        at org.openide.filesystems.AbstractFolder.getNewChildren(AbstractFolder.java:867)
Comment 1 Tomasz Slota 2008-09-01 10:10:09 UTC
Created attachment 68771 [details]
stacktrace
Comment 2 davisn 2008-09-02 00:15:03 UTC
Build: NetBeans IDE Dev (Build 200808311401)
VM: Java HotSpot(TM) Client VM, 1.5.0_14-b03, Java(TM) 2 Runtime Environment, Standard Edition, 1.5.0_14-b03
OS: Windows XP, 5.1, x86

User Comments: 


Stacktrace: 
java.util.NoSuchElementException
        at java.util.HashMap$HashIterator.nextEntry(HashMap.java:844)
        at java.util.HashMap$ValueIterator.next(HashMap.java:871)
        at java.util.AbstractCollection.toArray(AbstractCollection.java:176)
        at org.netbeans.core.startup.layers.BinaryFS$BFSFolder.getChildren(BinaryFS.java:838)
        at org.openide.filesystems.MultiFileObject.list(MultiFileObject.java:408)
        at org.openide.filesystems.AbstractFolder.getNewChildren(AbstractFolder.java:867)
Comment 3 davisn 2008-09-02 00:15:14 UTC
Created attachment 68820 [details]
stacktrace
Comment 4 Jiri Skrivanek 2008-09-02 09:56:28 UTC
It is JDK bug 6377302 and it is fixed in JDK1.6.0. Maybe it is possible to workaround it somehow.
Comment 5 Jiri Skrivanek 2008-09-05 10:04:43 UTC
Added workaround to core.startup/src/org/netbeans/core/startup/layers/BinaryFS.java.

http://hg.netbeans.org/core-main/rev/c20dae926627
Comment 6 Quality Engineering 2008-09-06 17:34:27 UTC
Integrated into 'main-golden', will be available in build *200809061401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/c20dae926627
User: Jiri Skrivanek <jskrivanek@netbeans.org>
Log: #145775 - workaround of JDK 1.5 bug 6377302 (toArray is not thread safe).
Comment 7 Jaroslav Tulach 2009-06-25 08:47:27 UTC
*** Issue 167588 has been marked as a duplicate of this issue. ***
Comment 8 Jaroslav Tulach 2009-06-25 08:48:03 UTC
The fix is not correct and caused 

java.util.ConcurrentModificationException
	at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
	at java.util.HashMap$ValueIterator.next(HashMap.java:822)
	at org.netbeans.core.startup.layers.BinaryFS$BFSFolder.getChildren(BinaryFS.java:890)
	at org.openide.filesystems.MultiFileObject.list(MultiFileObject.java:411)
Comment 9 Jaroslav Tulach 2009-06-25 08:48:30 UTC
Duplicate was P2.
Comment 10 Jiri Skrivanek 2009-06-25 11:57:14 UTC
Fixed.
core-main #26c8ad46f624
Comment 11 Quality Engineering 2009-06-26 20:46:06 UTC
Integrated into 'main-golden', will be available in build *200906261401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/26c8ad46f624
User: Jiri Skrivanek <jskrivanek@netbeans.org>
Log: #145775 - Synchronize childrenMap to prevent ConcurrentModificationException.
Comment 12 Marian Mirilovic 2011-06-09 09:54:29 UTC
v/c