Asymmetric Serialization (Impossible Deserialization)
Hello,
I have a not so common, though possible useful situation that appears to be impossible to implement in JAVA.
The idea is like this: I would like to have a core functionality, which is programmed as a normal JAVA program and then extend it over time with several plug-ins. These plug-ins are delivered as .jar-files, objects are instantiated from classes in the .jar files (withjava.net.URLClassLoader), they have a state and can be stored in a serialized form. So far, so good, until...
... you want to deserialize the stored objects of classes that are not defined in the original program. The deserialization appears to use the system class loader and as the classes are not defined in the program (but in the .jar-files), any attempt to deserialize results in ajava.lang.ClassNotFoundException. Though, the objects are there!
You can create objects from .jar-files, you can store them, but you can't reload them. You see the assymetry? I think it is inconvenient. If anyone would know a way to load serialized objects for which the class definition is in .jar-files or explain why it has to be conceptually impossible, I would be very grateful,
thanks.

