0

I serialize all of my class but get exception...anyone can say which one of class properties cause this problem?

1-

    public class UserManage  {
       public ArrayList<User> users=null;

2-

public class User implements java.io.Serializable      {
    private String firstName;
    private ArrayList<Repository> userRepositories=null;

3-

public class Repository implements java.io.Serializable {
    public  String parentPathOfAllRepositories="D:\\TestOfJava";
    private ArrayList<String> contributorsID=null;
    private String ParentDefaultPath=null;
    private HashMap<File,String> LockListFile=null;
    private HashMap<File,String> FileHashlist=null;
    private String VersionHolderFolderPath=null;

    private HashMap<HashMap<File,String>,HashMap<Date,String>> VersionsList=null;

I must say that ArrayList<User> in class UserManage must be serialize to a file

[Update]:Exception Message:java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: Client.User

MEAM
  • 61
  • 8
  • update your exception message also. – Piyush Gupta Dec 17 '15 at 06:58
  • 2
    Show us the exception message. – Louis Wasserman Dec 17 '15 at 06:58
  • @LouisWasserman.In my Last post http://stackoverflow.com/questions/34319544/notserializableexception-wiht-hashmap-serialize?noredirect=1#comment56383736_34319544 you said me to serialize.but i serialize and got this exception again – MEAM Dec 17 '15 at 07:02
  • 1
    I do not see any non-serializable classes in the `User` class, but I would either remove all fields and add them one by one again to see which one is causing the issue or put `transient` in front of all fields and then remove it one by one while executing the serialization after each step. Also, ideally provide a [mcve] so that we can reproduce the issue. – Andreas Fester Dec 17 '15 at 07:13

0 Answers0