I created two methods to read/write serialized objects. The basic code for the read is shown below. Initially, both methods worked fine when contained in a class in the same Eclipse project as the class objects I was serializing. However, since it is generic code, I attempted to move the code to a separate utility project. The read code now fails with a ClassNotFoundException when it attempts to load a serialized file. I suspect it is a classloader issue because, within the utility project code, I can load the class to be read from a file using the
Thread context class loader but not with the class loader that loaded the class containing the read/write methods. However I am unsure how to make this work. Any suggestions?