Jboss 6.4 Infinispan 8.2 and JGroups - ClassNotFoundException
<p>I need some features from Infinispan 8+. Therefore I have updated my company app pom.xml with the newest Infinispan pom. </p>

<p>It was quite straightforward, but the app uses jgroups (or its default config in default-configs/default-jgroups-udp.xml - this location is different from previous versions of infinispan). The default versions have some parameters (and the  XSD from Jgroups version 3.6) - so I also bumped jgroups to 3.6.8.Final as it looks like it is the intended version (and the version that does not complain about unknown parameters in default config in infinispan 8.2)</p>

<p>so the pom is the following:</p>

<pre><code>         &lt;dependency&gt;
            &lt;groupId&gt;org.jgroups&lt;/groupId&gt;
            &lt;artifactId&gt;jgroups&lt;/artifactId&gt;
            &lt;version&gt;3.6.8.Final&lt;/version&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;org.infinispan&lt;/groupId&gt;
            &lt;artifactId&gt;infinispan-core&lt;/artifactId&gt;                
            &lt;version&gt;8.2.0.Final&lt;/version&gt;
        &lt;/dependency&gt;
</code></pre>

<p>Anyway - this application starts with no problems using spring-boot with Jetty. I am pretty sure it would start on any application server.</p>

<p>But then I have no choice but to run it on JBoss 6.4. 
There I got an exception involving some jboss.as classes (this is kind of unexpected) during the deployment:</p>

<pre><code>Caused by: org.infinispan.commons.CacheException: Unable to invoke method public void org.infinispan.remoting.transport.jgroups.JGroupsTransport.start() on object of type JGroupsTransport
    at org.infinispan.commons.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:172)
    at org.infinispan.factories.AbstractComponentRegistry$PrioritizedMethod.invoke(AbstractComponentRegistry.java:859)
    at org.infinispan.factories.AbstractComponentRegistry.invokeStartMethods(AbstractComponentRegistry.java:628)
    at org.infinispan.factories.AbstractComponentRegistry.internalStart(AbstractComponentRegistry.java:617)
    at org.infinispan.factories.AbstractComponentRegistry.start(AbstractComponentRegistry.java:542)
    at org.infinispan.factories.GlobalComponentRegistry.start(GlobalComponentRegistry.java:234)
    ... 141 more
Caused by: java.lang.ExceptionInInitializerError
    at org.jgroups.conf.XmlConfigurator.&lt;clinit&gt;(XmlConfigurator.java:35)
    at org.jgroups.conf.ConfiguratorFactory.getStackConfigurator(ConfiguratorFactory.java:62)
    at org.jgroups.JChannel.&lt;init&gt;(JChannel.java:129)
    at org.infinispan.remoting.transport.jgroups.JGroupsTransport.buildChannel(JGroupsTransport.java:419)
    at org.infinispan.remoting.transport.jgroups.JGroupsTransport.initChannel(JGroupsTransport.java:320)
    at org.infinispan.remoting.transport.jgroups.JGroupsTransport.initChannelAndRPCDispatcher(JGroupsTransport.java:366)
    at org.infinispan.remoting.transport.jgroups.JGroupsTransport.start(JGroupsTransport.java:190)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.infinispan.commons.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:168)
    ... 146 more
Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: org.jboss.as.clustering.jgroups.LogFactory from [Module "deployment.mymodule-5.0.0.0-SNAPSHOT.ear.appName.war:main" from Service Module Loader]
    at org.jgroups.logging.LogFactory.&lt;clinit&gt;(LogFactory.java:31)
    ... 158 more
Caused by: java.lang.ClassNotFoundException: org.jboss.as.clustering.jgroups.LogFactory from [Module "deployment.mymodule-5.0.0.0-SNAPSHOT.ear.appName.war:main" from Service Module Loader]
    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213)
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459)
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408)
    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389)
    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at org.jgroups.logging.LogFactory.&lt;clinit&gt;(LogFactory.java:28)
    ... 158 more
</code></pre>

<p>My guess is that <strong>org.jgroups.logging.LogFactory</strong> somehow discovers that is is running on a Jboss and tries to use <strong>org.jboss.as.clustering.jgroups.LogFactory</strong> but this version of Jboss does not have one. (the server directory <strong>EAP-6.4.0\modules\system\layers\base\org\jgroups\main</strong> contains jgroups version 3.2.X).</p>

<p>Is there any walkaround to use this jgroups version (and so Infinispan 8.2) in Jboss 6.4? </p>

<p>This is (the application) an ear file so I can manipulate jboss-deployment-structure.xml file, but so far I only came with excluding Jboss original jgroups, and this did not help.</p>

<pre><code> &lt;exclusions&gt;
        &lt;module name="org.jgroups"/&gt;
 &lt;/exclusions&gt;
</code></pre>