Details
-
Task
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
2.20.1
-
None
-
None
Description
The latest version of the LMAX Disruptor, that is 4.0.0, is not compatible with Log4j v2. Certain classes such as SequenceReportingEventHandler, are removed from Disruptor v4:
Exception in thread "main" java.lang.NoClassDefFoundError: com/lmax/disruptor/SequenceReportingEventHandler at java.base/java.lang.ClassLoader.defineClass1(Native Method) at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1027) at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150) at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:862) at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:760) at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:681) at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:639) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526) at org.apache.logging.log4j.core.async.AsyncLoggerDisruptor.start(AsyncLoggerDisruptor.java:125) at org.apache.logging.log4j.core.async.AsyncLoggerContext.start(AsyncLoggerContext.java:75) at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:155) at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:47) at org.apache.logging.log4j.LogManager.getContext(LogManager.java:196) at org.apache.commons.logging.LogAdapter$Log4jLog.<clinit>(LogAdapter.java:146) at org.apache.commons.logging.LogAdapter$Log4jAdapter.createLog(LogAdapter.java:113) at org.apache.commons.logging.LogAdapter.createLog(LogAdapter.java:95) at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:67) at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:59) Caused by: java.lang.ClassNotFoundException: com.lmax.disruptor.SequenceReportingEventHandler at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526) ... 24 more
The following classes reference the now-removed class:
- AsyncLoggerConfigDisruptor
- RingBufferLogEventHandler
The current supported version of Disruptor seems to be 3.4.4.
Attachments
Issue Links
- duplicates
-
LOG4J2-3595 Supporting disruptor 4.x
- Resolved