0
votes

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 = "ClusteredTreeCache";

protected static final Log log = LogFactory.getLog(CacheManager.class);

private static  EmbeddedCacheManager   myCacheManager;

private  static Cache cache = myCacheManager.getCache();

private static  TreeCache  mCache;



private static void findCache() throws MalformedObjectNameException

{





    // Find the shared cache service in JMX and create a proxy to it

ObjectName cacheServiceName_ = new ObjectName("java:jboss/infinispan/replicated_cache/customer");

// Create Proxy-Object for this service

myCacheManager = new DefaultCacheManager();



mCache = new TreeCacheFactory().createTreeCache(cache);



// Log that medtronicCache Proxy saved

log.info("mCache Proxy Object has been set.   Should only happen once.");

}

Standalone :
 <cache-container name="replicated_cache" default-cache="default" module="org.wildfly.clustering.server" jndi-name="infinispan/replicated_cache">
                <transport lock-timeout="60000"/>
                <replicated-cache name="customer" jndi-name="infinispan/replicated_cache/customer" mode="SYNC">
                    <transaction locking="OPTIMISTIC" mode="NON_XA"/>
                    <eviction strategy="NONE"/>
                </replicated-cache>
            </cache-container>
1
Added quote and code blockThomas Smyth

1 Answers

2
votes

The problem seems to be that org.infinispan.commons.CacheException is not in your runtime classpath. Please check that:

  • infinispan-commons.jar is part of your deployment
  • or that you have jboss-deployment-structure.xml which declares a dependency to the org.infinispan.commons module
  • or that you have a manifest dependency to the org.infinispan.commons module

You could check my demo project at Github.