RE: Help with Searching indexes from a web app (Lucene 1.3 rc2)

2003-12-02 Thread Iain Young
Well, I've fixed the problem. 

I've upgraded tomcat to version 4.1.29 and it's all working again now,
(using exactly the same tomcat configuration etc as before). Seems as though
there is a compatibility problem of some sort with tomcat 4.0.3.

I am using the basic tomcat security on the webapp, but I wouldn't have
expected this to cause the problem, especially seeing as when I upgraded
tomcat to 4.1.29 the problem went away, (using the same security model).
Also, if it was a security problem, I'd had expected it to have trouble when
creating the indexes, not just when searching them.

At least it's working now

Thanks,
Iain

-Original Message-
From: Erik Hatcher [mailto:[EMAIL PROTECTED]
Sent: 01 December 2003 23:31
To: Lucene Users List
Subject: Re: Help with Searching indexes from a web app (Lucene 1.3 rc2)


Also, reindex with the new API as well.  There are likely  
incompatibilities in the index format.


On Monday, December 1, 2003, at 11:21  AM, 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:[EMAIL PROTECTED]
> Sent: 01 December 2003 15:40
> To: '[EMAIL PROTECTED]'
> 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ___ 
> _
> 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


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



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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Help with Searching indexes from a web app (Lucene 1.3 rc2)

2003-12-01 Thread Erik Hatcher
Also, reindex with the new API as well.  There are likely  
incompatibilities in the index format.

On Monday, December 1, 2003, at 11:21  AM, 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:[EMAIL PROTECTED]
Sent: 01 December 2003 15:40
To: '[EMAIL PROTECTED]'
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
___ 
_
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


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


Re: Help with Searching indexes from a web app (Lucene 1.3 rc2)

2003-12-01 Thread Dror Matalon
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 -, 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:[EMAIL PROTECTED]
> Sent: 01 December 2003 15:40
> To: '[EMAIL PROTECTED]'
> 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

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

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



RE: Help with Searching indexes from a web app (Lucene 1.3 rc2)

2003-12-01 Thread Iain Young
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:[EMAIL PROTECTED]
Sent: 01 December 2003 15:40
To: '[EMAIL PROTECTED]'
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]