473,795 Members | 2,834 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Exception while serialization

Hi NG,

I serialize the following class over .net remoting:

using System;
using System.Collecti ons;

namespace JobServerLib
{

[Serializable]
public class ParkTree
{

public System.Collecti ons.Queue m_Tree;

public ParkTree()
{
m_Tree = new Queue(1024);
}
}
}

The remoting normaly works fine over 1000 requests, but sometimes
I got this exception from the framework:

Log: 26.01.2005 21:42:53 Msg: System.NullRefe renceException: Der
Objektverweis wurde nicht auf eine Objektinstanz festgelegt.

Server stack trace:
at
System.Data.Dat aTable.System.R untime.Serializ ation.ISerializ able.GetObjectD ata(Serializati onInfo info, StreamingContex t context)
at
System.Runtime. Serialization.F ormatters.Soap. WriteObjectInfo .InitSerialize( Object
obj, ISurrogateSelec tor surrogateSelect or, StreamingContex t context,
SerObjectInfoIn it serObjectInfoIn it, IFormatterConve rter converter,
SoapAttributeIn fo attributeInfo)
at
System.Runtime. Serialization.F ormatters.Soap. WriteObjectInfo .Serialize(Obje ct
obj, ISurrogateSelec tor surrogateSelect or, StreamingContex t context,
SerObjectInfoIn it serObjectInfoIn it, IFormatterConve rter converter,
SoapAttributeIn fo attributeInfo)
at
System.Runtime. Serialization.F ormatters.Soap. ObjectWriter.Wr ite(WriteObject Info objectInfo, NameInfo memberNameInfo, NameInfo typeNameInfo)
at
System.Runtime. Serialization.F ormatters.Soap. ObjectWriter.Se rialize(Object
graph, Header[] inHeaders, SoapWriter serWriter)
at
System.Runtime. Serialization.F ormatters.Soap. SoapFormatter.S erialize(Stream
serializationSt ream, Object graph, Header[] headers)
at
System.Runtime. Remoting.Channe ls.CoreChannel. SerializeSoapMe ssage(IMessage
msg, Stream outputStream, Boolean includeVersions )
at
System.Runtime. Remoting.Channe ls.SoapClientFo rmatterSink.Ser ializeMessage(I MethodCallMessa ge mcm, ITransportHeade rs& headers, Stream& stream)
at
System.Runtime. Remoting.Channe ls.SoapClientFo rmatterSink.Syn cProcessMessage (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 ClientAPI.Clien tAPI.msgToClien t(String msg, Int32 code, Object obj)

I serialize a Queue, but I get erros with a DataTable.
I don´t understand this exception.

Thanx
Stephan
Jul 21 '05 #1
0 1238

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

Similar topics

3
3171
by: Don McNamara | last post by:
Hi, I've hit quite a strange problem with XmlSerializer on my W2K3 server. When I serialize/deserialize using an exe on my local computer (XP), everything works fine. When I put the code out on the server (W2K3) it throws an exception. It only seems to happen when serializing/deserializing _arrays_ of a type. If I just serialize/deserialize one instance, it works fine. The exception I get is: (sorry for the word wrapping.)...
3
2876
by: Steve | last post by:
I've been following a couple remoting tutorials on the web, they are all pretty much the same. I've got my different applications built(client, server and remote object (dll)) The client is able to get a reference to the remote object and that works fine. When I try to make a call to a remote object's method I get an exception: System.Runtime.Serialization.SerializationException: Cannot find the assembly ProcessTest,...
1
2457
by: Tim Anderson | last post by:
I have an app that uses the SOAP serializer to serialize and deserialize a object of a certain class to a file. The class implements ISerializable. From time to time it is necessary to add or remove fields from the class. I've been able to deserialize out-of-date versions by handling serialization exceptions in Sub New(ByVal info As SerializationInfo, ByVal context As StreamingContext). I've now hit a problem. With the latest version, if...
0
1550
by: stand__sure | last post by:
in re-reading something on .NET remoting I realized that I had done nothing with lease sponsorship and renewal. so, I dug around in msdn2 and found this topic http://msdn2.microsoft.com/library/6tkeax11(en-us,vs.80).aspx. However, in my testing I have come across a Security Exception that I cannot overcome. The documentation seems to indicate an Infrastructure permission being needed, but I have declaratively demanded this permission......
0
219
by: Stephan Moeller | last post by:
Hi NG, I serialize the following class over .net remoting: using System; using System.Collections; namespace JobServerLib {
9
6653
by: MR | last post by:
I get the following Exception "The data at the root level is invalid. Line 1, position 642" whenever I try to deserialize an incoming SOAP message. The incoming message is formed well and its length is 642 bytes ( I have appended it to the end of this message). I suspect that the reason may have something to do with an incorrect declaration of which class to de-serialize to. In the attached code I substituted @@@@@@@ in the code below with...
6
1901
by: semedao | last post by:
Hi All, I had working code that made custom serialization on objects that inherit from queue in the inherited queue I create my own GetObjectData: public void GetObjectData(SerializationInfo info, StreamingContext ctxt) { lock (this.SyncRoot) {
1
2718
by: SP | last post by:
I have a web service application which uses 3rd party assemblies. I recently upgraded my solution to use .NET Framework 2.0 instead of .NET Framework 1.1. The 3rd party assemblies that I refer are built on .NET Framework 1.1 (but they are supposed to work under .NET Framework 2.0) Since upgrading the solution, I get an error saying : System.Web.Services.Protocols.SoapException: Server was unable to process request....
0
4105
by: harshal.borade | last post by:
I am using XmlSerializer with XmlAttributeOverrides. The XmlAttributeOverrides are used for properties which hold element/s derived from "AbstractMessage" type. System.Xml.Serialization.XmlRootAttribute(Namespace = "http:// www.TestNameSpace.org/Test-4-4", IsNullable = false)] class Root { public virtual Abstract_message Message
0
9673
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
9522
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,...
0
10443
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10002
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...
0
9044
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7543
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
5437
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
5565
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4113
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

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.