i am currently struggling with HTTP Session replication on tomcat with complex objects.
some objects implement Serializable but hold non-serializable members.
unfortunately, the stacktraces do not provide much useful info here by default.
there is a flag -XX:???? to enable verbose class names in the stacktrace when a NotSerializableEx...
We just switched to Glassfish V2. We are now getting errors when setting a session attribute.
Error is:
java.lang.IllegalArgumentException: PWC2788: setAttribute: Non-serializable attribute
Code is:
getRequest().getSession().setAttribute("questionsForUser", getQuestions());
getQuestions() is just a simple getter which is inside a...
I am doing Binary Serilization of big nested data structure.
Whenever [Serilizable] attribute is added to class, all the members are automatically serialized.
I want to specifically select the fields that need to be serialized.
As of now i am using [NonSerialized] Attribute for fields to opt out from serilization.
Is there any way i can...
Lets say I have some domain objects that will need to be serialized/packed using a custom binary format so they can be sent over sockets to external processes. My first instinct would be to create an interface that represents any object that can be packed into this binary format.
public interface IPackable
{
byte[] Pack();
}
Then...
Hi ..
I have a problem in Java hashtable serialization that seems illogical to me but i am not able to find out the error in the logic i am using. Here is what i am doing,
Hashtable sspsrpData = new Hashtable();
for(int i=0;i<Constants.secondayStructures.length;i++) {
SecondaryStructures ss = (SecondaryStructures)(data.get(Constant...
When implementing the ISerializable interface in C#, we provide a constructor which takes a SerializationInfo object, and then queries it with various GetInt32, GetObject etc. methods in order to fill the fields of the object which we are trying to deserialize.
One major reason to implement this interface, rather than just using the [S...
See below a main() and two very simple classes. Then per Boost serialization (and what is shown) my questions are:
1) Does class B need the normal overloaded stream insertion operators '<<' and '>>' to be defined? Currently in my real code it doesn't have these.
2) Does class A in the store() and load() methods need to iterate thro...
Can silverlight 3 serialize annonymous objects?
...
I have a RemoteObject returning a 'Schedule' class. I've created a client side RemoteClass to map to it. All properties of the class instance are coming in fine. I just not clear on how I go about calling methods on the class. How would I call a setter on startdate?
package classes.remote
{
[Bindable]
[RemoteClass(alias...
Object graph for type '[type]' contains cycles and cannot be serialized if reference tracking is disabled.
I have a simple class hierarchy setup using NHibernate as my persistence layer.
For example:
public class Parent
{
public virtual IList<Child> Children{get;set;}
}
public class Child
{
public virtual Parent Parent{get;se...
Trying to "thaw" serialized objects that have been stored in an XML file:
In LinqToSQL, I can (with a suitably decorated class) do this type of thing:
[Table(Name="Plants")]
public class Plant
{
[Column(Name = "Id", IsPrimaryKey = true)]
public int Id { get; set; }
[Column(Name = "Genus")]
public string...
I have a structure of simple container classes like so (in pseudo ruby):
class A
attr_reader :string_field1, :string_field2
...
end
class B
attr_reader: int_field3, :string_field4
...
end
# C includes an instance of A and B
class C
attr_reader: :a_instance, :b_instance
...
end
Is there are simple way to de/serialize this...
Hi:
If we have some code(a data structure) which should be stored in DB, someone always suggests us to store the serialized data not the raw code string.
So I'm not so sure why we should prefer the serialized data.
Give a simple instance(in python):
we've got a field which will store a dict of python, like
{ "name" : "BMW", "catego...
I have some types which are generated by a web service reference. I want to serialize these objects using the DataContractJsonSerializer, so I need to add DataContract and DataMember attributes. Adding DataContract is no problem using partial classes. But the properties have no DataMember attributes, so I only get empty objects. Is there...
Is it possible to Deserialize the following piece of XML into a Dictionary<int,string> object?
XML:
<Config>
<DatabaseConnections>
<Connection Name="Source Connection" Value="ConnectionStringValue" />
<Connection Name="Target Connection" Value="ConnectionStringValue" />
<DatabaseConnections>
<Config>
I have a class which ...
I am adding a Personalizable Attribute to my custom implementation of WebPart class. This will be used by the Web Part Manager while rendering web parts to zones. I need to inject this new attribute and it's value to the existing personalization data for all users.
I could retrieve the byte array of the personalization data blob per us...
We have a requirement to process transactions as an ordered sequence. Transactions are initiated
on system 'A' and written to a DB/2 table. A DB/2 trigger then forwards
the transaction via MQSeries to system 'B' where the transaction is completed.
The problem we are having is that a race condition is established because execution
of the...
I'm having a serialized array of some type.
Is there a way to append new objects to this serialized array (in a serialized form) without the need to read the already saved collection into the memory?
Example:
I'm having in a file.xml, XML-serialized array of Entity containing 10^12 elements. I need to add another 10^5 elements to the s...
I found a bug in the .Net framework yesterday and found that it is a known bug that won't be fixed. In short the bug is that a class that contains a field of the type IComparable can't be binary serialized and deserialized when an int (and possibly other binary types) are assigned to that field:
[Serializable]
public class Foo
{
pub...
appreciate if anyone knows how to serialize a listview using vb.net
...