Issue Details (XML | Word | Printable)

Key: LUCENE-1199
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: James William Dumay
Votes: 0
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
Lucene - Java

NullPointerException in IndexModifier.close()

Created: 02/Mar/08 11:15 PM   Updated: 08/May/08 07:47 PM
Return to search
Component/s: Index
Affects Version/s: 2.0.0, 2.3.1
Fix Version/s: 2.3.2, 2.4

Time Tracking:
Not Specified

Lucene Fields: New
Resolution Date: 02/Mar/08 11:35 PM


 Description  « Hide
We upgraded from Lucene 2.0.0. to 2.3.1 hoping this would resolve this issue.

http://jira.codehaus.org/browse/MRM-715

Trace is as below for Lucene 2.3.1:
java.lang.NullPointerException
at org.apache.lucene.index.IndexModifier.close(IndexModifier.java:576)
at org.apache.maven.archiva.indexer.lucene.LuceneRepositoryContentIndex.closeQuietly(LuceneRepositoryContentIndex.java:416)
at org.apache.maven.archiva.indexer.lucene.LuceneRepositoryContentIndex.modifyRecord(LuceneRepositoryContentIndex.java:152)
at org.apache.maven.archiva.consumers.lucene.IndexContentConsumer.processFile(IndexContentConsumer.java:169)
at org.apache.maven.archiva.repository.scanner.functors.ConsumerProcessFileClosure.execute(ConsumerProcessFileClosure.java:51)
at org.apache.commons.collections.functors.IfClosure.execute(IfClosure.java:117)
at org.apache.commons.collections.CollectionUtils.forAllDo(CollectionUtils.java:388)
at org.apache.maven.archiva.repository.scanner.RepositoryContentConsumers.executeConsumers(RepositoryContentConsumers.java:283)
at org.apache.maven.archiva.proxy.DefaultRepositoryProxyConnectors.transferFile(DefaultRepositoryProxyConnectors.java:597)
at org.apache.maven.archiva.proxy.DefaultRepositoryProxyConnectors.fetchFromProxies(DefaultRepositoryProxyConnectors.java:157)
at org.apache.maven.archiva.web.repository.ProxiedDavServer.applyServerSideRelocation(ProxiedDavServer.java:447)
at org.apache.maven.archiva.web.repository.ProxiedDavServer.fetchContentFromProxies(ProxiedDavServer.java:354)
at org.apache.maven.archiva.web.repository.ProxiedDavServer.process(ProxiedDavServer.java:189)
at org.codehaus.plexus.webdav.servlet.multiplexed.MultiplexedWebDavServlet.service(MultiplexedWebDavServlet.java:119)
at org.apache.maven.archiva.web.repository.RepositoryServlet.service(RepositoryServlet.java:155)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Michael McCandless added a comment - 02/Mar/08 11:26 PM
Were there any prior exceptions before you hit this one?

It's hard to see how IndexModifier could have both its indexReader & indexWriter null, unless it had hit an exception on re-opening one of them.


Brett Porter added a comment - 02/Mar/08 11:28 PM
in my case there weren't any from Lucene - I came to the same conclusion and couldn't understand why this would be. The only other thought is if close() gets called twice but I couldn't see that in our code either.

Michael McCandless added a comment - 02/Mar/08 11:35 PM
OK I just committed a defensive check that indexReader != null before we close it.

But note that IndexModifier is now deprecated and will be removed in 3.0.


Hoss Man added a comment - 11/Mar/08 07:28 PM
targeted for 2.3.2 bug fix release