+ Start a Discussion
maheshep.ax379maheshep.ax379 

error :System.SerializationException: Not Serializable: LIST:Messaging.Email

When I am sending a mail i am getting a this exception.

System. : Not Serializable: LIST:Messaging.Email

Class.SendMailController.getIsSignature: line 280, column 9


The getIsSignature method has no relation with mail

    public boolean getIsSignature ()
    {
        try
        {
        return this.isSignature;
        }
        catch(Exception ex)
        {
        return null;
        }
    }

I don't know why this error triggers.
can anybody help me. Thanks in advance.
Rusty12Rusty12

i am getting a very similar exception in a seemingly benign piece of code.

 

System.SerializationException: Not Serializable: System.XmlStreamWriter

Class.pageCon: line 32, column 13

 

      public String selectedPageType {
         get{
             if (selectedPageType == null) selectedPageType = 'detail';
             return selectedPageType;  // this is line 32
         }
         set;
     }

 

Rusty12Rusty12
nevermind.  had to mark my XMLStreamWriter wrapper class variable as transient in my controller.  then it worked fine.