Weird exception with Lucene index

162 views
Skip to first unread message

Pablo Pareja

unread,
May 19, 2012, 8:43:19 PM5/19/12
to ne...@googlegroups.com
Hi,

I'm getting this exception when using a Lucene index and don't have any idea why I might be getting it:

SEVERE: null
java.lang.RuntimeException: org.apache.lucene.index.CorruptIndexException: unrecognized format -3 in file "_2q.fnm"
        at org.neo4j.index.impl.lucene.LuceneDataSource.getIndexWriter(LuceneDataSource.java:606)
        at org.neo4j.index.impl.lucene.LuceneDataSource.getIndexSearcher(LuceneDataSource.java:489)
        at org.neo4j.index.impl.lucene.LuceneIndex.query(LuceneIndex.java:248)
        at org.neo4j.index.impl.lucene.LuceneIndex.get(LuceneIndex.java:187)
        at com.era7.bioinfo.bio4jmodel.util.NodeRetriever.getNCBITaxonByTaxId(NodeRetriever.java:278)
        at com.era7.bioinfo.mg7.CountTaxonomyFreqs.main(CountTaxonomyFreqs.java:86)
        at com.era7.bioinfo.mg7.CountTaxonomyFreqs.execute(CountTaxonomyFreqs.java:44)
        at com.era7.lib.bioinfo.bioinfoutil.ExecuteFromFile.main(ExecuteFromFile.java:66)
        at com.era7.bioinfo.mg7.MG7.main(MG7.java:34)
Caused by: org.apache.lucene.index.CorruptIndexException: unrecognized format -3 in file "_2q.fnm"
        at org.apache.lucene.index.FieldInfos.read(FieldInfos.java:349)
        at org.apache.lucene.index.FieldInfos.<init>(FieldInfos.java:71)
        at org.apache.lucene.index.IndexWriter.getFieldInfos(IndexWriter.java:1197)
        at org.apache.lucene.index.IndexWriter.getCurrentFieldInfos(IndexWriter.java:1213)
        at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:1149)
        at org.neo4j.index.impl.lucene.LuceneDataSource.getIndexWriter(LuceneDataSource.java:593)
        ... 8 more

I'm using Neo4j 1.7 on a Linux machine.
Any clues?
Thanks!


Pablo
--
Pablo Pareja Tobes 

David Montag

unread,
May 19, 2012, 8:54:51 PM5/19/12
to ne...@googlegroups.com

Hi Pablo,

That's most likely caused by a version mismatch. What Neo4j version was the store created with, and which version are you using to access it? Are you running embedded?

Thanks,
David

Pablo Pareja

unread,
May 19, 2012, 9:00:38 PM5/19/12
to ne...@googlegroups.com
Hi David, 

Thanks for the quick response. You're right! 
I was combining two different programs and one of them has a version around 1.5 whilst the other one is built with 1.7, (silly me... :P )
I probably corrupted the DB then, because I was adding new content when using the program compiled with 1.5 to a previously created DB with 1.7 version .... 

Cheers,

Pablo 

David Montag

unread,
May 19, 2012, 9:03:56 PM5/19/12
to ne...@googlegroups.com

It shouldn't be corrupted. It's just that 1.7 uses a later Lucene version that 1.5 can't read.

-David

Pablo Pareja

unread,
May 19, 2012, 9:11:23 PM5/19/12
to ne...@googlegroups.com
Ok, thanks ;)

Pablo

David Montag

unread,
May 19, 2012, 10:20:46 PM5/19/12
to ne...@googlegroups.com
Happy to help :)
--
Neo Technology, www.neotechnology.com
Skype: ddmontag
Reply all
Reply to author
Forward
0 new messages