This is a migrated thread and some comments may be shown as answers.

Update issue: PCStateMan not serializable

7 Answers 43 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Roman
Top achievements
Rank 1
Roman asked on 09 Jun 2010, 08:31 AM
Greetings

I tried to update my project from the previous version to 2010.1.527.2 by using Check Settings. Unfortunately Check Settings only checked very few assemblies and then marked everything "green", therefore I had to replace the assemblies manually. The result of replacing them is the following error (translated from German):

"OpenAccessRuntime.DataObjects.PCStateMan" in assembly "Telerik.OpenAccess.Runtime, Version=2010.1.527.2, Culture=neutral, PublicKeyToken=7ce17eeaf1d59342" is not marked as serializable

Some details: My data models are created by reverse engineering and I manually added a "serializable" attribute to them.

Thanks in advance for your help
Kind regards
Roman

7 Answers, 1 is accepted

Sort by
0
Jan Blessenohl
Telerik team
answered on 09 Jun 2010, 10:38 AM
Hello Roman,
Can you send me the enhanced assembly so that I can have a look why our internal fields are not marked as nonserializable?

Kind regards,
Jan Blessenohl
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Roman
Top achievements
Rank 1
answered on 09 Jun 2010, 02:09 PM
Hello Jan

Thanks for the quick reply. Here's a link to the file.
If you need any further information please let me know.

Again, many thanks
Kind regards
Roman
0
Jan Blessenohl
Telerik team
answered on 09 Jun 2010, 02:32 PM
Hello Roman,
You have sent me my own runtime assembly, I need your assembly with your class which you try to serialize.

Best wishes,
Jan Blessenohl
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Roman
Top achievements
Rank 1
answered on 09 Jun 2010, 03:05 PM
Oh, I'm sorry. I updated the link, it should contain the right DLL now. It simply contains my DataModel project.

Thanks
Roman
0
Jan Blessenohl
Telerik team
answered on 09 Jun 2010, 03:37 PM
Hi Roman,
The assembly looks good and i have tested with this code:

var scope = ObjectScopeProvider1.GetNewObjectScope();
scope.Transaction.Begin();
Category c = new Category();
scope.Add(c); // sets the failing PCStateMan
var ser = new XmlSerializer(typeof(Category));
var stream = new System.IO.MemoryStream();
ser.Serialize(stream,c);

Maybe you are doing something different. Can you give the the complete stacktrace? Just catch the exception and print e.ToString()

Regards,
Jan Blessenohl
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Roman
Top achievements
Rank 1
answered on 09 Jun 2010, 03:47 PM
Hmm the only thing I actually do is storing these items in the ViewState and later rebuilding them from it. Well, here's the stacktrace:

[SerializationException: Der Typ "OpenAccessRuntime.DataObjects.PCStateMan" in Assembly "Telerik.OpenAccess.Runtime, Version=2010.1.527.2, Culture=neutralPublicKeyToken=7ce17eeaf1d59342" ist nicht als serialisierbar gekennzeichnet.] 
   System.Runtime.Serialization.FormatterServices.InternalGetSerializableMembers(RuntimeType type) +7736011 
   System.Runtime.Serialization.FormatterServices.GetSerializableMembers(Type type, StreamingContext context) +258 
   System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitMemberInfo() +111 
   System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitSerialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter) +161 
   System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.Serialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter) +51 
   System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Write(WriteObjectInfo objectInfo, NameInfo memberNameInfo, NameInfo typeNameInfo) +7633988 
   System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(Object graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck) +461 
   System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph, Header[] headers, Boolean fCheck) +134 
   System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph) +13 
   System.Web.UI.ObjectStateFormatter.SerializeValue(SerializerBinaryWriter writer, Object value) +845 
 
[ArgumentException: Fehler beim Serialisieren des Wertes System.Collections.Generic.List`1[XSite.QUOX.DataModel.CostItem] vom Typ 'System.Collections.Generic.List`1[[XSite.QUOX.DataModel.CostItem, XSite.QUOX.DataModel, Version=1.0.0.0, Culture=neutralPublicKeyToken=null]].'] 
   System.Web.UI.ObjectStateFormatter.SerializeValue(SerializerBinaryWriter writer, Object value) +3395 
   System.Web.UI.ObjectStateFormatter.Serialize(Stream outputStream, Object stateGraph) +110 
   System.Web.UI.ObjectStateFormatter.Serialize(Object stateGraph) +57 
   System.Web.UI.ObjectStateFormatter.System.Web.UI.IStateFormatter.Serialize(Object state) +4 
   System.Web.UI.Util.SerializeWithAssert(IStateFormatter formatter, Object stateGraph) +37 
   System.Web.UI.HiddenFieldPageStatePersister.Save() +79 
   System.Web.UI.Page.SavePageStateToPersistenceMedium(Object state) +105 
   System.Web.UI.Page.SaveAllState() +236 
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1099 
 

Thanks again, definitely apreciating the help
Best
Roman
0
Accepted
Jan Blessenohl
Telerik team
answered on 09 Jun 2010, 05:28 PM
Hello Roman,
I have fixed it, thanks for your help, we will try to release a custom build by tomorrow. Find your Telerik points in your account.

Best wishes,
Jan Blessenohl
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
General Discussions
Asked by
Roman
Top achievements
Rank 1
Answers by
Jan Blessenohl
Telerik team
Roman
Top achievements
Rank 1
Share this question
or