Hello Folks, I'm using Lucene 3.0, my code runs fine on Windows but when I test it on Linux, I run into the following stack trace:
java.io.FileNotFoundException: /opt/apache/tomcat/webapps/myapp/luceneData/backend_IP/en_US/_1.fdt (No such file or directory) at java.io.RandomAccessFile.open(Native Method) at java.io.RandomAccessFile.<init>(RandomAccessFile.java:212) at org.apache.lucene.store.SimpleFSDirectory$SimpleFSIndexOutput.<init>(SimpleFSDirectory.java:180) at org.apache.lucene.store.NIOFSDirectory.createOutput(NIOFSDirectory.java:74) at org.apache.lucene.index.FieldsWriter.<init>(FieldsWriter.java:65) at org.apache.lucene.index.StoredFieldsWriter.initFieldsWriter(StoredFieldsWriter.java:66) at org.apache.lucene.index.StoredFieldsWriter.finishDocument(StoredFieldsWriter.java:144) at org.apache.lucene.index.StoredFieldsWriter$PerDoc.finish(StoredFieldsWriter.java:193) at org.apache.lucene.index.DocumentsWriter$WaitQueue.writeDocument(DocumentsWriter.java:1443) at org.apache.lucene.index.DocumentsWriter$WaitQueue.add(DocumentsWriter.java:1462) at org.apache.lucene.index.DocumentsWriter.finishDocument(DocumentsWriter.java:1082) at org.apache.lucene.index.DocumentsWriter.updateDocument(DocumentsWriter.java:776) at org.apache.lucene.index.DocumentsWriter.addDocument(DocumentsWriter.java:751) at org.apache.lucene.index.IndexWriter.addDocument(IndexWriter.java:1928) Things I tried: 1) At first I thought that it had something to do with permissions but the permissions on the directory where all my indexes are nested and stored is 755 so I don't see how that could be an issue. 2) Then I realized that l was using Directory directory = FSDirectory.open(dir) to create the directory that I passed to the IndexWriter ... and the value of my dir was ...luceneData/backend_IP/en_US/ ... now the two directories backend_IP/en_US are really placeholders ... the real names are known to me just before I call FSDirectory.open() ... so I thought that the problem maybe that in Windows the backend_IP/en_US directories may be getting created auto-magically by the FSDirectory.open() implementation ... but in Linux I need to create them manually before calling FSDirectory.open() ... so I tried that but that didn't help either. Now I'm out of clues. Anyone have any advice? - Pulkit --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org