Tim, Thanks for helping me out with this. I am using 4.1 code, it's just that I have some changes in there particular to our instance. The changes I have I don't think should affect this. I put in the check you suggested, and now I don't get the null exception but get a whole bunch of these sorts of errors:
2014-07-01 12:35:34,764 ERROR org.dspace.search.DSIndexer @ java.io.FileNotFoundException: /dspace/repository/dev/search/_6o8q_Lucene41_0.tip (Too many open files) I was getting these sort of errors when I was running index-lucene-init and I changed these config parameters: search.index.delay = -1 search.batch.documents = -1 and index-lucene-init completed successfully. I'm a bit confused as to whether I need to run index-lucene-update as a cron job or not. When I load an item into my instance, the lucene index metadata is updated because, I have this set ( the search in the list ): event.dispatcher.default.consumers = search, versioning, discovery, eperson, harvester But as I understood it, when filter-media is run (version 3.x), the the fulltext search is updated in lucene. So I guess this is what index-lucene-update is suppose to do with version 4.1? My plan for the release is to run index-lucene-init, and then setup a cron job to run index-lucene-update to run after filter-media runs. Does that make sense? Thank you again! Jose On Tue, Jul 1, 2014 at 11:49 AM, Tim Donohue <[email protected]> wrote: > Hi Jose, > > This is a bit confusing, cause the error you show says the > NullPointerException is on line 616 of DSIndexer.java. In version 4.x of > DSpace, that's this line (and NOT the "liveDocs" line you sent previously): > > https://github.com/DSpace/DSpace/blob/dspace-4_x/dspace-api/src/main/java/org/dspace/search/DSIndexer.java#L616 > > Have you modified/customized the DSIndexer.java file in some way? Are you > certain you've fully upgraded all your code to 4.x? > > Based on the docs for the MultiFields.getLiveDocs() method though, it does > also sound like we are missing a check for null: > https://lucene.apache.org/core/4_0_0/core/org/apache/lucene/index/MultiFields.html#getLiveDocs(org.apache.lucene.index.IndexReader) > > Since getLiveDocs can return null, it's likely the fix here may be to change > the 'if' to be: > > if (liveDocs!=null && !liveDocs.get(i)) > > So, this sounds like it also may be a possible bug. > > - Tim > > > > On 6/27/2014 10:40 AM, Jose Blanco wrote: >> >> I just ran index-lucene-init and it completed successfully, but when I >> try to run >> >> index-lucene-update, it blows up at where I have (****): >> >> */ >> public static void cleanIndex(Context context) throws IOException, >> SQLException { >> >> IndexReader reader = DSQuery.getIndexReader(); >> >> Bits liveDocs = MultiFields.getLiveDocs(reader); >> >> for(int i = 0 ; i < reader.numDocs(); i++) >> { >> (****) if (!liveDocs.get(i)) >> >> >> The error I'm getting is >> >> Exception: null >> java.lang.NullPointerException >> at org.dspace.search.DSIndexer.cleanIndex(DSIndexer.java:616) >> >> I know reader is not null, but liveDocs must be, but why? >> >> -Jose >> >> >> ------------------------------------------------------------------------------ >> Open source business process management suite built on Java and Eclipse >> Turn processes into business applications with Bonita BPM Community >> Edition >> Quickly connect people, data, and systems into organized workflows >> Winner of BOSSIE, CODIE, OW2 and Gartner awards >> http://p.sf.net/sfu/Bonitasoft >> _______________________________________________ >> DSpace-tech mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/dspace-tech >> List Etiquette: >> https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette >> > ------------------------------------------------------------------------------ Open source business process management suite built on Java and Eclipse Turn processes into business applications with Bonita BPM Community Edition Quickly connect people, data, and systems into organized workflows Winner of BOSSIE, CODIE, OW2 and Gartner awards http://p.sf.net/sfu/Bonitasoft _______________________________________________ DSpace-tech mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/dspace-tech List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

