Results 1 to 2 of 2
  1. #1
    deepali is offline Member
    Join Date
    Sep 2011
    Posts
    8
    Rep Power
    0

    Post Nonserializable Exception in java

    I'm getting NonserializableException when I'm converting an object to bytestream. At the following point my code is failing.
    ByteArrayOutputStream bos = new ByteArrayOutputStream();
    ObjectOutputStream oos=null;
    oos = new ObjectOutputStream(bos);
    //oos.flush();
    oos.writeObject(o1);
    //Here at the time of calling writeObject() it's giving me the error
    Please suggest any solution . Thanks in advance.

  2. #2
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,458
    Blog Entries
    7
    Rep Power
    20

    Default Re: Nonserializable Exception in java

    Your object o1 or one of its members doesn't implement the Serializable interface.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

Similar Threads

  1. unreported exception java.lang.Exception
    By Marisabel in forum New To Java
    Replies: 6
    Last Post: 05-01-2011, 03:21 AM
  2. Replies: 5
    Last Post: 02-14-2011, 11:39 PM
  3. Java Exception on Lotus Notes java agent
    By BO2LA in forum Advanced Java
    Replies: 0
    Last Post: 12-22-2010, 10:10 AM
  4. Replies: 4
    Last Post: 10-25-2010, 07:42 PM
  5. Replies: 1
    Last Post: 03-08-2008, 06:41 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •