java.io.NotSerializableException

i have this error, how can i resovled this:

Caused by: java.io.NotSerializableException: com.mysql.jdbc.Blob

this is the object class:

import java.io.Serializable;
import java.sql.Blob;
import java.util.Date;

public class IncidentObject implements Serializable {

      public IncidentObject() {

      }

      private Blob attachment;

      private Blob xml_parse_date;

      /**
       * @return Returns the attachment.
       */
      public Blob getAttachment()   {
            return attachment;
      }

      /**
       * @return Returns the xml_parse_date.
       */
      public Blob getXml_parse_date() {
            return xml_parse_date;
      }

}
poweranger77Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

avinthmCommented:
can u post the complete stack trace ? i mean complete exception ?
TimYatesCommented:
    private Blob attachment;

You can't serialize a Blob

You have two choices...

1) change the Blob into a serializable datatype (byte array?)
2) Don't serialize out the blob field:

     private transient Blob attachment;

will stop the serializer running on it

Tim

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
poweranger77Author Commented:
ok. i dont understand what doest it mean by serialized the BLOB?

this error will only prompt when i keep my application server running and i am trying to amend the program code in Eclipse development platform.

what is this serialized? means?

and also, how can i transfrom this BLOB datatype to another form of datatype such as String?

TimYates, can you help to share you view in this thread?
http://www.experts-exchange.com/Web/Web_Languages/JSP/Q_21780229.html
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JSP

From novice to tech pro — start learning today.