Advanced deserialization: deserialize unknown class
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Alexander_Guzanov
Posted On:   Wednesday, June 22, 2005 05:00 AM

I have some base class for exception in my system - BaseException. After any failer in system I serialize this exception in file. The cause of exception can be of any type, even not existent in project classes(this was achived by classloader manupulation during exception throws)

I have to deserialize such exceptions. The problem arise if the type of cause not exists in current classpath. With this cause I want to do the next: read it message and stacktrace
and construct my own exception, some SystemExcpetion with this message and stack trace.

Re: Advanced deserialization: deserialize unknown class

Posted By:   Anonymous  
Posted On:   Tuesday, July 5, 2005 12:12 PM

Also please respond to my question.
As Serializable Interface dosen't contain any method.
then how jvm comes to know to serialize that perticular class.

Thanks

Re: Advanced deserialization: deserialize unknown class

Posted By:   Christopher_Koenigsberg  
Posted On:   Wednesday, June 22, 2005 08:15 PM

Instead of serializing the class of your exception, why not just devise your own format for saving the essential details, and write that out, perhaps in xml or something like that.
About | Sitemap | Contact