[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2112) ClassCastException in StatefulPersistenceContext.getCachedDatabaseSnapshot(...)
Nicklas Nordborg (JIRA)
noreply at atlassian.com
Tue Nov 28 06:04:04 EST 2006
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2112?page=comments#action_25442 ]
Nicklas Nordborg commented on HHH-2112:
---------------------------------------
I get the same exception when doing Map.remove(). The map is lazy and hasn't been initialised. If I first to Map.containsKey() the Map.remove() returns the correct object and doesn't throw a ClassCastException. The Map object is defined using generics: Map<Integer, ReporterListScore> and I expect the Map.remove() method to return a ReporterListScore object but it returns a MarkerObject. I am now using Hibernate 3.2.1. This is a new problem. I was using 3.2.0.cr3 before.
> ClassCastException in StatefulPersistenceContext.getCachedDatabaseSnapshot(...)
> -------------------------------------------------------------------------------
>
> Key: HHH-2112
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2112
> Project: Hibernate3
> Type: Bug
> Components: core
> Versions: 3.2.0.cr4
> Reporter: Aleksei Valikov
>
>
> StatefulPersistenceContext.getCachedDatabaseSnapshot(EntityKey key) causes ClassCastException when NO_ROW was put for the certain entity key.
> Please see the discussion here:
> http://forum.hibernate.org/viewtopic.php?t=959868&highlight=getcacheddatabasesnapshot
> In these situations, this method should probably return null. It is very likely since other calling methods check for the returned value to be null .
--
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
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list