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 194767 - NullPointerException at org.netbeans.modules.maven.indexer.NexusRepositoryIndexerImpl$NotifyingIndexCreator.updateDocument
Summary: NullPointerException at org.netbeans.modules.maven.indexer.NexusRepositoryInd...
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 7.0
Hardware: All All
: P3 normal (vote)
Assignee: Jesse Glick
URL:
Keywords: RANDOM
: 194404 194713 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-01-27 11:04 UTC by Tomas Danek
Modified: 2011-03-11 15:44 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 176202


Attachments
stacktrace (5.76 KB, text/plain)
2011-01-27 11:04 UTC, Tomas Danek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Danek 2011-01-27 11:04:39 UTC
Build: NetBeans IDE Dev (Build 201101270001)
VM: Java HotSpot(TM) 64-Bit Server VM, 17.1-b03-307, Java(TM) SE Runtime Environment, 1.6.0_22-b04-307-10M3261
OS: Mac OS X

User Comments:
musilt2: updating index. In this build should be already new lucerne and maven indexer.




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.modules.maven.indexer.NexusRepositoryIndexerImpl$NotifyingIndexCreator.updateDocument(NexusRepositoryIndexerImpl.java:550)
   at org.apache.maven.index.context.IndexUtils.updateDocument(IndexUtils.java:157)
   at org.apache.maven.index.context.IndexUtils.updateDocument(IndexUtils.java:129)
   at org.apache.maven.index.updater.DefaultIndexUpdater.copyUpdatedDocuments(DefaultIndexUpdater.java:343)
   at org.apache.maven.index.updater.DefaultIndexUpdater.unpackIndexArchive(DefaultIndexUpdater.java:272)
   at org.apache.maven.index.updater.DefaultIndexUpdater.loadIndexDirectory(DefaultIndexUpdater.java:202)
Comment 1 Tomas Danek 2011-01-27 11:04:44 UTC
Created attachment 105398 [details]
stacktrace
Comment 2 Tomas Zezula 2011-01-27 12:43:11 UTC
beingIndexed is probably null, not related to Lucene 3.0
I will debug it.
Comment 3 Tomas Zezula 2011-01-27 14:43:07 UTC
I am not able to reproduce it :-(
But if I understand it correctly it's a race condition.
The indexLoadedRepo is guarded by write lock which is allocated per repository. But the NotifyIndexCreator.beingIndexed is static shared among all instances. When one loading completes it can overwrite the value by null.
Making it instance variables (if more progress should be displayed at once) should solve it.
Comment 4 Jesse Glick 2011-02-11 22:45:01 UTC
core-main #d981cdce09a3
Comment 5 Quality Engineering 2011-02-16 11:45:13 UTC
Integrated into 'main-golden', will be available in build *201102160501* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/d981cdce09a3
User: Jesse Glick <jglick@netbeans.org>
Log: #194767: NullPointerException at org.netbeans.modules.maven.indexer.NexusRepositoryIndexerImpl$NotifyingIndexCreator.updateDocument
Comment 6 Jesse Glick 2011-03-03 00:04:18 UTC
*** Bug 194404 has been marked as a duplicate of this bug. ***
Comment 7 Jesse Glick 2011-03-11 15:44:52 UTC
*** Bug 194713 has been marked as a duplicate of this bug. ***