Hi,
  Has anyone meet similar problem
(NullPointerException is thrown in hashCode()
function) when a un-matured persistent object is added
to map or set that will invoke the persistent object's
hashCode() function. The execption happens because the
peristent object is un-matured, that is, some of its
fields is not yet deserialized from database and their
values are null and the hashCode() function depends on
these values to calculate the hash, hence
NullPointerException is thrown. One workaround to this
problem is not to implement hashCode() function in
your persistent object, but does not make sense. It is
observed that three places cause this problem:

1. ManageableHashSet's method ojbAdd(Object)
2. AnonymousPersistentField's method set(Object obj,
Object value)
3. LoadedObjectsRegistry's method register(Object
object)

I am trying to figure out a solution for the latter
two places. But for the first place, seems no solution
yet.

Regards,
Rice


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to