Hi Christian,

I assume it was a known bug in cache implementation - stupid handling of object identity, see method #buildKey in ObjectCacheDefaultImpl. It's fixed in OJB 1.0.x branch (tag OJB_1_0_RELEASE in CVS) revision 1.24.2.2

http://mail-archives.apache.org/eyebrowse/[EMAIL PROTECTED]&msgNo=15063

regards,
Armin


Christian Pesch wrote:
Hi,

I'm hunting a spurious RuntimeException from
ObjectReferenceDescriptor#getForeignKeyFieldDescriptors()
with OJB 1.0.1:

     public FieldDescriptor[]
getForeignKeyFieldDescriptors(ClassDescriptor mif)
                     [..]
                     if (fkfd == null)
                     {
                         throw new OJBRuntimeException("Incorrect or not
found field reference name '"
                                 + fk + "' in descriptor " + this + " for
class-descriptor '"
                                 + mif.getClassNameOfObject() + "'");
                     }

This Exception occurs only, if the number of objects, that are stored in
the database tables exceeds about 25000 or 30000. My test suite contains
a lot of tests, that currently only use some dozens of objects - and the
tests is always green.

If traced the problem down to RsIterator#getObjectFromResultSet()

// 2. check if Object is in cache. if so return cached version.
result = getCache().lookup(oid);
if (result == null)
{


where the oid and the result from the cache do not match. At
http://www.mitglied.lycos.de/zeppesch/snapshot1.png there is a
screenshot, which shows this very clearly.

Unfortunately, this happens just from time to time. Might be a race?
Or is there a known OJB problem with multi-field primary keys?
Or do I have to further investigate my code? Any hints?


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



Reply via email to