Hello,
I am getting NullPointerExceptions when I am trying to use the shared caching feature of cayenne. I have 3 servers. Each server has it's own tomcat / axis webservice and I have an avarage access of about 4 - 5 connections per second. Each connection results in about 3 - 4 select queries and about 20% of the connections result in an additional 2 - 3 insert / update queries. So the servers are working at pretty heavy load. Yesterday I implemented the usage of cayenne's (remote) shared caching feature using JavaGroups and at first everything seemed to work just fine. But after about 1 hour, one of the servers started to produce NullPointerExceptions on every connection. i found this bug ( http://issues.apache.org/cayenne/browse/CAY-565 ) which seems to address my problem but the status is resolved?! i tried cayenne 1.2 and 1.2B1 and in both cases got this exceptions but only if shared caching is activated. When I deactivate caching everything seems to work fine again. It seems that there is a problem with the syncronization. This error occursed when under heavy load and a lot of threads are active at the same time. But if it is really a syncronization problem the same error could occure on every system (even if much more unlikely) even if not under heavy load. Cheers Ayhan Kondoz The exception when using common-collections 3.2 [11.09.06 21:30:32] (ERROR): Entry.next=null, data[removeIndex]=<ObjectId:Customer, id=534080>[EMAIL PROTECTED], login=christian.hantke1, rec_create=Tue May 02 00:00:00 CEST 2006, rec_change=Tue May 02 20:18:34 CEST 2006, last_updated=Mon Sep 11 21:28:26 CEST 2006, cid=709779451, id=534080, mandant_id=3}, version=-9223372036854422785, replaces=-9223372036854775808] previous=<ObjectId:Customer, d=534080>[EMAIL PROTECTED], login=christian.hantke1, rec_create=Tue May 02 00:00:00 CEST 2006, rec_change=Tue May 02 20:18:34 CEST 2006, last_updated=Mon Sep 11 21:28:26 CEST 2006, cid=709779451, id=534080, mandant_id=3}, version=-9223372036854422785, replaces=-9223372036854775808] key=<Ob jectId:Customer, id=364956> [EMAIL PROTECTED], login=nadda89, rec_create=Thu Mar 30 00:00:00 CEST 2006, rec_change=Thu Mar 30 22:19:00 CEST 2006, last_updated=Fri Aug 04 16:09:35 CEST 2006, cid=705229711, id=364956, mandant_id=3}, version=-9223372036854407476, replaces=-9223372036854775808] size=10000 maxSize=10000 Please check that your keys are immutable, and that you have used synchronization properly. If so, then please report this to [email protected] as a bug. java.lang.IllegalStateException: Entry.next=null, data[removeIndex]=<ObjectId:Customer, id=534080>[EMAIL PROTECTED], login=christian.hantke1, rec_create=Tue May 02 00:00:00 CEST 2006, rec_change=Tue May 02 20:18:34 CEST 2006, last_updated=Mon Sep 11 21:28:26 CEST 2006, cid=709779451, id=534080, mandant_id=3}, version=-9223372036854422785, replaces=-9223372036854775808] previous=<ObjectId:Customer, id=534080>[EMAIL PROTECTED], login=christian.hantke1, rec_create=Tue May 02 00:00:00 CEST 20 06, rec_change=Tue May 02 20:18:34 CEST 2006, last_updated=Mon Sep 11 21:28:26 CEST 2006, cid=709779451, id=534080, mandant_id=3}, version=-9223372036854422785, replaces=-9223372036854775808] key=<ObjectId:Customer, id=364956> [EMAIL PROTECTED], login=nadda89, rec_create=Thu Mar 30 00:00:00 CEST 2006, rec_change=Thu Mar 30 22:19:00 CEST 2006, last_updated=Fri Aug 04 16:09:35 CEST 2006, cid=705229711, id=364956, mandant_id=3}, version=-9223372036854407476, replaces=-9223372036854775808] size=10000 maxSize=10000 Please check that your keys are immutable, and that you have used synchronization properly. If so, then please report this to [email protected] as a bug. at org.apache.commons.collections.map.LRUMap.reuseMapping(LRUMap.java:300) at org.apache.commons.collections.map.LRUMap.addMapping(LRUMap.java:266) at org.apache.commons.collections.map.AbstractHashedMap.put(AbstractHashedMap.java:283) at org.objectstyle.cayenne.access.DataRowStore.processUpdatedSnapshots(DataRowStore.java:537) at org.objectstyle.cayenne.access.DataRowStore.processSnapshotChanges(DataRowStore.java:496) at org.objectstyle.cayenne.access.ObjectStore.snapshotsUpdatedForObjects(ObjectStore.java:559) at org.objectstyle.cayenne.access.ObjectResolver.objectsFromDataRows(ObjectResolver.java:162) at org.objectstyle.cayenne.access.ObjectResolver.synchronizedObjectsFromDataRows(ObjectResolver.java:137) at org.objectstyle.cayenne.access.DataDomainQueryAction.interceptObjectConversion(DataDomainQueryAction.java:363) at org.objectstyle.cayenne.access.DataDomainQueryAction.execute(DataDomainQueryAction.java:151) at org.objectstyle.cayenne.access.DataDomain.onQuery(DataDomain.java:715) at org.objectstyle.cayenne.util.ObjectContextQueryAction.runQuery(ObjectContextQueryAction.java:249) at org.objectstyle.cayenne.access.DataContextQueryAction.execute(DataContextQueryAction.java:90) at org.objectstyle.cayenne.access.DataContext.onQuery(DataContext.java:1320) at org.objectstyle.cayenne.access.DataContext.performQuery(DataContext.java:1309) The exception when using common-collections 3.1 [11.09.06 15:29:13] (ERROR): 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:612) at org.objectstyle.cayenne.access.DataRowStore.processSnapshotChanges(DataRowStore.java:571) at org.objectstyle.cayenne.access.DataRowStore.snapshotsUpdatedForObjects(DataRowStore.java:313) 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:373) at org.objectstyle.cayenne.access.DataDomainQueryAction.execute(DataDomainQueryAction.java:151) at org.objectstyle.cayenne.access.DataDomain.onQuery(DataDomain.java:766) 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) Ayhan Kondoz Software-Entwicklung ---------------------------------------------------------------------------------- Telefon: +49 (0) 40 513 06 616 Telefax: +49 (0) 40 513 06 998 616 E-Mail: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> Website: http://www.freenet.de <http://www.freenet.de/> ; http://www.freenet-ag.de <http://www.freenet-ag.de/> ---------------------------------------------------------------------------------- freenet.de AG Deelbögenkamp 4c 22297 Hamburg ---------------------------------------------------------------------------------- Vorsitzender des Aufsichtsrates: Prof. Dr. Helmut Thoma Vorstand: Eckhard Spoerr (Vors.), Axel Krieger, Stephan Esch, Eric Berger Amtsgericht Hamburg HRB 74048 Diese Information ist ausschließlich für die adressierte Person oder Organisation bestimmt und könnte vertrauliches und/oder privilegiertes Material enthalten. Personen oder Organisationen, für die diese Information nicht bestimmt ist, ist es nicht gestattet, diese zu lesen, erneut zu übertragen, zu verbreiten, anderweitig zu verwenden oder sich durch sie veranlasst zu sehen, Maßnahmen irgendeiner Art zu ergreifen. Sollten Sie diese Nachricht irrtümlich erhalten haben, bitten wir Sie, sich mit dem Absender in Verbindung zu setzen und das Material von Ihrem Computer zu löschen. The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.
