I have a possible bug in JBoss Cache, but I'm not sure...
I'm using Objects (not Strings) as Fqn's, in a PojoCache, and later, calling the PojoCache.findObjects() method, I obtain a ClassCastException. Diving into code, I watch this (in TreeCacheAopDelegate.java):
protected void findChildObjects(Fqn fqn, Map map) throws CacheException { // We need to traverse then Set set = cache_.getChildrenNames(fqn); if(set == null) return; // We stop here. Iterator it = set.iterator(); while(it.hasNext()) { String obj = (String)it.next(); Fqn newFqn = new Fqn(fqn, obj); Object pojo = _getObject(newFqn); if(pojo != null) { map.put(newFqn, pojo); } else { findChildObjects(newFqn, map); } } }
You are right. It is a bug.
http://jira.jboss.com/jira/browse/JBCACHE-850
The fix is in 1.4.1 release.