You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@lucene.apache.org by arvindjce <ar...@gmail.com> on 2011/05/20 01:19:58 UTC

Directory Encryption Enabled - while searching index we get Exception in thread "main" java.io.IOException: read past EOF

We have the encryption/decryption agent switched on in our linux box. 

There are two scenarios we are experiencing:

1. We did not switch on the Encryption (Directory/File Protection) agent. We
indexed a set of documents. The index was created and we opened the index
files and copied the index data (unreadable format). We then switched on the
Encryption; Then tried to read the data from the index through program; we
were able to get the results.


2. Now we created the index when we had the Encryption (Directory/File
Protection) agent switched on. We were able to create the index. But when we
tried to read the data from the index through program; we are getting this
read past EOF error consistently.

Error Log:

Exception in thread "main" java.io.IOException: read past EOF
	at
org.apache.lucene.store.BufferedIndexInput.readBytes(BufferedIndexInput.java:138)
	at
org.apache.lucene.store.BufferedIndexInput.readBytes(BufferedIndexInput.java:94)
	at org.apache.lucene.store.IndexInput.readString(IndexInput.java:127)
	at
org.apache.lucene.index.CompoundFileReader.<init>(CompoundFileReader.java:74)
	at
org.apache.lucene.index.SegmentReader$CoreReaders.<init>(SegmentReader.java:111)
	at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:576)
	at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:554)
	at org.apache.lucene.index.DirectoryReader.<init>(DirectoryReader.java:105)
	at
org.apache.lucene.index.ReadOnlyDirectoryReader.<init>(ReadOnlyDirectoryReader.java:27)
	at
org.apache.lucene.index.DirectoryReader$1.doBody(DirectoryReader.java:75)
	at
org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:677)
	at org.apache.lucene.index.DirectoryReader.open(DirectoryReader.java:69)
	at org.apache.lucene.index.IndexReader.open(IndexReader.java:316)
	at org.apache.lucene.index.IndexReader.open(IndexReader.java:202)
	at lucene.SearchFiles.main(SearchFiles.java:100)


Thanks
Arvind


--
View this message in context: http://lucene.472066.n3.nabble.com/Directory-Encryption-Enabled-while-searching-index-we-get-Exception-in-thread-main-java-io-IOExceptiF-tp2963626p2963626.html
Sent from the Lucene - General mailing list archive at Nabble.com.

Re: Directory Encryption Enabled - while searching index we get Exception in thread "main" java.io.IOException: read past EOF

Posted by arvindjce <ar...@gmail.com>.
Hi Simon,

We are using ProtectFile is the agent we are using. We tried with Lucene 2
and the Lucene 3.0.1 both of them failed

Thanks
Arvind

--
View this message in context: http://lucene.472066.n3.nabble.com/Directory-Encryption-Enabled-while-searching-index-we-get-Exception-in-thread-main-java-io-IOExceptiF-tp2963626p2964661.html
Sent from the Lucene - General mailing list archive at Nabble.com.

Re: Directory Encryption Enabled - while searching index we get Exception in thread "main" java.io.IOException: read past EOF

Posted by Simon Willnauer <si...@googlemail.com>.
Hey Arvind,

can you give us a little more details about the encryption agent you
are using so I can try to reproduce this problem.
CAn you also provide some info which lucene version you are using?

simon

On Fri, May 20, 2011 at 1:19 AM, arvindjce <ar...@gmail.com> wrote:
> We have the encryption/decryption agent switched on in our linux box.
>
> There are two scenarios we are experiencing:
>
> 1. We did not switch on the Encryption (Directory/File Protection) agent. We
> indexed a set of documents. The index was created and we opened the index
> files and copied the index data (unreadable format). We then switched on the
> Encryption; Then tried to read the data from the index through program; we
> were able to get the results.
>
>
> 2. Now we created the index when we had the Encryption (Directory/File
> Protection) agent switched on. We were able to create the index. But when we
> tried to read the data from the index through program; we are getting this
> read past EOF error consistently.
>
> Error Log:
>
> Exception in thread "main" java.io.IOException: read past EOF
>        at
> org.apache.lucene.store.BufferedIndexInput.readBytes(BufferedIndexInput.java:138)
>        at
> org.apache.lucene.store.BufferedIndexInput.readBytes(BufferedIndexInput.java:94)
>        at org.apache.lucene.store.IndexInput.readString(IndexInput.java:127)
>        at
> org.apache.lucene.index.CompoundFileReader.<init>(CompoundFileReader.java:74)
>        at
> org.apache.lucene.index.SegmentReader$CoreReaders.<init>(SegmentReader.java:111)
>        at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:576)
>        at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:554)
>        at org.apache.lucene.index.DirectoryReader.<init>(DirectoryReader.java:105)
>        at
> org.apache.lucene.index.ReadOnlyDirectoryReader.<init>(ReadOnlyDirectoryReader.java:27)
>        at
> org.apache.lucene.index.DirectoryReader$1.doBody(DirectoryReader.java:75)
>        at
> org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:677)
>        at org.apache.lucene.index.DirectoryReader.open(DirectoryReader.java:69)
>        at org.apache.lucene.index.IndexReader.open(IndexReader.java:316)
>        at org.apache.lucene.index.IndexReader.open(IndexReader.java:202)
>        at lucene.SearchFiles.main(SearchFiles.java:100)
>
>
> Thanks
> Arvind
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Directory-Encryption-Enabled-while-searching-index-we-get-Exception-in-thread-main-java-io-IOExceptiF-tp2963626p2963626.html
> Sent from the Lucene - General mailing list archive at Nabble.com.
>