Without seeing the entire code, it looks to me like you are trying to write / read multiple UI instances. I.e. in the client you loop over your UI objects, calling writeObject() for each one; on the server, you’re looping, calling readObject() to get individual UI objects.
Others have reported much difficulty when trying to do this. For instance.
Unless you have a specific requirement to do otherwise, I suggest putting all your UI objects in a list, and do the writeObject / readObject using the list. Lists are serializable, so that should “just work”.