lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From luc...@fantasymail.de
Subject HitCollector not serializable (Bug?)
Date Sun, 15 Jun 2003 20:18:19 GMT
Hi,

i tried Lucene 1.3 RC1.

There seems to be a bug in
org.apache.lucene.search.RemoteSearchable.search(). 

Here is my code:
   Searchable searcher =
      (Searchable) Naming.lookup(args[0]);
   Analyzer analyzer = new StandardAnalyzer();
   Query query = QueryParser.parse("term", "content", analyzer);
   HitCollector hc = new HitCollector()
   {
      public void collect(int doc, float score)
      {
           //bits.set(doc);
      }
   };

   searcher.search(query, (DateFilter)null, hc);

I'm getting the following exception:

java.rmi.MarshalException: error marshalling arguments; nested exception
 is: java.io.NotSerializableException:
 com.entwickler.lucenebuch.remote.SearchClient$1
         at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:129)
         at org.apache.lucene.search.RemoteSearchable_Stub.search(Unknown
 Source)
         at
 com.entwickler.lucenebuch.remote.SearchClient.main(SearchClient.java:47)
 Caused by: java.io.NotSerializableException:
 com.entwickler.lucenebuch.remote.SearchClient$1
         at
 java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054)
         at
 java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278) at
 sun.rmi.server.UnicastRef.marshalValue(UnicastRef.java:265) at
 sun.rmi.server.UnicastRef.invoke(UnicastRef.java:124)


This happens because org.apache.lucene.search.HitCollector is not
serializable.


Greetings
Manfred

-- 
+++ GMX - Mail, Messaging & more  http://www.gmx.net +++
Bitte l├Ącheln! Fotogalerie online mit GMX ohne eigene Homepage!


---------------------------------------------------------------------
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