Vertx Clustering with Infinispan causes exception when log4j2 is in classpath

10 views
Skip to first unread message

Mitesh Aghera

unread,
Jul 1, 2022, 2:14:38 AMJul 1
to vert.x
I'm using vertx 4.3.1 and log4j2 2.17.2.

When I'm trying to execute application with -cluster switch. It's giving following exception.

2022-07-01T10:39:57,385 ERROR [vert.x-worker-thread-0] o.j.JChannel.error:111 JGRP000016: exception in channelConnected callback: java.lang.NullPointerException: Cannot invoke "org.infinispan.metrics.impl.MetricsCollector.registerMetrics(Object, java.util.Collection, String, String)" because "mc" is null
java.lang.NullPointerException: Cannot invoke "org.infinispan.metrics.impl.MetricsCollector.registerMetrics(Object, java.util.Collection, String, String)" because "mc" is null
    at org.infinispan.remoting.transport.jgroups.JGroupsTransport.lambda$channelConnected$9(JGroupsTransport.java:1512)
    at java.base/java.util.HashMap.computeIfAbsent(HashMap.java:1219)
    at org.infinispan.remoting.transport.jgroups.JGroupsTransport.channelConnected(JGroupsTransport.java:1508)
    at org.jgroups.JChannel.lambda$notifyChannelConnected$1(JChannel.java:1104)
    at java.base/java.util.concurrent.CopyOnWriteArrayList.forEach(CopyOnWriteArrayList.java:807)
    at java.base/java.util.concurrent.CopyOnWriteArraySet.forEach(CopyOnWriteArraySet.java:425)
    at org.jgroups.JChannel.notifyListeners(JChannel.java:1118)
    at org.jgroups.JChannel.notifyChannelConnected(JChannel.java:1104)
    at org.jgroups.JChannel.connect(JChannel.java:363)
    at org.jgroups.JChannel.connect(JChannel.java:352)
    at org.infinispan.remoting.transport.jgroups.JGroupsTransport.startJGroupsChannelIfNeeded(JGroupsTransport.java:548)
    at org.infinispan.remoting.transport.jgroups.JGroupsTransport.start(JGroupsTransport.java:476)
    at org.infinispan.remoting.transport.jgroups.CorePackageImpl$1.start(CorePackageImpl.java:42)
    at org.infinispan.remoting.transport.jgroups.CorePackageImpl$1.start(CorePackageImpl.java:27)
    at org.infinispan.factories.impl.BasicComponentRegistryImpl.invokeStart(BasicComponentRegistryImpl.java:617)
    at org.infinispan.factories.impl.BasicComponentRegistryImpl.doStartWrapper(BasicComponentRegistryImpl.java:608)
    at org.infinispan.factories.impl.BasicComponentRegistryImpl.startWrapper(BasicComponentRegistryImpl.java:577)
    at org.infinispan.factories.impl.BasicComponentRegistryImpl.access$700(BasicComponentRegistryImpl.java:30)
    at org.infinispan.factories.impl.BasicComponentRegistryImpl$ComponentWrapper.running(BasicComponentRegistryImpl.java:808)
    at org.infinispan.factories.impl.BasicComponentRegistryImpl.startDependencies(BasicComponentRegistryImpl.java:635)
    at org.infinispan.factories.impl.BasicComponentRegistryImpl.doStartWrapper(BasicComponentRegistryImpl.java:599)
    at org.infinispan.factories.impl.BasicComponentRegistryImpl.startWrapper(BasicComponentRegistryImpl.java:577)
    at org.infinispan.factories.impl.BasicComponentRegistryImpl.access$700(BasicComponentRegistryImpl.java:30)
    at org.infinispan.factories.impl.BasicComponentRegistryImpl$ComponentWrapper.running(BasicComponentRegistryImpl.java:808)
    at org.infinispan.factories.impl.BasicComponentRegistryImpl.startDependencies(BasicComponentRegistryImpl.java:635)
    at org.infinispan.factories.impl.BasicComponentRegistryImpl.doStartWrapper(BasicComponentRegistryImpl.java:599)
    at org.infinispan.factories.impl.BasicComponentRegistryImpl.startWrapper(BasicComponentRegistryImpl.java:577)
    at org.infinispan.factories.impl.BasicComponentRegistryImpl.access$700(BasicComponentRegistryImpl.java:30)
    at org.infinispan.factories.impl.BasicComponentRegistryImpl$ComponentWrapper.running(BasicComponentRegistryImpl.java:808)
    at org.infinispan.factories.AbstractComponentRegistry.internalStart(AbstractComponentRegistry.java:354)
    at org.infinispan.factories.AbstractComponentRegistry.start(AbstractComponentRegistry.java:250)
    at org.infinispan.manager.DefaultCacheManager.internalStart(DefaultCacheManager.java:766)
    at org.infinispan.manager.DefaultCacheManager.start(DefaultCacheManager.java:734)
    at org.infinispan.manager.DefaultCacheManager.<init>(DefaultCacheManager.java:405)
    at io.vertx.ext.cluster.infinispan.InfinispanClusterManager.lambda$join$6(InfinispanClusterManager.java:260)
    at io.vertx.core.impl.ContextImpl.lambda$null$0(ContextImpl.java:159)
    at io.vertx.core.impl.AbstractContext.dispatch(AbstractContext.java:101)
    at io.vertx.core.impl.ContextImpl.lambda$executeBlocking$1(ContextImpl.java:157)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
    at java.base/java.lang.Thread.run(Thread.java:833)

And I remove log4j2 from my classpath, same code works fine. Am I missing any configuration or is this a bug?

Thomas SEGISMONT

unread,
Jul 4, 2022, 4:55:36 AMJul 4
to ve...@googlegroups.com

If you upgrade to ISPN 13.0.10.Final the problem should go away.

--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/56381e99-dfef-48ad-be0e-df10f8e1a132n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages