From: <leg...@at...> - 2003-09-26 21:28:19
|
The following issue has been updated: Updater: John Kristian (mailto:jkr...@do...) Date: Fri, 26 Sep 2003 4:27 PM Comment: test2.zip (attached) contains a fairly simple test case and detailed log file, which I hope will help isolate the problem. Part of the problem, it appears, is that Hibernate uses a RolePermissionAssociation$Id as a key for a JCS region map, but the Id refers to a Role whose id has not been loaded. Subsequently, Hibernate loads the Role id, which changes the RolePermissionAssociation Id.hashCode(), which causes the Id to be 'lost' in the JCS region map. Eventually, the JCS region contains several such lost keys in its map but nothing in its list (all entries were evicted because the map contains more keys than the cache size limit). At this point, JCS throws the problematic exception. I reported this bug previously, in HB-342. That issue was closed because Gavin was unable to reproduce the problem. This test case will be more helpful, I hope: I have eliminated some dependencies, and supplied more information which I hope will help reproduce the problem. Changes: Attachment changed to test2.zip --------------------------------------------------------------------- For a full history of the issue, see: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-367&page=history --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-367 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-367 Summary: JCSCache.put java.lang.Error: update: last is null! Type: Bug Status: Unassigned Priority: Major Project: Hibernate2 Versions: 2.1 beta 3 Assignee: Reporter: John Kristian Created: Fri, 26 Sep 2003 4:15 PM Updated: Fri, 26 Sep 2003 4:27 PM Environment: Windows XP, Microsoft SQL Server Description: With Hibernate `cvs checkout -r v21branch` (but not 2.0.2), the following errors occur. 14:05:11,046 ERROR [org.apache.jcs.engine.memory.lru.LRUMemoryCache] verifycache: map does NOT contain key, what the HECK! 14:05:11,046 ERROR [com.docent.lms.entities.tests.hibernate.Scan] testScan failed java.lang.Error: update: last is null! at org.apache.jcs.engine.memory.lru.LRUMemoryCache.update(LRUMemoryCache.java:140) at org.apache.jcs.engine.control.CompositeCache.update(CompositeCache.java:241) at org.apache.jcs.engine.control.CompositeCache.update(CompositeCache.java:200) at org.apache.jcs.access.CacheAccess.put(CacheAccess.java:311) at org.apache.jcs.access.CacheAccess.put(CacheAccess.java:279) at net.sf.hibernate.cache.JCSCache.put(JCSCache.java:34) at net.sf.hibernate.cache.ReadWriteCache.put(ReadWriteCache.java:86) at net.sf.hibernate.impl.SessionImpl.initializeEntity(SessionImpl.java:2191) at net.sf.hibernate.loader.Loader.doResultSet(Loader.java:216) at net.sf.hibernate.loader.Loader.doFind(Loader.java:111) at net.sf.hibernate.loader.Loader.loadEntity(Loader.java:664) at net.sf.hibernate.loader.Loader.loadEntity(Loader.java:679) at net.sf.hibernate.loader.EntityLoader.load(EntityLoader.java:52) at net.sf.hibernate.loader.EntityLoader.load(EntityLoader.java:44) at net.sf.hibernate.persister.EntityPersister.load(EntityPersister.java:424) at net.sf.hibernate.impl.SessionImpl.doLoad(SessionImpl.java:2115) at net.sf.hibernate.impl.SessionImpl.doLoadByClass(SessionImpl.java:1977) at net.sf.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:1936) at net.sf.hibernate.type.ManyToOneType.resolveIdentifier(ManyToOneType.java:76) at net.sf.hibernate.type.EntityType.assemble(EntityType.java:113) at net.sf.hibernate.collection.Set.<init>(Set.java:94) at net.sf.hibernate.type.SetType.assembleCachedCollection(SetType.java:36) at net.sf.hibernate.collection.CollectionPersister.getCachedCollection(CollectionPersister.java:371) at net.sf.hibernate.type.PersistentCollectionType.getCollection(PersistentCollectionType.java:67) at net.sf.hibernate.type.PersistentCollectionType.resolveIdentifier(PersistentCollectionType.java:184) at net.sf.hibernate.type.PersistentCollectionType.assemble(PersistentCollectionType.java:134) at net.sf.hibernate.impl.CacheEntry.assemble(CacheEntry.java:54) at net.sf.hibernate.impl.CacheEntry.assemble(CacheEntry.java:46) at net.sf.hibernate.impl.SessionImpl.doLoad(SessionImpl.java:2100) at net.sf.hibernate.impl.SessionImpl.doLoadByClass(SessionImpl.java:1977) at net.sf.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:1936) at net.sf.hibernate.type.ManyToOneType.resolveIdentifier(ManyToOneType.java:76) at net.sf.hibernate.type.EntityType.nullSafeGet(EntityType.java:129) at net.sf.hibernate.impl.IteratorImpl.postNext(IteratorImpl.java:67) at net.sf.hibernate.impl.IteratorImpl.next(IteratorImpl.java:87) at com.docent.lms.entities.tests.hibernate.Scan.scan(Scan.java:59) --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |