# lucene-java-user mailing list archives

##### Site index · List index
Message view
Top
From <oh...@cox.net>
Subject Re: java.io.IOException when trying to list terms in index (IndexReader)
Date Thu, 01 Jan 1970 00:00:00 GMT
```Hi,

I don't know what happened, but all of a sudden, it started working :(...

Jim

---- ohaya@cox.net wrote:
> Hi,
>
> I changed the beginning of the try to:
>
> 		try {
> 			boolean foo = termsEnumerator.next();
> 			System.out.println("Finished calling first .next()");
> 			System.out.println("About to drop into while()...");
> .
> .
> .
>
> and here's what I got when I ran the app:
>
> Index in directory :[C:\lucene-devel\lucene-devel\index] was opened successfully!
> ** ERROR **: Exception while stepping through index: [java.io.IOException: The handle
is invalid]
> java.io.IOException: The handle is invalid
> 	at java.io.RandomAccessFile.seek(Native Method)
> 	at org.apache.lucene.store.BufferedIndexInput.refill(BufferedIndexInput.java:157)
>
> Jim
>
> ---- ohaya@cox.net wrote:
> > Hi,
> >
> > BTW, the next() method is an abstract method in the Javadocs.  Does that mean that
I'm suppose to have my own implementation?
> >
> > Jim
> >
> >
> > ---- ohaya@cox.net wrote:
> > > Phil,
> > >
> > > I posted in haste.  Actually, from the output that I posted, doesn't it it
look like the .next() itself is throwing the exception?
> > >
> > > That is what has been puzzling me.  It looks like it got through the open()
and terms() with no problem, then it blew up when calling the next()?
> > >
> > > Jim
> > >
> > >
> > > ---- ohaya@cox.net wrote:
> > > > Phil,
> > > >
> > > > Yes, that exception is not very helpful :)!!
> > > >
> > > > I'll try your suggestions and post back.
> > > >
> > > > Thanks,
> > > > Jim
> > > >
> > > >
> > > > ---- Phil Whelan <phil123@gmail.com> wrote:
> > > > > Hi Jim,
> > > > >
> > > > > I cannot see anything obvious, but both open() and terms() throw
> > > > > IOException's. You could try putting these in separate try..catch
> > > > > blocks to see which one it's coming from. Or using e.printStackTrace()
> > > > > happening.
> > > > >
> > > > > On Sat, Aug 1, 2009 at 7:09 PM, <ohaya@cox.net> wrote:
> > > > > >                        Term term = new Term("path",
"");
> > > > > >                        termsEnumerator = reader.terms(term);
> > > > >
> > > > > Cheers,
> > > > > Phil
> > > > >
> > > > > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> > > > > For additional commands, e-mail: java-user-help@lucene.apache.org
> > > > >
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> > > > For additional commands, e-mail: java-user-help@lucene.apache.org
> > > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> > > For additional commands, e-mail: java-user-help@lucene.apache.org
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> > For additional commands, e-mail: java-user-help@lucene.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org