[ https://jira.codehaus.org/browse/MINDEXER-63?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=313722#comment-313722 ]
Tamás Cservenák commented on MINDEXER-63: ----------------------------------------- Also, take a peek at MINDEXER-67 It makes plain simple to implement proper context synchronisation by "wrapping" created contexts. In this case, the host app, NB in this case) would need to take over the maintenance, the "registry" role too, but that's pretty straight, and I believe you already have something similar. Also, take a peek at nexus example (is still very involved, as it does NOT make use of MINDEXER-67 yet): https://github.com/sonatype/nexus/commit/cac960808436d3c1bd18d7ddb7a7587c725717f3#diff-4 > NullPointerException at > org.apache.maven.index.context.DefaultIndexingContext.acquireIndexSearcher > -------------------------------------------------------------------------------------------------- > > Key: MINDEXER-63 > URL: https://jira.codehaus.org/browse/MINDEXER-63 > Project: Maven Indexer > Issue Type: Bug > Affects Versions: 5.0.0 > Environment: netbeans 7.3 dev builds. > Reporter: Milos Kleint > Priority: Critical > > see issue http://netbeans.org/bugzilla/show_bug.cgi?id=219645 > for some reason (unknown to me yet) the index files cannot be deleted. The > codebase then gets into bad state. > possibly wrong code in DefaultIndexingContext: > {code:java} > public synchronized void replace( Directory directory ) > throws IOException > Â { > Â Â Â Â final Date ts = IndexUtils.getTimestamp( directory ); > closeReaders(); > Â deleteIndexFiles( false ); > Â IndexUtils.copyDirectory( directory, indexDirectory ); > Â openAndWarmup(); > Â // reclaim the index as mine > Â storeDescriptor(); > Â updateTimestamp( true, ts ); > Â optimize(); > } > {code} > when deleteIndexFiles(0 fails, openAndWarmup() is not called. also > closeReaders() ignores indexWriter.. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira