Hi,
We are working with distributing Lucene.net. We have Master Index
Server which takes responsibility of distributing the index searching
to multiple Index Servers by calling the remote method Search(...) of
the Index Server. It is when the Master Server de-serializing the
response message from the Index Server, we got the following
SerializationException.
The Search method is overloaded:
TopDocs docs = searchable.Search(weight, filter, nDocs);
TopFieldDocs fDocs = searchable.Search(weight, filter, nDocs, sort);
TopDocs is the parent class of TopFieldDocs. The difference is that
the second method takes an extra parameters of type Sort and returns
the child type TopFieldDocs of TopDocs. The first method works
properly. Stepping through the Index Server shows that the results on
the IndexServer is properly generated for the second method.
Does anyone know what the issue is or how to debug it?
System.Runtime.Serialization.SerializationExceptio n: Binary stream
'99' does not contain a valid BinaryHeader. Possible causes are
invalid stream or object version change between serialization and
deserialization.
Server stack trace:
at
System.Runtime.Serialization.Formatters.Binary.__B inaryParser.Run()
at
System.Runtime.Serialization.Formatters.Binary.Obj ectReader.Deserialize(HeaderHandler
handler, __BinaryParser serParser, Boolean fCheck, Boolean
isCrossAppDomain, IMethodCallMessage methodCallMessage)
at
System.Runtime.Serialization.Formatters.Binary.Bin aryFormatter.Deserialize(Stream
serializationStream, HeaderHandler handler, Boolean fCheck, Boolean
isCrossAppDomain, IMethodCallMessage methodCallMessage)
at
System.Runtime.Remoting.Channels.CoreChannel.Deser ializeBinaryResponseMessage(Stream
inputStream, IMethodCallMessage reqMsg, Boolean bStrictBinding)
at
System.Runtime.Remoting.Channels.BinaryClientForma tterSink.SyncProcessMessage(IMessage
msg)
Exception rethrown at [0]:
at
System.Runtime.Remoting.Proxies.RealProxy.HandleRe turnMessage(IMessage
reqMsg, IMessage retMsg)
at
System.Runtime.Remoting.Proxies.RealProxy.PrivateI nvoke(MessageData&
msgData, Int32 type)
at Lucene.Net.Search.Searchable.Search(Weight weight, Filter
filter, Int32 n, Sort sort)
at Lucene.Net.Search.MultiSearcherThread.Run() in C:\Dev\TrueLocal
\TrueLocal.Lucene.Net-2.0.0\Search\ParallelMultiSearcher.cs:line 278