Ruby + Apache Lucene using XMLRPC?

Not sure how much easier it is then the 3 lines of ruby code and 5 or
so of Java to get the two talking.

  • Much easier to setup and access via a simple REST API from Ruby, Java, or
    C.
  • Easily clusterable with the ability segregate nodes or join them for
    combined results.

Lucene is also known for being speedy, and everything I’ve seen tends
to agree with this.

  • Fast as hell. We use it at the NYC Dept. of Correction to find stuff and
    not only does it blow Lucene out of the water even though it’s a server,
    it’s easier to setup–even on windows.

Lucene will do the same giving you full document results back with
waited scroes and the like (I’m probably miss stating something here,
as my ‘advanced’ knowledge of Lucene is lacking)

  • Gives good results with attributes, vectors, and other goodies included.

+1 For HE on this one

  • Has a REST interface but you can just use the pure Ruby, Java, or C API to
    access it.
    • I’m mentioning this again because it’s the best feature.

So does Lucene/Java (obviously need the JRE installed, 5 mins at best
there)

  • Runs on Windows right out of the box.
  • Takes 10 minutes to setup, less on windows. That’s right, less. No JVM.
    All fast binary goodness baby.

Following few points seem a bit overfill when all you need is a search
tool. (clustering might be useful for insanly large search (NYC
anything in your case would fit))

  • You can embed it as a library via Ruby or Java if you want the absolute
    fastest.
    • Yes, this means that HE out of the box does local/embedded, remote
      distributed, and linkable P2P clustered search infrastructure with minimal
      setup for three languages.
  • Has a decent web UI for managing an estraier master (that’s the server
    that controls the thing).

Didn’t buy any myself for Lucene, online examples and included
examples with source code were enough for me.

  • Don’t need to buy an O’Reilly book to figure it out. Plenty of code
    examples and decent docs considering the author is Japanese (better than
    most English speaker’s docs really).

Lucene does the same (not sure on regular expressions, but would be
surprised if it didnt)

  • Supports phrase search, regular expressions, attribute search, and
    similarity search with Unicode support.

I’m not bashing HE in anyway as I’ve never used it, but just trying to
point your (or anyones) “Just use X…” statment is misleading and can
lead to narrow minded descions. While HE may work for you and others,
that doesn’t mean that something else wont fill the role just as
nicely and maybe even better. So why not state, “Why not give X a
try.,” and then follow on with the reasons why YOU like it.

Sorry for the rambling, but thats my 2cents…

-Nick

Hello Nick,

I tried to run a test server using the code on your blog
(http://blog.nicholasstuart.com/articles/2006/02/11/a-little-bit-of-both)
but I am unsure as to what goes in the … parts.

For now I keep getting the errors:

Main.java:3: cannot find symbol
symbol : class WebServer
location: class Main
static WebServer server;
^
Main.java:21: cannot find symbol
symbol : class Vector
location: class Main
public Vector searchAssets(String term){
^
Main.java:24: cannot find symbol
symbol : class Vector
location: class Main
public Vector searchPages(String term){
^
Main.java:7: cannot find symbol
symbol : class WebServer
location: class Main
server = new WebServer(port);
^

I appreciate your assistance very much.

Thanks
Frank

Ben M. [email protected] wrote: You don’t need netbeans… that’s an
IDE… like Eclipse. Should make your download much
smaller. Just the latest version of the JDK should do ya.

Sun’s site can be extremely confusing, so go here:

and click on the “Download JDK 5.0 Update 6” link below the netbeans and
j2ee sections.

Then, click on the “accept” radio button and then click on one of the
linux downloads.
Being on Red Hat, the RPM would probably do ya just fine.

b

softwareengineer 99 wrote:

Linux / Security Blog: http://frankmash.blogspot.com


Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails


Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails

Rails Blog: http://railsruby.blogspot.com
MySQL Blog: http://mysqldatabaseadministration.blogspot.com
Linux / Security Blog: http://frankmash.blogspot.com

Zed,

I appreciate you taking the time to reply.

I would love to try HE out but worry that it may not fulfill my
requirements. I have over 5 GB of data that needs to be indexed and
that’s just the start. As time goes my data needs will grow. May be for
other projects.

Just curious how big is your database?

Thanks for your help.

Frank

Zed S. [email protected] wrote: Just use Hyper Estraier.

  • Much easier to setup and access via a simple REST API from Ruby, Java,
    or
    C.
  • Easily clusterable with the ability segregate nodes or join them for
    combined results.
  • Fast as hell. We use it at the NYC Dept. of Correction to find stuff
    and
    not only does it blow Lucene out of the water even though it’s a server,
    it’s easier to setup–even on windows.
  • Gives good results with attributes, vectors, and other goodies
    included.
  • Has a REST interface but you can just use the pure Ruby, Java, or C
    API to
    access it.
    • I’m mentioning this again because it’s the best feature.
  • Runs on Windows right out of the box.
  • Takes 10 minutes to setup, less on windows. That’s right, less. No
    JVM.
    All fast binary goodness baby.
  • You can embed it as a library via Ruby or Java if you want the
    absolute
    fastest.
    • Yes, this means that HE out of the box does local/embedded, remote
      distributed, and linkable P2P clustered search infrastructure with
      minimal
      setup for three languages.
  • Has a decent web UI for managing an estraier master (that’s the server
    that controls the thing).
  • Don’t need to buy an O’Reilly book to figure it out. Plenty of code
    examples and decent docs considering the author is Japanese (better than
    most English speaker’s docs really).
  • Supports phrase search, regular expressions, attribute search, and
    similarity search with Unicode support.

Only thing I’ve ran into is that OSX people will find that darwin port’s
version is super old (man those guys need a kick in the ass). I’m
currently
trying to build it on OSX and should have some instructions for it soon.

Otherwise HE is the freaking bomb for Ruby projects simply because it’s
so
damn easy to access from any language via the rest interface. And when
I
say access I don’t mean just doing searches but also administering the
master servers.

I figure if it’s good enough for half of rails-core and nearly every
other
Rails shop I’ve shown it to then it’s good enough for you folks to at
least
try.

Zed A. Shaw

On 2/20/06 4:39 PM, “Nick S.” wrote:

functionality with Rails? Just curious.


Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails


Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails

Rails Blog: http://railsruby.blogspot.com
MySQL Blog: http://mysqldatabaseadministration.blogspot.com
Linux / Security Blog: http://frankmash.blogspot.com

I keep getting the following errors:

symbol : class IndexReader
location: class SearchServer
private IndexReader reader;
^
Main.java:3: cannot find symbol
symbol : class IndexSearcher
location: class SearchServer
private IndexSearcher searcher;
^
Main.java:5: cannot find symbol
symbol : class Directory
location: class SearchServer
public SearchServer(Directory directory) throws IOException {
^

Any ideas?

Thanks
Frank

Erik H. [email protected] wrote:
On Feb 19, 2006, at 9:44 PM, softwareengineer 99 wrote:

Please excuse me if this has been answered before.

Is there a “how-to” guide or a walkthrough on integrating Lucene
with ROR via XMLRPC?

I got Ferret to work but I am worried that it’s not going to be as
scalable.

I highly appreciate your assistance.

A week or so ago I posted the details of my custom XML-RPC server
(check the archives for it). There isn’t one built into Lucene,
though there are certainly a number of projects that do wrap Lucene
behind web services of one sort or another including the now
incubating Solr project.

Ferret may be suitable - only testing (or real world use!) will tell.

Erik


Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails

Rails Blog: http://railsruby.blogspot.com
MySQL Blog: http://mysqldatabaseadministration.blogspot.com
Linux / Security Blog: http://frankmash.blogspot.com

Thank you Ben very much.

Sun’s site is definitely confusing.

I will give it a try tonight.

Thanks
Frank

Ben M. [email protected] wrote: Sun’s site can be extremely
confusing, so go here:

and click on the “Download JDK 5.0 Update 6” link below the netbeans and
j2ee sections.

Then, click on the “accept” radio button and then click on one of the
linux downloads.
Being on Red Hat, the RPM would probably do ya just fine.

b

Rails Blog: http://railsruby.blogspot.com
MySQL Blog: http://mysqldatabaseadministration.blogspot.com
Linux / Security Blog: http://frankmash.blogspot.com

I would like to give it a try too.

Is there an RPM available?

Do I need to install http://hyperestraier.sourceforge.net/ and
http://hyperestraier.sourceforge.net/rubynativeapi/ ?

Any potential (harmful issues with installing QDBM and ZLib on my
Linux server?

Thanks
Frank

Scott B. [email protected] wrote:
On Feb 21, 2006, at 3:07 AM, Zed S. wrote:

Only thing I’ve ran into is that OSX people will find that darwin
port’s
version is super old (man those guys need a kick in the ass). I’m
currently
trying to build it on OSX and should have some instructions for it
soon.

It should build cleanly on OSX, just remember to use ‘make mac’ (or
something like that) instead of regular ‘make all’. I think that
applies to the QDBM
package, too.

Rails shop I’ve shown it to then it’s good enough for you folks to
at least
try.

Definitely. Use it and love it.

-Scott


Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails

Rails Blog: http://railsruby.blogspot.com
MySQL Blog: http://mysqldatabaseadministration.blogspot.com
Linux / Security Blog: http://frankmash.blogspot.com

Well you’re at least missing the import statements… that’s why you get
“unresolved
symbol” errors.

I can tell you that Vector is java.util.Vector and I think Nick is
probably talking about
the XML-RPC WebServer class… I think that’s
org.apache.xmlrpc.webserver.WebServer.

So, you’d put:

import java.util.Vector
import org.apache.xmlrpc.webserver.WebServer

at the top of your file (above the "public class … " line but below
any package
declaration if you have one).

Now all this is probably useless information cuz you don’t know what
goes in the rest of
the “…”'s, but maybe Nick will be along soon. I don’t think you need
anything after the
main method opening line and I would think that what goes in all the
indexing and search
methods would be specific to your case.

b

I have the JDK installed and working :slight_smile:
I also have the XML-RPC installed.

Not sure how to integrate XML-RPC with Lucene and my application. I
earlier posted the errors I am getting about my server not finding the
symbols:

"symbol : class IndexReader
location: class SearchServer
private IndexReader reader;
"

How do I make Lucene available over a port or start it as a server so
it can be queried by my application?

Can anyone please guide me.

Thanks
Frank

Rails Blog: http://railsruby.blogspot.com
MySQL Blog: http://mysqldatabaseadministration.blogspot.com
Linux / Security Blog: http://frankmash.blogspot.com

My apologies for not being more responsive on this thread. The Rails
list is so active that I filter it to a folder and only go through
the messages when I get a rare few free minutes.

While it is “just Java” and it won’t bite, there certainly is some
basic learning curve jumps to make. I’m not sure what you mean by
“XML-RPC is installed”. To get this to work you will need a JDK and
two JAR files (the XML-RPC one and the Lucene one), both of which
will need to be in your classpath (much like the Ruby load path).

Lucene itself does not contain a “server”, but the code posted uses
the Apache XML-RPC library to provide a server. To compile the
server, as long as it is a single .java file, you can do something
like (this is psuedo-code, adapt it to your environment):

javac -cp lucene-1.4.3.jar:xmlrpc-2.0.jar SearchServer.java

There may be other libraries needed? I’ve got some other libraries
in my classpath for other reasons, not sure what dependencies
xmlrpc-2.0.jar has. Lucene has no dependencies.

And then you’ll have SearchServer.class which you can run like this:

java -cp lucene-1.4.3.jar:xmlrpc-2.0.jar:. SearchServer

Again, the command-lines provided are off the cuff and may need some
tweaking for your environment or package names of the SearchServer
itself.

Best wishes,
Erik

Dear Erik,

Many thanks for your reply. I can imagine how “rare” a “few free
minutes” can be and certainly appreciate your assistance.

I placed the .jar files for Lucene and XML-RPC in my classpath and tried
to compile the SearchServer.java with:

javac -cp
/var/java/jdk1.5.0_06/lib/lucene-1.4.3.jar:/var/java/jdk1.5.0_06/lib/xmlrpc-3.0a1.jar:/var/java/jdk1.5.0_06/lib/lucene-core-1.9-rc1.jar
/var/java/development/SearchServer.java

I keep getting the following error:

/var/java/development/SearchServer.java:55: cannot find symbol
symbol : method addHandler(java.lang.String,SearchServer)
location: class org.apache.xmlrpc.webserver.WebServer
server.addHandler(“$default”, new SearchServer
^
1 error

So far my searchServer.java (based on your code) includes:


import java.util.Vector;
import org.apache.xmlrpc.webserver.WebServer;
import org.apache.lucene.index.IndexReader;
import org.apache.lucene.search.IndexSearcher;
import org.apache.lucene.store.FSDirectory;
import org.apache.lucene.store.Directory;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.FileReader;
import java.io.IOException;
import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.analysis.standard.StandardAnalyzer;
import org.apache.lucene.analysis.standard.ParseException;
import org.apache.lucene.document.Document;
import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.FilterIndexReader;
import org.apache.lucene.search.Searcher;
import org.apache.lucene.search.Query;
import org.apache.lucene.search.Hits;
import org.apache.lucene.queryParser.QueryParser;
import java.util.Hashtable;

public class SearchServer {
private IndexReader reader;
private IndexSearcher searcher;

 public SearchServer(Directory directory) throws IOException {
   reader = IndexReader.open(directory);
   searcher = new IndexSearcher(reader);
 }


 public Hashtable search(Vector constraints, int start, int max)

throws IOException, ParseException {
// …
}

 public static void main(String [] args) {
   String indexPath = args[0];
   int port = 8076;
   if (args.length > 1) {
     port = Integer.valueOf(args[1]).intValue();
   }

   try {
     WebServer server = new WebServer(port);
     server.addHandler("$default", new SearchServer

(FSDirectory.getDirectory(indexPath, false)));
server.start();
} catch (Exception e) {
System.err.println("SearchServer: " + e.toString());
e.printStackTrace(System.err);
}
}
}

Why is it complaining about server.addHandler method? What can I do
about it?

I wish there was a step by step guide to integrating Rails with
Lucene.

Thank you very much for your and Ben’s assistance.

Thanks
Frank

Erik H. [email protected] wrote: My apologies for not
being more responsive on this thread. The Rails
list is so active that I filter it to a folder and only go through
the messages when I get a rare few free minutes.

While it is “just Java” and it won’t bite, there certainly is some
basic learning curve jumps to make. I’m not sure what you mean by
“XML-RPC is installed”. To get this to work you will need a JDK and
two JAR files (the XML-RPC one and the Lucene one), both of which
will need to be in your classpath (much like the Ruby load path).

Lucene itself does not contain a “server”, but the code posted uses
the Apache XML-RPC library to provide a server. To compile the
server, as long as it is a single .java file, you can do something
like (this is psuedo-code, adapt it to your environment):

javac -cp lucene-1.4.3.jar:xmlrpc-2.0.jar SearchServer.java

There may be other libraries needed? I’ve got some other libraries
in my classpath for other reasons, not sure what dependencies
xmlrpc-2.0.jar has. Lucene has no dependencies.

And then you’ll have SearchServer.class which you can run like this:

java -cp lucene-1.4.3.jar:xmlrpc-2.0.jar:. SearchServer

Again, the command-lines provided are off the cuff and may need some
tweaking for your environment or package names of the SearchServer
itself.

Best wishes,
Erik

On Feb 21, 2006, at 11:10 PM, softwareengineer 99 wrote:

"

Rails Blog: http://railsruby.blogspot.com
MySQL Blog: http://mysqldatabaseadministration.blogspot.com
Linux / Security Blog: http://frankmash.blogspot.com

Yahoo! Mail
Use Photomail to share photos without annoying attachments.


Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails


Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails

Rails Blog: http://railsruby.blogspot.com
MySQL Blog: http://mysqldatabaseadministration.blogspot.com
Linux / Security Blog: http://frankmash.blogspot.com

Ben thank you for your email. It certainly did help. I am now getting
just one error for the server to compile (before putting in my search
methods). I posted the error details in an earlier message.

Thanks again for your continued assistance.
Frank

Ben M. [email protected] wrote: Well you’re at least missing the
import statements… that’s why you get “unresolved
symbol” errors.

Rails Blog: http://railsruby.blogspot.com
MySQL Blog: http://mysqldatabaseadministration.blogspot.com
Linux / Security Blog: http://frankmash.blogspot.com

On Feb 22, 2006, at 5:09 PM, softwareengineer 99 wrote:

Many thanks for your reply. I can imagine how “rare” a “few free
minutes” can be and certainly appreciate your assistance.

I placed the .jar files for Lucene and XML-RPC in my classpath and
tried to compile the SearchServer.java with:

javac -cp /var/java/jdk1.5.0_06/lib/lucene-1.4.3.jar:/var/java/
jdk1.5.0_06/lib/xmlrpc-3.0a1.jar:/var/java/jdk1.5.0_06/lib/lucene-
core-1.9-rc1.jar /var/java/development/SearchServer.java

You have two different versions of Lucene in your classpath. Remove
one of them (I recommend you use 1.9RC1 instead of 1.4.3). This
shouldn’t be related to the compilation error you’re getting…

I keep getting the following error:

/var/java/development/SearchServer.java:55: cannot find symbol
symbol : method addHandler(java.lang.String,SearchServer)
location: class org.apache.xmlrpc.webserver.WebServer
server.addHandler("$default", new SearchServer
^
1 error

I just compiled my SearchServer using this command-line (normally I
use an Ant build file though):

$ javac -cp lib/lucene-core-1.9-rc1-dev.jar:lib/xmlrpc-2.0.jar src/
java/org/nines/SearchServer.java

And it compiled just fine.

Erik

Il giorno 21/feb/06, alle ore 19:22, softwareengineer 99 ha scritto:

Hi Ugo,

Thanks for your reply.
I have been trying to find the download location to download JDK
without Netbeans but so far I am unsuccessful.

Go to Oracle Java Technologies | Oracle and click on
“Download JDK 5.0 Update 6”.

Ugo


Ugo C.
Blog: http://agylen.com/
Open Source Zone: http://oszone.org/
Evil or Not?: http://evilornot.info/
Company: http://www.sourcesense.com/

Hello Erik and Lucene Gurus,

I was able to get the Search Server compiled and was able to fix the
previous errors by moving SearchServer.java to my lib folder (It wasn’t
working when I was adding current path to classpath in my .bashrc file.

Now I keep getting the error:

Exception in thread “main” java.lang.ArrayIndexOutOfBoundsException: 0
at SearchServer.main(SearchServer.java:50)

for the following code:

 public static void main(String [] args) {
   String indexPath = args[0];
   int port = 8076;

When I hard code the path with the following, the server starts fine.
String indexPath = “/var/www/html”;

My question now is why am I getting the above out of bounds exception
and how can I correct it? How do I pass the path to my main method?

Thanks
Frank

softwareengineer 99 [email protected] wrote: Erik,
Thanks for your email.

I removed the duplicate jar file and downloaded xmlrpc-2.0.jar
(instead of v 3) and it compiled without any errors. I guess there is
some issue with XMLRPC-3? Thank you very much for the tip.

Now I have it compiled, I would like to customize the server and start
it so I can query it.

Do I just put the lucene indexing methods in the searchServer.java?
Is there an example code for indexing databases? Any reference
/pointers are highly appreciated.

How do I start the server? I tried java SearchServer.java but it
complains about:

Exception in thread “main” java.lang.NoClassDefFoundError

Thank you so much once again. I obviously owe you :wink:

Thanks
Frank

Erik H. [email protected] wrote:
On Feb 22, 20 06, at 5:09 PM, softwareengineer 99 wrote:

Many thanks for your reply. I can imagine how “rare” a “few free
minutes” can be and certainly appreciate your assistance.

I placed the .jar files for Lucene and XML-RPC in my classpath and
tried to compile the SearchServer.java with:

javac -cp /var/java/jdk1.5.0_06/lib/lucene-1.4.3.jar:/var/java/
jdk1.5.0_06/lib/xmlrpc-3.0a1.jar:/var/java/jdk1.5.0_06/lib/lucene-
core-1.9-rc1.jar /var/java/development/SearchServer.java

You have two different versions of Lucene in your classpath. Remove
one of them (I recommend you use 1.9RC1 instead of 1.4.3). This
shouldn’t be related to the compilation error you’re getting…

I keep getting the following error:

/var/java/development/SearchServer.java:55: cannot find symbol
symbol : method addHandler(java.lang.String,SearchServer)
location: class org.apache.xmlrpc.webserver.WebServer
server.addHandler(“$default”, new SearchServer
^
1 error

I just compiled my SearchServer using this command-line (normally I
use an Ant build file though):

$ javac -cp lib/lucene-core-1.9-rc1-dev.jar:lib/xmlrpc-2.0.jar src/
java/org/nines/SearchServer.java

And it compiled just fine.

Erik


Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails

Rails Blog: http://railsruby.blogspot.com
MySQL Blog: http://mysqldatabaseadministration.blogspot.com
Linux / Security Blog: http://frankmash.blogspot.com


What are the most popular cars? Find out at Yahoo! Autos


Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails

Rails Blog: http://railsruby.blogspot.com
MySQL Blog: http://mysqldatabaseadministration.blogspot.com
Linux / Security Blog: http://frankmash.blogspot.com

Erik,
Thanks for your email.

I removed the duplicate jar file and downloaded xmlrpc-2.0.jar
(instead of v 3) and it compiled without any errors. I guess there is
some issue with XMLRPC-3? Thank you very much for the tip.

Now I have it compiled, I would like to customize the server and start
it so I can query it.

Do I just put the lucene indexing methods in the searchServer.java?
Is there an example code for indexing databases? Any reference
/pointers are highly appreciated.

How do I start the server? I tried java SearchServer.java but it
complains about:

Exception in thread “main” java.lang.NoClassDefFoundError

Thank you so much once again. I obviously owe you :wink:

Thanks
Frank

Erik H. [email protected] wrote:
On Feb 22, 2006, at 5:09 PM, softwareengineer 99 wrote:

Many thanks for your reply. I can imagine how “rare” a “few free
minutes” can be and certainly appreciate your assistance.

I placed the .jar files for Lucene and XML-RPC in my classpath and
tried to compile the SearchServer.java with:

javac -cp /var/java/jdk1.5.0_06/lib/lucene-1.4.3.jar:/var/java/
jdk1.5.0_06/lib/xmlrpc-3.0a1.jar:/var/java/jdk1.5.0_06/lib/lucene-
core-1.9-rc1.jar /var/java/development/SearchServer.java

You have two different versions of Lucene in your classpath. Remove
one of them (I recommend you use 1.9RC1 instead of 1.4.3). This
shouldn’t be related to the compilation error you’re getting…

I keep getting the following error:

/var/java/development/SearchServer.java:55: cannot find symbol
symbol : method addHandler(java.lang.String,SearchServer)
location: class org.apache.xmlrpc.webserver.WebServer
server.addHandler(“$default”, new SearchServer
^
1 error

I just compiled my SearchServer using this command-line (normally I
use an Ant build file though):

$ javac -cp lib/lucene-core-1.9-rc1-dev.jar:lib/xmlrpc-2.0.jar src/
java/org/nines/SearchServer.java

And it compiled just fine.

Erik


Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails

Rails Blog: http://railsruby.blogspot.com
MySQL Blog: http://mysqldatabaseadministration.blogspot.com
Linux / Security Blog: http://frankmash.blogspot.com

Heh, you’re gonna laugh… the args array is command line args! Just run
your class like this:

java SearchServer /var/www/html

assuming that “/var/www/html” was the index path you wanted. That
command line also
assumes that you’ve resolved your library dependencies (those jars you
downloaded) some
way other than adding the classpath option to the command line. Sounds
like you already
figured that part out from your previous email.

b

Thanks Ben for the rescue.

I can’t believe I didn’t figure it out especially cause PHP uses a
similar args array.

The server compiles and runs but now I keep getting

java.lang.NoClassDefFoundError:
org/apache/commons/codec/DecoderException

I downloaded the following file
wget
http://apache.mirrors.esat.net/java-repository/commons-codec/jars/commons-codec-1.3.jar

and placed it in my class path but to no avail.

The full error when trying to call a test function is :

Exception in thread “Thread-0” java.lang.NoClassDefFoundError:
org/apache/commons/codec/DecoderException
at org.apache.xmlrpc.XmlRpc.createTypeFactory(XmlRpc.java:238)
at org.apache.xmlrpc.XmlRpc.(XmlRpc.java:193)
at
org.apache.xmlrpc.XmlRpcRequestProcessor.(XmlRpcRequestProcessor.java:40)
at org.apache.xmlrpc.XmlRpcWorker.(XmlRpcWorker.java:43)
at
org.apache.xmlrpc.XmlRpcServer.createWorker(XmlRpcServer.java:180)
at
org.apache.xmlrpc.XmlRpcServer.getWorker(XmlRpcServer.java:170)
at
org.apache.xmlrpc.XmlRpcServer.execute(XmlRpcServer.java:136)
at
org.apache.xmlrpc.XmlRpcServer.execute(XmlRpcServer.java:125)
at
org.apache.xmlrpc.WebServer$Connection.run(WebServer.java:746)
at org.apache.xmlrpc.WebServer$Runner.run(WebServer.java:626)
at java.lang.Thread.run(Thread.java:595)

Any ideas which dependency I am missing now?

Thanks a zillion
Frank

Ben M. [email protected] wrote: Heh, you’re gonna laugh… the args
array is command line args! Just run your class like this:

java SearchServer /var/www/html

assuming that “/var/www/html” was the index path you wanted. That
command line also
assumes that you’ve resolved your library dependencies (those jars you
downloaded) some
way other than adding the classpath option to the command line. Sounds
like you already
figured that part out from your previous email.

b

softwareengineer 99 wrote:

     >
     > symbol : method addHandler(java.lang.String,SearchServer)

*
_______________________________________________

Linux / Security Blog: http://frankmash.blogspot.com*
*


Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails
*


Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails

Rails Blog: http://railsruby.blogspot.com
MySQL Blog: http://mysqldatabaseadministration.blogspot.com
Linux / Security Blog: http://frankmash.blogspot.com

While researching online I found this thread where the thread owner had
the same issue as mine:

http://mail-archives.apache.org/mod_mbox/ws-xmlrpc-dev/200507.mbox/[email protected]>

However, I have tried to include the DecoderException class, and put
it in my class path, but my error persists?

Any ideas are appreciated.

Frank

Rails Blog: http://railsruby.blogspot.com
MySQL Blog: http://mysqldatabaseadministration.blogspot.com
Linux / Security Blog: http://frankmash.blogspot.com

Sorry, I forgot to mention that on client side I keep getting the
following errors:

End of file reached

Once the test server works, I will be on my way to putting Lucene’s
indexing and searching methods.

I highly appreciate your assistance.

Thanks
Frank

softwareengineer 99 [email protected] wrote:

Rails Blog: http://railsruby.blogspot.com
MySQL Blog: http://mysqldatabaseadministration.blogspot.com
Linux / Security Blog: http://frankmash.blogspot.com

softwareengineer 99 wrote:

Ferret may be suitable - only testing (or real world use!) will tell.

I keep having problems with Ferret on ruby-forum.com. It’s giving me
stale logfiles, occasional crashes, and exploding index files (from 3 to
60 MB after adding 3 new documents).