LUCENE + EXCEPTION

2005-01-24 Thread Karthik N S




Hi 
Guys
Apologies..

On 
STANDALONE Usge of UPDATION/DELETION/ADDITION of Documents into 
MergerIndex, the Code of mine
runs 
PERFECTLY with out any Problems.
But When the 
same Code is plugged into a WEBAPP on TOMCAT with a servlet Running in SINGLE 
THREAD MODE,Some times 
Frequently I 
get the Error as below
java.io.IOException: read past 
EOF at 
org.apache.lucene.index.CompoundFileReader$CSInputStream.readInternal(CompoundFileReader.java:218) 
at 
org.apache.lucene.store.InputStream.readBytes(InputStream.java:61) 
at 
org.apache.lucene.index.SegmentReader.norms(SegmentReader.java:356) 
at 
org.apache.lucene.index.SegmentReader.norms(SegmentReader.java:323) 
at 
org.apache.lucene.search.TermQuery$TermWeight.scorer(TermQuery.java:64) 
at 
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:85) 
at 
org.apache.lucene.search.Hits.getMoreDocs(Hits.java:64) 
at 
org.apache.lucene.search.Hits.init(Hits.java:43) 
at 
org.apache.lucene.search.Searcher.search(Searcher.java:33) 
at 
org.apache.lucene.search.Searcher.search(Searcher.java:27)
Somebody 
Please tell me Why is this happening
O/s = 
Jentoo
JAVA = Jdk 
1.4.2
WEBAPP = 
TOMCAT
Lucene 
= 1.4.3
Thx in 
advance
Karthik












WITH WARM REGARDS HAVE A NICE DAY [ 
N.S.KARTHIK] 


Re: LUCENE + EXCEPTION

2005-01-24 Thread Chris Lamprecht
Hi Karthik,

If you are talking about SingleThreadModel (i.e. your servlet
implements javax.servlet.SingleThreadModel), this does not guarantee
that two different instances of your servlet won't be run at the same
time.  It only guarantees that each instance of your servlet will only
be run by one thread at a time.  See:

http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/SingleThreadModel.html

If you are accessing a shared resource (a lucene index), you'll have
to prevent concurrent modifications somehow other than
SingleThreadModel.

I think they've finally deprecated SingleThreadModel in the latest
(may be not even out yet) servlet spec.

-chris

 
 On STANDALONE Usge of   UPDATION/DELETION/ADDITION of Documents into
 MergerIndex, the  Code of mine
 
 
 runs PERFECTLY  with out any Problems.
 
 
 But When the same Code is plugged into a WEBAPP on TOMCAT with a servlet
 Running in SINGLE THREAD MODE,Some times 
 
 
 Frequently I get the Error as below

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: LUCENE + EXCEPTION

2005-01-24 Thread Karthik N S
Hi

  Ok Still I have the Exeption in process ,If even I try to have a Servlet
Single Instance [may be by Authentication
  processs] , but I made shure that Lucene's MergerIndexing is controlled by
single Initiation...



  But With out any Shared Resource's the Exception is popping on Frequently,



   java.io.IOException: read past EOF
at
org.apache.lucene.index.CompoundFileReader$CSInputStream.readInternal(Compou
ndFileReader.java:218)
at
org.apache.lucene.store.InputStream.readBytes(InputStream.java:61)
at
org.apache.lucene.index.SegmentReader.norms(SegmentReader.java:356)
at
org.apache.lucene.index.SegmentReader.norms(SegmentReader.java:323)
at
org.apache.lucene.search.TermQuery$TermWeight.scorer(TermQuery.java:64)
at
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:85)
at org.apache.lucene.search.Hits.getMoreDocs(Hits.java:64)
at org.apache.lucene.search.Hits.init(Hits.java:43)
at org.apache.lucene.search.Searcher.search(Searcher.java:33)
at org.apache.lucene.search.Searcher.search(Searcher.java:27)



  Please Help me

 [ I could not find any solution on Lucene Form for the same,may be I am the
only one with the issue]

Karthik

-Original Message-
From: Chris Lamprecht [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 25, 2005 9:48 AM
To: Lucene Users List
Subject: Re: LUCENE + EXCEPTION


Hi Karthik,

If you are talking about SingleThreadModel (i.e. your servlet
implements javax.servlet.SingleThreadModel), this does not guarantee
that two different instances of your servlet won't be run at the same
time.  It only guarantees that each instance of your servlet will only
be run by one thread at a time.  See:

http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/SingleThreadMode
l.html

If you are accessing a shared resource (a lucene index), you'll have
to prevent concurrent modifications somehow other than
SingleThreadModel.

I think they've finally deprecated SingleThreadModel in the latest
(may be not even out yet) servlet spec.

-chris


 On STANDALONE Usge of   UPDATION/DELETION/ADDITION of Documents into
 MergerIndex, the  Code of mine


 runs PERFECTLY  with out any Problems.


 But When the same Code is plugged into a WEBAPP on TOMCAT with a servlet
 Running in SINGLE THREAD MODE,Some times


 Frequently I get the Error as below

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]