Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Stale Data, NPE on validateCache()

I think I have figured out the NPE.  The weak caching causes the object to be
garbage collected and thus it becomes null.

However, I am still stumped on my stale data issue.  After an object has
been updated with a new many-to-many or one-to-may (for example)
relationship, the updated is not reflected in the cache, but it exists in
the database.


trispad wrote:
> I am having a problem with stale data.  I use multiple ClientSessions that
> hang off of the same ServerSession.  However, it appears that commits via
> a UnitOfWork from a ClientSession are not updating the cache and stale
> data is received when a query is preformed.  I have added in a call to
> validateCache() on the ServerSession(), however this throws a NPE.  Here
> is the stack trace I get:
> java.lang.NullPointerException
> 	at
> org.eclipse.persistence.internal.sessions.IdentityMapAccessor$1.iterate(
> 	at
> org.eclipse.persistence.internal.descriptors.DescriptorIterator.startIterationOn(
> 	at
> org.eclipse.persistence.internal.sessions.IdentityMapAccessor.validateCache(
> 	at
> org.eclipse.persistence.internal.sessions.AbstractSession.validateCache(
> It appears that one of the IdentityMaps from the Descriptor is null.  I am
> at a loss trying to figure out why this is happening.  I have tried
> setting the caching default to Full and None with the same result.  Let me
> know what other information I can provide.  
> Tristan

View this message in context:
Sent from the EclipseLink - Users mailing list archive at

Back to the top