Java org.jgroups中的Wildfly 18 NoSuchMethodError

Java org.jgroups中的Wildfly 18 NoSuchMethodError,java,spring,jboss,thorntail,wildfly-18,Java,Spring,Jboss,Thorntail,Wildfly 18,我正在尝试在wildfly 18上配置缓存-但是我面临的问题是,我假设它与jgroups中的dependencies版本或removed方法以及infinispan模块有关。 错误 而且 Caused by: java.lang.NoSuchMethodError: org.jgroups.JChannel.<init>(Ljava/net/URL;)V 对于JGroups,还包括: ./modules/system/layers/base/org/jgroups/main/jgr

我正在尝试在wildfly 18上配置缓存-但是我面临的问题是,我假设它与jgroups中的dependencies版本或removed方法以及infinispan模块有关。 错误

而且

Caused by: java.lang.NoSuchMethodError: org.jgroups.JChannel.<init>(Ljava/net/URL;)V
对于JGroups,还包括:

./modules/system/layers/base/org/jgroups/main/jgroups-4.1.4.Final.jar
Infinispan 9.4.16似乎依赖于不同版本的JGroups:

<version.jgroups>4.0.20.Final</version.jgroups>
4.0.20.Final
请参阅链接

因此,当我尝试启动服务器时,会出现以下错误

2020-03-29 18:38:25,808 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 80) MSC000001: Failed to start service jboss.deployment.unit."-frontend-war.war".component.CacheContainerBean.START: org.jboss.msc.service.StartException in service jboss.deployment.unit."-frontend-war.war".component.CacheContainerBean.START: java.lang.IllegalStateException: WFLYEE0042: Failed to construct component instance
    at org.jboss.as.ee.component.ComponentStartService$1.run(ComponentStartService.java:57)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
    at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
    at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
    at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
    at java.lang.Thread.run(Thread.java:748)
    at org.jboss.threads.JBossThread.run(JBossThread.java:485)
Caused by: java.lang.IllegalStateException: WFLYEE0042: Failed to construct component instance
    at org.jboss.as.ee.component.BasicComponent.constructComponentInstance(BasicComponent.java:163)
    at org.jboss.as.ee.component.BasicComponent.constructComponentInstance(BasicComponent.java:134)
    at org.jboss.as.ee.component.BasicComponent.createInstance(BasicComponent.java:88)
    at org.jboss.as.ejb3.component.singleton.SingletonComponent.getComponentInstance(SingletonComponent.java:127)
    at org.jboss.as.ejb3.component.singleton.SingletonComponent.start(SingletonComponent.java:141)
    at org.jboss.as.ee.component.ComponentStartService$1.run(ComponentStartService.java:54)
    ... 8 more
Caused by: javax.ejb.EJBException: org.infinispan.manager.EmbeddedCacheManagerStartupException: org.infinispan.commons.CacheException: Unable to invoke method public void org.infinispan.remoting.transport.jgroups.JGroupsTransport.start() on object of type JGroupsTransport
    at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:246)
    at org.jboss.as.ejb3.tx.CMTTxInterceptor.requiresNew(CMTTxInterceptor.java:388)
    at org.jboss.as.ejb3.tx.LifecycleCMTTxInterceptor.processInvocation(LifecycleCMTTxInterceptor.java:68)
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
    at org.jboss.as.weld.injection.WeldInjectionContextInterceptor.processInvocation(WeldInjectionContextInterceptor.java:43)
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
    at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
    at org.jboss.as.ee.concurrent.ConcurrentContextInterceptor.processInvocation(ConcurrentContextInterceptor.java:45)
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
    at org.jboss.invocation.ContextClassLoaderInterceptor.processInvocation(ContextClassLoaderInterceptor.java:60)
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
    at org.jboss.as.ejb3.component.singleton.StartupCountDownInterceptor.processInvocation(StartupCountDownInterceptor.java:25)
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
    at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:53)
    at org.jboss.as.ee.component.BasicComponent.constructComponentInstance(BasicComponent.java:161)
    ... 13 more
Caused by: org.infinispan.manager.EmbeddedCacheManagerStartupException: 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.manager.DefaultCacheManager.internalStart(DefaultCacheManager.java:712)
    at org.infinispan.manager.DefaultCacheManager.start(DefaultCacheManager.java:677)
    at org.infinispan.manager.DefaultCacheManager.<init>(DefaultCacheManager.java:269)
    at org.infinispan.manager.DefaultCacheManager.<init>(DefaultCacheManager.java:227)
    at xa.comp.util.CacheContainerBean.container(CacheContainerBean.java:50)
    at xa.comp.util.CacheContainerBean.generateCache(CacheContainerBean.java:93)
    at xa.comp.util.CacheContainerBean.init(CacheContainerBean.java:64)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.jboss.as.ee.component.ManagedReferenceLifecycleMethodInterceptor.processInvocation(ManagedReferenceLifecycleMethodInterceptor.java:96)
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
    at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:509)
    at org.jboss.as.weld.interceptors.Jsr299BindingsInterceptor.delegateInterception(Jsr299BindingsInterceptor.java:79)
    at org.jboss.as.weld.interceptors.Jsr299BindingsInterceptor.doLifecycleInterception(Jsr299BindingsInterceptor.java:126)
    at org.jboss.as.weld.interceptors.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:112)
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
    at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:509)
    at org.jboss.weld.module.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:81)
    at org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:89)
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
    at org.jboss.as.weld.injection.WeldInjectionInterceptor.processInvocation(WeldInjectionInterceptor.java:53)
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
    at org.jboss.as.ee.component.AroundConstructInterceptorFactory$1.processInvocation(AroundConstructInterceptorFactory.java:28)
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
    at org.jboss.as.weld.injection.WeldInterceptorInjectionInterceptor.processInvocation(WeldInterceptorInjectionInterceptor.java:56)
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
    at org.jboss.as.weld.interceptors.Jsr299BindingsCreateInterceptor.processInvocation(Jsr299BindingsCreateInterceptor.java:111)
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
    at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
    at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:237)
    ... 28 more
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.SecurityActions.lambda$invokeAccessibly$0(SecurityActions.java:83)
    at org.infinispan.commons.util.SecurityActions.doPrivileged(SecurityActions.java:71)
    at org.infinispan.commons.util.SecurityActions.invokeAccessibly(SecurityActions.java:76)
    at org.infinispan.commons.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:181)
    at org.infinispan.factories.impl.BasicComponentRegistryImpl.startWrapper(BasicComponentRegistryImpl.java:534)
    at org.infinispan.factories.impl.BasicComponentRegistryImpl$ComponentWrapper.running(BasicComponentRegistryImpl.java:723)
    at org.infinispan.factories.impl.BasicComponentRegistryImpl.startDependencies(BasicComponentRegistryImpl.java:565)
    at org.infinispan.factories.impl.BasicComponentRegistryImpl.startWrapper(BasicComponentRegistryImpl.java:520)
    at org.infinispan.factories.impl.BasicComponentRegistryImpl$ComponentWrapper.running(BasicComponentRegistryImpl.java:723)
    at org.infinispan.factories.impl.BasicComponentRegistryImpl.startDependencies(BasicComponentRegistryImpl.java:576)
    at org.infinispan.factories.impl.BasicComponentRegistryImpl.startWrapper(BasicComponentRegistryImpl.java:520)
    at org.infinispan.factories.impl.BasicComponentRegistryImpl$ComponentWrapper.running(BasicComponentRegistryImpl.java:723)
    at org.infinispan.factories.AbstractComponentRegistry.internalStart(AbstractComponentRegistry.java:428)
    at org.infinispan.factories.AbstractComponentRegistry.start(AbstractComponentRegistry.java:325)
    at org.infinispan.manager.DefaultCacheManager.internalStart(DefaultCacheManager.java:709)
    ... 60 more
Caused by: java.lang.NoSuchMethodError: org.jgroups.JChannel.<init>(Ljava/net/URL;)V
    at org.infinispan.remoting.transport.jgroups.JGroupsTransport.buildChannel(JGroupsTransport.java:590)
    at org.infinispan.remoting.transport.jgroups.JGroupsTransport.initChannel(JGroupsTransport.java:403)
    at org.infinispan.remoting.transport.jgroups.JGroupsTransport.start(JGroupsTransport.java:387)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.infinispan.commons.util.SecurityActions.lambda$invokeAccessibly$0(SecurityActions.java:79)
    ... 74 more

2020-03-29 18:38:25,852 ERROR [org.jboss.as.controller.management-operation] (main) WFLYCTL0013: Operation ("add") failed - address: (("deployment" => "-frontend-war.war")) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"-frontend-war.war\".component.CacheContainerBean.START" => "java.lang.IllegalStateException: WFLYEE0042: Failed to construct component instance
    Caused by: java.lang.IllegalStateException: WFLYEE0042: Failed to construct component instance
    Caused by: javax.ejb.EJBException: org.infinispan.manager.EmbeddedCacheManagerStartupException: org.infinispan.commons.CacheException: Unable to invoke method public void org.infinispan.remoting.transport.jgroups.JGroupsTransport.start() on object of type JGroupsTransport
    Caused by: org.infinispan.manager.EmbeddedCacheManagerStartupException: org.infinispan.commons.CacheException: Unable to invoke method public void org.infinispan.remoting.transport.jgroups.JGroupsTransport.start() on object of type JGroupsTransport
    Caused by: org.infinispan.commons.CacheException: Unable to invoke method public void org.infinispan.remoting.transport.jgroups.JGroupsTransport.start() on object of type JGroupsTransport
    Caused by: java.lang.NoSuchMethodError: org.jgroups.JChannel.<init>(Ljava/net/URL;)V"}}
2020-03-29 18:38:25,853 ERROR [org.jboss.as.server] (main) WFLYSRV0021: Deploy of deployment "-frontend-war.war" was rolled back with the following failure message: 
{"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"-frontend-war.war\".component.CacheContainerBean.START" => "java.lang.IllegalStateException: WFLYEE0042: Failed to construct component instance
    Caused by: java.lang.IllegalStateException: WFLYEE0042: Failed to construct component instance
    Caused by: javax.ejb.EJBException: org.infinispan.manager.EmbeddedCacheManagerStartupException: org.infinispan.commons.CacheException: Unable to invoke method public void org.infinispan.remoting.transport.jgroups.JGroupsTransport.start() on object of type JGroupsTransport
    Caused by: org.infinispan.manager.EmbeddedCacheManagerStartupException: org.infinispan.commons.CacheException: Unable to invoke method public void org.infinispan.remoting.transport.jgroups.JGroupsTransport.start() on object of type JGroupsTransport
    Caused by: org.infinispan.commons.CacheException: Unable to invoke method public void org.infinispan.remoting.transport.jgroups.JGroupsTransport.start() on object of type JGroupsTransport
    Caused by: java.lang.NoSuchMethodError: org.jgroups.JChannel.<init>(Ljava/net/URL;)V"}}

2020-03-29 18:38:25808错误[org.jboss.msc.service.fail](ServerService线程池--80)MSC000001:无法启动服务jboss.deployment.unit。“-frontend war.war.”component.CacheContainerBean.start:org.jboss.msc.service.StartException in service jboss.deployment.unit。“-frontend war.war”.component.CacheContainerBean.START:java.lang.IllegalStateException:WFLYEE0042:构造组件实例失败
位于org.jboss.as.ee.component.ComponentStartService$1.run(ComponentStartService.java:57)
位于java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
在java.util.concurrent.FutureTask.run(FutureTask.java:266)处
位于org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
位于org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
位于org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
位于org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
运行(Thread.java:748)
位于org.jboss.threads.JBossThread.run(JBossThread.java:485)
原因:java.lang.IllegalStateException:WFLYEE0042:构造组件实例失败
位于org.jboss.as.ee.component.BasicComponent.constructComponentInstance(BasicComponent.java:163)
位于org.jboss.as.ee.component.BasicComponent.constructComponentInstance(BasicComponent.java:134)
位于org.jboss.as.ee.component.BasicComponent.createInstance(BasicComponent.java:88)
位于org.jboss.as.ejb3.component.singleton.SingletonComponent.getComponentInstance(SingletonComponent.java:127)
位于org.jboss.as.ejb3.component.singleton.SingletonComponent.start(SingletonComponent.java:141)
位于org.jboss.as.ee.component.ComponentStartService$1.run(ComponentStartService.java:54)
... 8个以上
原因:javax.ejb.EJBException:org.infinispan.manager.EmbeddedCacheManagerStartupException:org.infinispan.commons.CacheException:无法在JGroupsTransport类型的对象上调用方法public void org.infinispan.remoting.transport.jgroups.JGroupsTransport.start()
在org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInurtx(CMTTxInterceptor.java:246)
位于org.jboss.as.ejb3.tx.CMTTxInterceptor.requiresNew(CMTTxInterceptor.java:388)
位于org.jboss.as.ejb3.tx.lifecyclemttxinterceptor.processInvocation(lifecyclemttxinterceptor.java:68)
在org.jboss.invocation.InterceptorContext.procedure(InterceptorContext.java:422)上
位于org.jboss.as.weld.injection.WeldInjectionContextInterceptor.processInvocation(WeldInjectionContextInterceptor.java:43)
在org.jboss.invocation.InterceptorContext.procedure(InterceptorContext.java:422)上
位于org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)
在org.jboss.invocation.InterceptorContext.procedure(InterceptorContext.java:422)上
位于org.jboss.as.ee.concurrent.ConcurrentContextInterceptor.processInvocation(ConcurrentContextInterceptor.java:45)
在org.jboss.invocation.InterceptorContext.procedure(InterceptorContext.java:422)上
位于org.jboss.invocation.ContextClassLoaderInterceptor.processInvocation(ContextClassLoaderInterceptor.java:60)
在org.jboss.invocation.InterceptorContext.procedure(InterceptorContext.java:422)上
位于org.jboss.as.ejb3.component.singleton.StartupCountDownInterceptor.processInvocation(StartupCountDownInterceptor.java:25)
在org.jboss.invocation.InterceptorContext.procedure(InterceptorContext.java:422)上
位于org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:53)
位于org.jboss.as.ee.component.BasicComponent.constructComponentInstance(BasicComponent.java:161)
... 还有13个
原因:org.infinispan.manager.EmbeddedCacheManagerStartupException:org.infinispan.commons.CacheException:无法在JGroupsTransport类型的对象上调用方法public void org.infinispan.remoting.transport.jgroups.JGroupsTransport.start()
位于org.infinispan.manager.DefaultCacheManager.internalStart(DefaultCacheManager.java:712)
位于org.infinispan.manager.DefaultCacheManager.start(DefaultCacheManager.java:677)
位于org.infinispan.manager.DefaultCacheManager。(DefaultCacheManager.java:269)
位于org.infinispan.manager.DefaultCacheManager。(DefaultCacheManager.java:227)
位于xa.comp.util.CacheContainerBean.container(CacheContainerBean.java:50)
位于xa.comp.util.CacheContainerBean.generateCache(CacheContainerBean.java:93)
位于xa.comp.util.CacheContainerBean.init(CacheContainerBean.java:64)
在sun.reflect.NativeMethodAccessorImpl.invoke0(本机方法)处
位于sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
在sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)中
位于java.lang.reflect.Method.invoke(Method.java:498)
位于org.jboss.as.ee.component.ManagedReferenceLifecycleMethodInterceptor.processInvocation(ManagedReferenceLifecycleMethodInterceptor.java:96)
在org.jboss.invocation.InterceptorContext.procedure(InterceptorContext.java:422)上
在org.jboss.invocation.InterceptorContext$invocation.procedure(InterceptorContext.java:509)
位于org.jboss.as.weld.interceptors.jsr29bindingsinterceptor.delegateInterception(jsr29bindingsinterceptor.java:79)
位于org.jboss.as.weld.interceptors.Jsr299BindingsInterceptor.doLifecycleInterception(jsr29bindingsinterceptor.java:126)
位于org.jboss.as.weld.interceptors.jsr29bindingSinterceptor.pro
<version.jgroups>4.0.20.Final</version.jgroups>
2020-03-29 18:38:25,808 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 80) MSC000001: Failed to start service jboss.deployment.unit."-frontend-war.war".component.CacheContainerBean.START: org.jboss.msc.service.StartException in service jboss.deployment.unit."-frontend-war.war".component.CacheContainerBean.START: java.lang.IllegalStateException: WFLYEE0042: Failed to construct component instance
    at org.jboss.as.ee.component.ComponentStartService$1.run(ComponentStartService.java:57)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
    at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
    at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
    at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
    at java.lang.Thread.run(Thread.java:748)
    at org.jboss.threads.JBossThread.run(JBossThread.java:485)
Caused by: java.lang.IllegalStateException: WFLYEE0042: Failed to construct component instance
    at org.jboss.as.ee.component.BasicComponent.constructComponentInstance(BasicComponent.java:163)
    at org.jboss.as.ee.component.BasicComponent.constructComponentInstance(BasicComponent.java:134)
    at org.jboss.as.ee.component.BasicComponent.createInstance(BasicComponent.java:88)
    at org.jboss.as.ejb3.component.singleton.SingletonComponent.getComponentInstance(SingletonComponent.java:127)
    at org.jboss.as.ejb3.component.singleton.SingletonComponent.start(SingletonComponent.java:141)
    at org.jboss.as.ee.component.ComponentStartService$1.run(ComponentStartService.java:54)
    ... 8 more
Caused by: javax.ejb.EJBException: org.infinispan.manager.EmbeddedCacheManagerStartupException: org.infinispan.commons.CacheException: Unable to invoke method public void org.infinispan.remoting.transport.jgroups.JGroupsTransport.start() on object of type JGroupsTransport
    at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:246)
    at org.jboss.as.ejb3.tx.CMTTxInterceptor.requiresNew(CMTTxInterceptor.java:388)
    at org.jboss.as.ejb3.tx.LifecycleCMTTxInterceptor.processInvocation(LifecycleCMTTxInterceptor.java:68)
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
    at org.jboss.as.weld.injection.WeldInjectionContextInterceptor.processInvocation(WeldInjectionContextInterceptor.java:43)
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
    at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
    at org.jboss.as.ee.concurrent.ConcurrentContextInterceptor.processInvocation(ConcurrentContextInterceptor.java:45)
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
    at org.jboss.invocation.ContextClassLoaderInterceptor.processInvocation(ContextClassLoaderInterceptor.java:60)
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
    at org.jboss.as.ejb3.component.singleton.StartupCountDownInterceptor.processInvocation(StartupCountDownInterceptor.java:25)
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
    at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:53)
    at org.jboss.as.ee.component.BasicComponent.constructComponentInstance(BasicComponent.java:161)
    ... 13 more
Caused by: org.infinispan.manager.EmbeddedCacheManagerStartupException: 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.manager.DefaultCacheManager.internalStart(DefaultCacheManager.java:712)
    at org.infinispan.manager.DefaultCacheManager.start(DefaultCacheManager.java:677)
    at org.infinispan.manager.DefaultCacheManager.<init>(DefaultCacheManager.java:269)
    at org.infinispan.manager.DefaultCacheManager.<init>(DefaultCacheManager.java:227)
    at xa.comp.util.CacheContainerBean.container(CacheContainerBean.java:50)
    at xa.comp.util.CacheContainerBean.generateCache(CacheContainerBean.java:93)
    at xa.comp.util.CacheContainerBean.init(CacheContainerBean.java:64)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.jboss.as.ee.component.ManagedReferenceLifecycleMethodInterceptor.processInvocation(ManagedReferenceLifecycleMethodInterceptor.java:96)
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
    at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:509)
    at org.jboss.as.weld.interceptors.Jsr299BindingsInterceptor.delegateInterception(Jsr299BindingsInterceptor.java:79)
    at org.jboss.as.weld.interceptors.Jsr299BindingsInterceptor.doLifecycleInterception(Jsr299BindingsInterceptor.java:126)
    at org.jboss.as.weld.interceptors.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:112)
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
    at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:509)
    at org.jboss.weld.module.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:81)
    at org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:89)
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
    at org.jboss.as.weld.injection.WeldInjectionInterceptor.processInvocation(WeldInjectionInterceptor.java:53)
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
    at org.jboss.as.ee.component.AroundConstructInterceptorFactory$1.processInvocation(AroundConstructInterceptorFactory.java:28)
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
    at org.jboss.as.weld.injection.WeldInterceptorInjectionInterceptor.processInvocation(WeldInterceptorInjectionInterceptor.java:56)
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
    at org.jboss.as.weld.interceptors.Jsr299BindingsCreateInterceptor.processInvocation(Jsr299BindingsCreateInterceptor.java:111)
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
    at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
    at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:237)
    ... 28 more
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.SecurityActions.lambda$invokeAccessibly$0(SecurityActions.java:83)
    at org.infinispan.commons.util.SecurityActions.doPrivileged(SecurityActions.java:71)
    at org.infinispan.commons.util.SecurityActions.invokeAccessibly(SecurityActions.java:76)
    at org.infinispan.commons.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:181)
    at org.infinispan.factories.impl.BasicComponentRegistryImpl.startWrapper(BasicComponentRegistryImpl.java:534)
    at org.infinispan.factories.impl.BasicComponentRegistryImpl$ComponentWrapper.running(BasicComponentRegistryImpl.java:723)
    at org.infinispan.factories.impl.BasicComponentRegistryImpl.startDependencies(BasicComponentRegistryImpl.java:565)
    at org.infinispan.factories.impl.BasicComponentRegistryImpl.startWrapper(BasicComponentRegistryImpl.java:520)
    at org.infinispan.factories.impl.BasicComponentRegistryImpl$ComponentWrapper.running(BasicComponentRegistryImpl.java:723)
    at org.infinispan.factories.impl.BasicComponentRegistryImpl.startDependencies(BasicComponentRegistryImpl.java:576)
    at org.infinispan.factories.impl.BasicComponentRegistryImpl.startWrapper(BasicComponentRegistryImpl.java:520)
    at org.infinispan.factories.impl.BasicComponentRegistryImpl$ComponentWrapper.running(BasicComponentRegistryImpl.java:723)
    at org.infinispan.factories.AbstractComponentRegistry.internalStart(AbstractComponentRegistry.java:428)
    at org.infinispan.factories.AbstractComponentRegistry.start(AbstractComponentRegistry.java:325)
    at org.infinispan.manager.DefaultCacheManager.internalStart(DefaultCacheManager.java:709)
    ... 60 more
Caused by: java.lang.NoSuchMethodError: org.jgroups.JChannel.<init>(Ljava/net/URL;)V
    at org.infinispan.remoting.transport.jgroups.JGroupsTransport.buildChannel(JGroupsTransport.java:590)
    at org.infinispan.remoting.transport.jgroups.JGroupsTransport.initChannel(JGroupsTransport.java:403)
    at org.infinispan.remoting.transport.jgroups.JGroupsTransport.start(JGroupsTransport.java:387)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.infinispan.commons.util.SecurityActions.lambda$invokeAccessibly$0(SecurityActions.java:79)
    ... 74 more

2020-03-29 18:38:25,852 ERROR [org.jboss.as.controller.management-operation] (main) WFLYCTL0013: Operation ("add") failed - address: (("deployment" => "-frontend-war.war")) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"-frontend-war.war\".component.CacheContainerBean.START" => "java.lang.IllegalStateException: WFLYEE0042: Failed to construct component instance
    Caused by: java.lang.IllegalStateException: WFLYEE0042: Failed to construct component instance
    Caused by: javax.ejb.EJBException: org.infinispan.manager.EmbeddedCacheManagerStartupException: org.infinispan.commons.CacheException: Unable to invoke method public void org.infinispan.remoting.transport.jgroups.JGroupsTransport.start() on object of type JGroupsTransport
    Caused by: org.infinispan.manager.EmbeddedCacheManagerStartupException: org.infinispan.commons.CacheException: Unable to invoke method public void org.infinispan.remoting.transport.jgroups.JGroupsTransport.start() on object of type JGroupsTransport
    Caused by: org.infinispan.commons.CacheException: Unable to invoke method public void org.infinispan.remoting.transport.jgroups.JGroupsTransport.start() on object of type JGroupsTransport
    Caused by: java.lang.NoSuchMethodError: org.jgroups.JChannel.<init>(Ljava/net/URL;)V"}}
2020-03-29 18:38:25,853 ERROR [org.jboss.as.server] (main) WFLYSRV0021: Deploy of deployment "-frontend-war.war" was rolled back with the following failure message: 
{"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"-frontend-war.war\".component.CacheContainerBean.START" => "java.lang.IllegalStateException: WFLYEE0042: Failed to construct component instance
    Caused by: java.lang.IllegalStateException: WFLYEE0042: Failed to construct component instance
    Caused by: javax.ejb.EJBException: org.infinispan.manager.EmbeddedCacheManagerStartupException: org.infinispan.commons.CacheException: Unable to invoke method public void org.infinispan.remoting.transport.jgroups.JGroupsTransport.start() on object of type JGroupsTransport
    Caused by: org.infinispan.manager.EmbeddedCacheManagerStartupException: org.infinispan.commons.CacheException: Unable to invoke method public void org.infinispan.remoting.transport.jgroups.JGroupsTransport.start() on object of type JGroupsTransport
    Caused by: org.infinispan.commons.CacheException: Unable to invoke method public void org.infinispan.remoting.transport.jgroups.JGroupsTransport.start() on object of type JGroupsTransport
    Caused by: java.lang.NoSuchMethodError: org.jgroups.JChannel.<init>(Ljava/net/URL;)V"}}

import com.google.common.io.ByteSource;
import org.apache.deltaspike.core.api.config.ConfigProperty;
import org.infinispan.commons.util.FileLookupFactory;
import org.infinispan.configuration.parsing.ConfigurationBuilderHolder;
import org.infinispan.configuration.parsing.ParserRegistry;
import org.infinispan.manager.DefaultCacheManager;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.remoting.transport.jgroups.JGroupsTransport;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import javax.cache.CacheManager;
import javax.cache.Caching;
import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.inject.Produces;
import javax.inject.Inject;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.URI;
import java.nio.charset.StandardCharsets;

@ApplicationScoped
public class IspnCacheManagerProducer {
    private String configurationFile = "/path/to/file/cache.xml";

    private String jgroupsConfigurationFile = "/path/to/file/jgroups.xml";

    private EmbeddedCacheManager cacheManager;

    @PostConstruct
    private void init() {
        try {
            InputStream is;
            is = new FileInputStream(new File(jgroupsConfigurationFile));
            ByteSource byteSource = new ByteSource() {
                @Override
                public InputStream openStream() {
                    return is;
                }
            };
            String text = byteSource.asCharSource(StandardCharsets.UTF_8).read();
            is.close();

            InputStream configurationStream = FileLookupFactory.newInstance().lookupFileStrict(configurationFile, Thread.currentThread().getContextClassLoader());
            ConfigurationBuilderHolder holder = new ParserRegistry().parse(configurationStream);
            holder.getGlobalConfigurationBuilder().transport().addProperty(JGroupsTransport.CONFIGURATION_STRING, text);
            holder.getGlobalConfigurationBuilder().transport().removeProperty(JGroupsTransport.CONFIGURATION_FILE);

            cacheManager = new DefaultCacheManager(holder, true);
            configurationStream.close();
        } catch(IOException e) {
            throw new RuntimeException("Exception occured during cache manager initialization", e);
        }
    }
}
import org.infinispan.manager.DefaultCacheManager;
import org.infinispan.manager.EmbeddedCacheManager;

import javax.annotation.PostConstruct;
import javax.enterprise.context.ApplicationScoped;
import java.io.IOException;

@ApplicationScoped
public class IspnCacheManagerProducer {
    private String configurationFile = "/path/to/file/cache.xml";

    private EmbeddedCacheManager cacheManager;

    @PostConstruct
    private void init() {
        try {
            cacheManager = new DefaultCacheManager(configurationFile);
        } catch(IOException e) {
            throw new RuntimeException("Exception occured during cache manager initialization", e);
        }
    }
}