jakarta-jcs-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Smuts <aasm...@wisc.edu>
Subject RE: CacheElement hashCode problem
Date Thu, 13 Nov 2003 18:16:18 GMT
Can you send me a stack trace also.

> -----Original Message-----
> From: Ryan Breidenbach [mailto:breidenr@michaels.com]
> Sent: Thursday, November 13, 2003 11:51 AM
> To: turbine-jcs-user@jakarta.apache.org
> Subject: CacheElement hashCode problem
> 
> I am using JCS with Hibernate for caching, and I came across a
problem.
> When JCS encounters an object whose MaxLifeSeconds has been exceeded,
I
> am getting a ClassCastException. This is actually being thrown by the
> net.sf.hibernate.cache.QueryKey, but I think the root of the problem
is
> the hashCode method of the CacheElement class:
> 
>     public int hashCode()
>     {
>         return key.hashCode();
>     }
> 
> Why does it do this? The problem happens when there is a QueryKey
object
> *and* and CacheElement object that wraps a QueryKey object both in the
> cache (Hashtable). This doesn't seem right. Any thoughts?
> 
> Ryan
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
turbine-jcs-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
turbine-jcs-user-help@jakarta.apache.org


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


Mime
View raw message