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.

Tristan



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(IdentityMapAccessor.java:988)
> 	at
> org.eclipse.persistence.internal.descriptors.DescriptorIterator.startIterationOn(DescriptorIterator.java:470)
> 	at
> org.eclipse.persistence.internal.sessions.IdentityMapAccessor.validateCache(IdentityMapAccessor.java:1002)
> 	at
> org.eclipse.persistence.internal.sessions.AbstractSession.validateCache(AbstractSession.java:3211)
> 
> 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: http://old.nabble.com/Stale-Data%2C-NPE-on-validateCache%28%29-tp28623049p28626303.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.



Back to the top