473,796 Members | 2,664 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Binary stream '99' does not contain a valid BinaryHeader

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
SerializationEx ception.

The Search method is overloaded:

TopDocs docs = searchable.Sear ch(weight, filter, nDocs);
TopFieldDocs fDocs = searchable.Sear ch(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.S erializationExc eption: 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.F ormatters.Binar y.__BinaryParse r.Run()
at
System.Runtime. Serialization.F ormatters.Binar y.ObjectReader. Deserialize(Hea derHandler
handler, __BinaryParser serParser, Boolean fCheck, Boolean
isCrossAppDomai n, IMethodCallMess age methodCallMessa ge)
at
System.Runtime. Serialization.F ormatters.Binar y.BinaryFormatt er.Deserialize( Stream
serializationSt ream, HeaderHandler handler, Boolean fCheck, Boolean
isCrossAppDomai n, IMethodCallMess age methodCallMessa ge)
at
System.Runtime. Remoting.Channe ls.CoreChannel. DeserializeBina ryResponseMessa ge(Stream
inputStream, IMethodCallMess age reqMsg, Boolean bStrictBinding)
at
System.Runtime. Remoting.Channe ls.BinaryClient FormatterSink.S yncProcessMessa ge(IMessage
msg)

Exception rethrown at [0]:
at
System.Runtime. Remoting.Proxie s.RealProxy.Han dleReturnMessag e(IMessage
reqMsg, IMessage retMsg)
at
System.Runtime. Remoting.Proxie s.RealProxy.Pri vateInvoke(Mess ageData&
msgData, Int32 type)
at Lucene.Net.Sear ch.Searchable.S earch(Weight weight, Filter
filter, Int32 n, Sort sort)
at Lucene.Net.Sear ch.MultiSearche rThread.Run() in C:\Dev\TrueLoca l
\TrueLocal.Luce ne.Net-2.0.0\Search\Pa rallelMultiSear cher.cs:line 278

Sep 12 '07 #1
0 1928

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
3162
by: nightflyer | last post by:
Hi all, [code snippet appended at the end.) my question: A class has a few string variables with not know length at design time. Now I declare lets say a 1000 of those classes and put them in a vector. Can I write that vector directly to a binary file?
103
48769
by: Steven T. Hatton | last post by:
§27.4.2.1.4 Type ios_base::openmode Says this about the std::ios::binary openmode flag: *binary*: perform input and output in binary mode (as opposed to text mode) And that is basically _all_ it says about it. What the heck does the binary flag mean? -- If our hypothesis is about anything and not about some one or more particular things, then our deductions constitute mathematics. Thus mathematics may be defined as the subject in...
1
12067
by: BH | last post by:
I'm trying a simple object serialization and deserialization, and keep getting this error: System.Runtime.Serialization.SerializationException: Binary stream does not contain a valid BinaryHeader, 0 possible causes, invalid stream or object version change between serialization and deserialization. Here's my code. it does nothing but to serialize a DataTable object into a byte array, and then read the byte array back for...
11
11963
by: ajou_king | last post by:
I was running some tests on my Win32 1GHZ processor to see how long it would take to transmit objects numerous times via TCP/IP using C# ..NET Remoting vs the C++ trustworthy method of binary streams. I ran the test for 50K, 100K, 500K iterations, where each iteration consists of sending an object from a client process to a server process, and the server process sends back an ack. Here are the results: .NET Remoting C++...
5
5314
by: Neo | last post by:
Hello: I am receiving a Binary File in a Request from a application. The stream which comes to me has the boundary (Something like "---------------------------39<WBR>­0C0F3E0099" without the quotes), and also some more text like this and file name (e.g. "Content-Disposition: form-data; name="upload_file"; filename="C:\testing\myfile.da<WBR>­t" Content-Type: application/octet-stream")
3
3489
by: Arun | last post by:
Hi, I have simple question to ask. How to write multiple Binary files to the Browser using Asp.Net and Visual C#.net I have seen examples where single binary file is written to browser. -Regards Arun
12
5931
by: Adam J. Schaff | last post by:
I am writing a quick program to edit a binary file that contains file paths (amongst other things). If I look at the files in notepad, they look like: <gibberish>file//g:\pathtofile1<gibberish>file//g:\pathtofile2<gibberish> etc. I want to remove the "g:\" from the file paths. I wrote a console app that successfully reads the file and writes a duplicate of it, but fails for some reason to do the "replacing" of the "g:\". The code...
68
5262
by: vim | last post by:
hello everybody Plz tell the differance between binary file and ascii file............... Thanks in advance vim
2
21270
by: akitoto | last post by:
Hi there, I am using the std::stringstream to create a byte array in memory. But it is not working properly. Can anyone help me? Code: #include <vector> #include <sstream> #include <iostream.h>
0
9685
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9533
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10190
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10019
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7555
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5447
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5579
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4122
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3736
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.