Hi,
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)-172.26.41.141] 
[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)-172.26.41.141] [STDERR]  
LoggerStream.java:write():152     at 
org.jboss.mx.server.AbstractMBeanInvoker.invo
ke(AbstractMBeanInvoker.java:231)

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
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to