[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A couple of newbie questons




> 1) What techniques can you share for debugging? I am getting 
> InstantiationExceptions when I try to create instances of certain 
> classes. In one case the problem went away - at the time I thought I had 
> been using OPP incorrectly but nothing seems to help this time. In the 
> following case, I recompiled the entire project and ran OPP on all my 
> *Impl classes. OPP reported no errors. I succeed in creating one object, 
> but when that object tries to create another one it fails.

Did you provide a default contructor for you database object ? Did you
provide any contructors ?

> My second question concerns the ability to modify classes that already 
> have instances in the database. I added a method to the interface of one 
> of my classes and thereafter got errors whenever trying to create a new 
> object of that type. The stack trace indicated that the UserBaseImpl 
> instance could not be serialized due to a version mismatch. I was a 
> little surprised to see that the UserBaseImpl was being serialized at 
> all - I thought *Impl instances stayed in the database process.
> 
> I don't have the stack trace for this one, and now cant even remember 
> the exact error, but it mentioned that the serial numbers of the classes 
> did not match.

Since ozone uses the Java serialization to store the objects you
need to be aware to provide a 'final static long serialVersionUID' 
member. Please, read the Java documentation about this topic.

Best Regards,
Gerd

--
________________________________________________________________
Gerd Mueller                                    gerd@smb-tec.com     
SMB GmbH                                  http://www.smb-tec.com