[jboss-user] [JBossCache] - Error while accessing cache through wrapper

madhavsapre@yahoo.com do-not-reply at jboss.com
Tue Jul 3 13:21:18 EDT 2007

I have configured JBoss Cache 2.0 to run as MBean in JBoss AS 4.05 as follows in the jboss-service.xml

 mbean code="org.jboss.cache.pojo.jmx.PojoCacheJmxWrapper" name="jboss.cache:service=POJOCache"

In my code, I try to get reference to the POJOCache as follows.

server = MBeanServerLocator.locateJBoss();
 cacheWrapper = (org.jboss.cache.jmx.CacheJmxWrapperMBean) MBeanProxyExt.create(CacheJmxWrapperMBean.class, "jboss.cache:service=POJOCache", server);

CacheStatus status = cacheWrapper.getCacheStatus();
System.out.println("Cache Status is " + status);
cache = (PojoCache)cacheWrapper.getCache();

I see from the log that MBean gets deployed without any exception. Also, the CacheStatus is shown as STARTED. But when getCache() method is called on the cacheWrapper, I get following exception

Exception occurred during cache initialization Unable to find operation getCache()
2007-07-03 13:04:31,765 ERROR [RMI TCP Connection(2)-] 
[STDERR]  LoggerStream.java:write():152  java.lang.IllegalArgumentException: Unable to find
operation getCache()
2007-07-03 13:04:31,812 ERROR [RMI TCP Connection(2)-] [STDERR]  
LoggerStream.java:write():152     at org.jboss.mx.server.AbstractMBeanInvoker.invo

Can anybody help me understand why I'm getting this exception? I checked API documentation @ http://labs.jboss.com/file-access/default/members/jbosscache/freezone/docs/2.0.0.CR2/api/index.html

and found the operation defined on the CacheJmxWrapperMBean interface.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4060087#4060087

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4060087

More information about the jboss-user mailing list