lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dror Matalon <d...@zapatec.com>
Subject Re: Help with Searching indexes from a web app (Lucene 1.3 rc2)
Date Mon, 01 Dec 2003 18:27:41 GMT
Please, always include the full exception when reporting a problem.

As for your problem, I would guess that it has to do with where Lucene
puts its temp files. I think that something changed between 1.2 and 1.3
and on Unix it started using /tmp instead of the index directory for the
tmp files. So somehow from your webapp you don't have permissions to
write /tmp. Are you running a security manager, by any chance?

Regards,

Dror

On Mon, Dec 01, 2003 at 04:21:04PM -0000, Iain Young wrote:
> Note, that I've just tried the example webapp supplied with Lucene, and I
> appear to be having exactly the same problem with that. The 1.2 version
> works ok, but the 1.3 version is displaying a path not found error.
> 
> Are there any known incompatibilities with certain versions of Tomcat (I'm
> currently using version 4.0.3)
> 
> Thanks,
> Iain
> 
> -----Original Message-----
> From: Iain Young [mailto:Iain.Young@microfocus.com]
> Sent: 01 December 2003 15:40
> To: 'lucene-user@jakarta.apache.org'
> Subject: Help with Searching indexes from a web app (Lucene 1.3 rc2)
> 
> 
> > Hi folks.
> > 
> > I'm new to Lucene so this may be an obvious questions, but I am having
> > problems with Lucene 1.3-rc2. I've got a bit of code which looks something
> > like this....
> > 
> > public static void getSearchResults(String searchString, String indexDir)
> > {
> >     try
> >     {
> >         Searcher searcher = new IndexSearcher(indexDir);
> >         .....
> >         etc...
> >         .....
> >     }
> >     catch (Exception ex)
> >     {
> >     }
> > }
> > 
> > I'm calling it to from a web application (servlet) running in tomcat in
> > conjunction with struts and velocity. If I use the Lucene 1.2 binary
> > release, it all works fine and I get the search results ok. However, when
> > I replace the 1.2 jar file with the 1.3-rc2 jat file,  (leaving all of my
> > code exactly the same) it stops working, and I get a path not found
> > exception being thrown. 
> > 
> > I've narrowed it down to the IndexReader.open(final Directory directory)
> > method. Even if I pass a valid Directory object into this (created by
> > FSDirectory), it just seems to throw the exception, (even though I know
> > the directory object is not null etc). The bizarre thing is that this
> > problem only seems to occur when I run it from the web application. If I
> > invoke the same code from the command line, it works ok, (even though I'm
> > using the same string for the index dir).
> > 
> > Anyone got any ideas? (I want to use 1.3 because I want to exploit some of
> > the newer features). Does running from within a web application do
> > something strange with the paths, even though the strings I'm using are
> > fully qualified?
> > 
> > Thanks for your help,
> > 
> > Iain Young
> > http://www.microfocus.com
> > 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
> 
> 
> ________________________________________________________________________
> This e-mail has been scanned for viruses by MCI's Internet Managed Scanning
> Services - powered by MessageLabs. For further information visit
> http://www.mci.com
> ________________________________________________________________________
> 
> ________________________________________________________________________
> This e-mail has been scanned for viruses by MCI's Internet Managed Scanning
> Services - powered by MessageLabs. For further information visit
> http://www.mci.com
> ________________________________________________________________________
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
> 

-- 
Dror Matalon
Zapatec Inc 
1700 MLK Way
Berkeley, CA 94709
http://www.fastbuzz.com
http://www.zapatec.com

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Mime
View raw message