commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Colebourne <scolebou...@btopenworld.com>
Subject Re: [collections] LRUMap NullpointerException
Date Fri, 16 Jun 2006 22:29:32 GMT
After extensive testing, we can only reproduce this when the map has not 
been correctly synchronized, or a mutable key has been used (as opposed 
to an immutable one).

If you upgrade to collections v3.2 you will get extra logging which may 
help diagnose the problem.

Stephen

Thilko Richter wrote:
> Hi all,
> 
> I am working with Cayenne and I ´ve get the following Exception:
> 
> Caused by: java.lang.NullPointerException
> 	at org.apache.commons.collections.map.LRUMap.reuseMapping(LRUMap.java:272)
> 	at org.apache.commons.collections.map.LRUMap.addMapping(LRUMap.java:243)
> 	at org.apache.commons.collections.map.AbstractHashedMap.put(AbstractHashedMap.java:282)
> 	at org.objectstyle.cayenne.access.DataRowStore.processUpdatedSnapshots(DataRowStore.java:621)
> 	at org.objectstyle.cayenne.access.DataRowStore.processSnapshotChanges(DataRowStore.java:575)
> 	at org.objectstyle.cayenne.access.DataRowStore.snapshotsUpdatedForObjects(DataRowStore.java:314)
> 	at org.objectstyle.cayenne.access.ObjectResolver.objectsFromDataRows(ObjectResolver.java:159)
> 	at org.objectstyle.cayenne.access.ObjectResolver.synchronizedObjectsFromDataRows(ObjectResolver.java:134)
> 	at org.objectstyle.cayenne.access.DataDomainQueryAction.interceptObjectConversion(DataDomainQueryAction.java:375)
> 	at org.objectstyle.cayenne.access.DataDomainQueryAction.execute(DataDomainQueryAction.java:151)
> 	at org.objectstyle.cayenne.access.DataDomain.onQuery(DataDomain.java:765)
> 	at org.objectstyle.cayenne.util.ObjectContextQueryAction.runQuery(ObjectContextQueryAction.java:253)
> 	at org.objectstyle.cayenne.access.DataContextQueryAction.execute(DataContextQueryAction.java:90)
> 	at org.objectstyle.cayenne.access.DataContext.onQuery(DataContext.java:1422)
> 	at org.objectstyle.cayenne.access.DataContext.performQuery(DataContext.java:1411)
> 	at org.objectstyle.cayenne.access.DataContextFaults$ToOneFault.doResolveFault(DataContextFaults.java:144)
> 	at org.objectstyle.cayenne.access.DataContextFaults$ToOneFault.resolveFault(DataContextFaults.java:117)
> 	at org.objectstyle.cayenne.CayenneDataObject.readProperty(CayenneDataObject.java:245)
> 	at com.conergy.sunreader.sr2.back.auto._TblAccount.getTblPerson(Unknown Source)
> 	at com.conergy.sunreader.sr2.back.dao.UserDAO.setAccountPersonData(Unknown Source)
> 	at com.conergy.sunreader.sr2.back.dao.UserDAO.getUser(Unknown Source)
> 	at com.conergy.sunreader.sr2.back.dao.UserDAO.login(Unknown Source)
> 	at com.conergy.sunreader.sr2.back.proxy.CayenneProxy.login(Unknown Source)
> 	at com.conergy.sunreader.sr2.back.BusinessFacade.login(Unknown Source)
> 	at com.conergy.sunreader.sr2.struts.actions.Sr2BaseAction.loginUser(Unknown Source)
> 	... 31 more
> 
> 
> We have posted this exception in cayenne newsgroup before and we found out, that the
caller of LRUMap is responsible for the thread safety. We´ve changed some methods calls in
caeynne temporarily, but we still get this exception. Could anyone help us and tell, waht
was going wrong here?
> 
> We using commons-collection v.3.1
> 
> This behauvior occurs when the machine is under heavy load and a lot threads access are
created.
> 
> Thanks in advance,
> 
> Thilko

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message