1 Reply Latest reply on Nov 15, 2006 9:55 PM by ben.wang

    Error using objects as Fqn's in PojoCache

    Javier Lopez Moratalla Newbie

      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();
       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);

      The objects contained in the set (which is the result of getChildrenNames() function) aren't Strings, so the cast to String fails.