0 Replies Latest reply: Jun 20, 2012 1:37 AM by 943617 RSS

    BufferedImage exception NotSerializableException

    943617
      Hi i am getting this error
      java.io.NotSerializableException: java.awt.image.BufferedImage
           at java.io.ObjectOutputStream.writeObject0(Unknown Source)
           at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)
           at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
           at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
           at java.io.ObjectOutputStream.writeObject0(Unknown Source)
           at java.io.ObjectOutputStream.writeArray(Unknown Source)
           at java.io.ObjectOutputStream.writeObject0(Unknown Source)
           at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)
           at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
           at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
           at java.io.ObjectOutputStream.writeObject0(Unknown Source)
           at java.io.ObjectOutputStream.writeObject(Unknown Source)


      when im doing this for 2nd time

      FileOutputStream fileOut = new FileOutputStream(tempURFile);
      ObjectOutputStream objOut = new ObjectOutputStream(fileOut);

      objOut.writeObject(anObject);
      fileOut.close();
      objOut.close();



      tempURFile is a final and static variable in my class

      public static final File tempURFile = new File("tempfile");



      please help me