Uprage jboss 4 to jboss 7 in wildfly - issue with EmbeddedCacheManager in infispan
dinesh541 Jan 3, 2018 11:10 PMHi,
i am trying to upgrade jboss 4 to jboss 7 and using wildfly 10 for research purpose.
now i got error saying
Caused by: java.lang.ClassNotFoundException: org.infinispan.commons.CacheException from [Module "deployment.mes-webservices.ear:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:198)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:363)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:351)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:93)
... 299 more
when i debug i see that error initiated here.
cachedBom = (BillOfMaterials) CacheManager.fetchObjectFromCache(bomFqn, bomKey);
where cacheManager refers here.
private static final String CACHENAME = "medtronicClusteredTreeCache";
protected static final Log log = LogFactory.getLog(CacheManager.class);
private static EmbeddedCacheManager myCacheManager;
private static Cache cache = myCacheManager.getCache();
private static TreeCache medtronicCache;
private static void findCache() throws MalformedObjectNameException
{
// Find the shared cache service in JMX and create a proxy to it
ObjectName cacheServiceName_ = new ObjectName("jboss.cache:service=" + CACHENAME);
// Create Proxy-Object for this service
myCacheManager = new DefaultCacheManager();
medtronicCache = new TreeCacheFactory().createTreeCache(cache);
// Log that medtronicCache Proxy saved
log.info("MedtronicCache Proxy Object has been set. Should only happen once.");
}
i See that this cache is coming from the following bean which is named with cache-service.xml in jboss 4
<mbean code="org.jboss.cache.jmx.CacheJmxWrapper"
name="jboss.cache:service=medtronicClusteredTreeCache">
<depends>jboss:service=Naming</depends>
<depends>jboss:service=TransactionManager</depends>
<attribute name="CacheMode">LOCAL</attribute>
<attribute name="InactiveOnStartup">false</attribute>
<attribute name="LockAcquisitionTimeout">15000</attribute>
<attribute name="NodeLockingScheme">OPTIMISTIC</attribute>
<attribute name="TransactionManagerLookupClass">org.jboss.cache.BatchModeTransactionManagerLookup</attribute>
</mbean>
Now i want to know how do i deploy/migrate this bean to jboss 7, so that above code will work fine. Can anyone help here please