Update issue: PCStateMan not serializable

Thread is closed for posting
8 posts, 1 answers
  1. Roman
    Roman avatar
    40 posts
    Member since:
    Jan 2009

    Posted 09 Jun 2010 Link to this post

    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
  2. Jan Blessenohl
    Admin
    Jan Blessenohl avatar
    707 posts

    Posted 09 Jun 2010 Link to this post

    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.
  3. Roman
    Roman avatar
    40 posts
    Member since:
    Jan 2009

    Posted 09 Jun 2010 Link to this post

    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
  4. Jan Blessenohl
    Admin
    Jan Blessenohl avatar
    707 posts

    Posted 09 Jun 2010 Link to this post

    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.
  5. Roman
    Roman avatar
    40 posts
    Member since:
    Jan 2009

    Posted 09 Jun 2010 Link to this post

    Oh, I'm sorry. I updated the link, it should contain the right DLL now. It simply contains my DataModel project.

    Thanks
    Roman
  6. Jan Blessenohl
    Admin
    Jan Blessenohl avatar
    707 posts

    Posted 09 Jun 2010 Link to this post

    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.
  7. Roman
    Roman avatar
    40 posts
    Member since:
    Jan 2009

    Posted 09 Jun 2010 Link to this post

    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
  8. Answer
    Jan Blessenohl
    Admin
    Jan Blessenohl avatar
    707 posts

    Posted 09 Jun 2010 Link to this post

    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.
Back to Top