-
1. Re: exception from CacheJmxWrapperMBean.getCache()
galder.zamarreno Jul 2, 2010 10:19 AM (in response to szerintedmi)Did you follow these steps? http://docs.jboss.org/jbosscache/3.0.3.GA/userguide_en/html/deployment.html#jmx.registration
They're slightly different to what you're doing.
-
2. exception from CacheJmxWrapperMBean.getCache()
tarundeep_singh Mar 4, 2011 10:23 PM (in response to szerintedmi)Hi Peter,
Good Morning.
I was struggling with this issue until yesterday. Saw your post, took some help from it. And then I faced the same problem as you did. I actually also got lucky to resolve this issue.
This is a two step process:
- The call to cacheJmxWrapper.getCache() will be actually returning cacheJmxWrapper.getCache() an instance of org.jboss.cache.invocation.CacheInvocationDelegate. Therefore, the type casting needs to be corrected here.
- java.lang.ClassCastException: org.jboss.cache.invocation.CacheInvocationDelegate cannot be cast to org.jboss.cache.Cache
at $Proxy17.getCache(Unknown Source)
This actually happenned since my both applications were using there own set of JBoss Cache related jars. And since different instances of class loaders were loading these jars, these class cast exception took place. Resolution to this was to take these Jboss cache related jars from each of the applications and store them inside the application servers instance.
The issue got resolved and a single instance of Jboss cache was accessible for both the applications.
This also answers that this is not a defect in JBoss Cache.
Thank you.
Enjoy.