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.
I'm seeing frequently OOM errors that I presume are related to Maven operations (also after looking at the log). One happened while NetBeans was reindexing the local Maven repo, another while I was performing a query about a Maven artifact. The memory monitor shows that all the 512MB of RAM are allocated. SEVERE [org.openide.util.RequestProcessor] java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Arrays.java:2786) at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:94) at org.apache.lucene.index.FieldsReader.uncompress(FieldsReader.java:583) at org.apache.lucene.index.FieldsReader.addField(FieldsReader.java:350) at org.apache.lucene.index.FieldsReader.doc(FieldsReader.java:197) at org.apache.lucene.index.SegmentReader.document(SegmentReader.java:733) at org.apache.lucene.index.IndexReader.document(IndexReader.java:637) at org.apache.lucene.search.IndexSearcher.doc(IndexSearcher.java:91) at org.apache.lucene.search.Hits.doc(Hits.java:180) at org.sonatype.nexus.index.DefaultSearchEngine.searchFlat(DefaultSearchEngine.java:136) at org.sonatype.nexus.index.DefaultSearchEngine.searchFlatPaged(DefaultSearchEngine.java:76) at org.netbeans.modules.maven.indexer.NexusRepositoryIndexerImpl.repeatedFlatSearch(NexusRepositoryIndexerImpl.java:338) at org.netbeans.modules.maven.indexer.NexusRepositoryIndexerImpl.access$1400(NexusRepositoryIndexerImpl.java:137) at org.netbeans.modules.maven.indexer.NexusRepositoryIndexerImpl$17.run(NexusRepositoryIndexerImpl.java:977) at org.netbeans.modules.maven.indexer.NexusRepositoryIndexerImpl$17.run(NexusRepositoryIndexerImpl.java:945) at org.openide.util.Mutex.writeAccess(Mutex.java:433) at org.netbeans.modules.maven.indexer.NexusRepositoryIndexerImpl.find(NexusRepositoryIndexerImpl.java:945) at org.netbeans.modules.maven.indexer.api.RepositoryQueries.find(RepositoryQueries.java:349) [catch] at org.netbeans.modules.maven.nodes.AddDependencyPanel$QueryPanel$1.run(AddDependencyPanel.java:893) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:602) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1084) WARNING [org.netbeans.core.TimableEventQueue]: too much time in AWT thread null WARNING [org.netbeans.core.TimableEventQueue]: too much time in AWT thread org.netbeans.modules.profiler.actions.SelfSamplerAction$Controller@52925f6d
(with 6.8beta).
I'm also seeing OutOfMemoryError errors when indexing the local repo.
The problem I'm seeing is that on a non-trivial local repository, the heap space starts growing almost as soon as the indexing starts and continues growing until it hits the maximum heap size. Shortly after that the out of memory error occurs. While this is happening the IDE is unusable. I dug into the problem and found that the problem is related to the code in NexusRepositoryIndexerImpl.NbIndexCreator. I think the problem is directly related to creating a MavenProject for every artifact. If I comment out this code, heap memory utilization is normal and indexing completes without error. Looking at the heap dump, it looks like the problem may be in Maven. On the other hand, I don't know if the code in NbIndexCreator is using Maven correctly.
Also, I see this problem in 6.8 and later, including current source builds.
I would suggest just dumping the NexusRepositoryIndexerImpl.NbIndexCreator. it's only used by the "find where my artifact is used as dependency" query and indeed does have some performance overhead.
Fixed in 6.9 as issue 185080. *** This bug has been marked as a duplicate of bug 185080 ***