You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jcs-users@jakarta.apache.org by "K.Anand Kumar" <po...@yahoo.com> on 2004/08/18 11:40:57 UTC

Error in jcsCache.put(.......

Hi,
    When i try to put the cache values as like
.
.
jcsCache.put("App" + id, new TestCache());
.
.
where,
jcsCache - the region which i defined,
id - some numerical identifier
new TestCache() - User defined object (instance of a user defined class)
 
   When i run this, i am getting an error as
java.lang.ClassCastException
        at org.apache.jcs.access.CacheAccess.put(CacheAccess.java:279)
 
whereas if i execute the same code by
jcsCache.put("App" + id, new Vector());
 
   its working fine.
 
   My Question is, if i use available java objects, its holding it in the cache, but not the user defined class objects.
   How to resolve this.
 
Regards
K.Anand Kumar
 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com