Log4j Asynchronous in 10.5 IS

What product/components do you use and which version/fix level?

10.5 Integration Server

Are you using a free trial or a product with a customer license?

Customer License

What are trying to achieve? Please describe in detail.

Deployed Log4j custom package into IS, trying to write logs into file.
Synchronous is working fine
Asynchronous is not working.

Do you get any error messages? Please provide a full error message screenshot and log file.

ERROR Unable to invoke factory method in class org.apache.logging.log4j.core.async.AsyncLoggerConfig for element AsyncLogger: java.lang.NoClassDefFoundError: com/lmax/disruptor/EventFactory java.lang.reflect.InvocationTargetException
INFO | jvm 1 | 2022/05/30 10:57:01 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
INFO | jvm 1 | 2022/05/30 10:57:01 | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
INFO | jvm 1 | 2022/05/30 10:57:01 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
INFO | jvm 1 | 2022/05/30 10:57:01 | at java.lang.reflect.Method.invoke(Method.java:498)
INFO | jvm 1 | 2022/05/30 10:57:01 | at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:136)
INFO | jvm 1 | 2022/05/30 10:57:01 | at org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:964)
INFO | jvm 1 | 2022/05/30 10:57:01 | at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:904)
INFO | jvm 1 | 2022/05/30 10:57:01 | at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:896)
INFO | jvm 1 | 2022/05/30 10:57:01 | at org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:514)
INFO | jvm 1 | 2022/05/30 10:57:01 | at org.apache.logging.log4j.core.config.AbstractConfiguration.initialize(AbstractConfiguration.java:238)
INFO | jvm 1 | 2022/05/30 10:57:01 | at org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:250)
INFO | jvm 1 | 2022/05/30 10:57:01 | at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:548)
INFO | jvm 1 | 2022/05/30 10:57:01 | at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:263)
INFO | jvm 1 | 2022/05/30 10:57:01 | at Log4jDemo.utils.java.init(java.java:83)
INFO | jvm 1 | 2022/05/30 10:57:01 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
INFO | jvm 1 | 2022/05/30 10:57:01 | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
INFO | jvm 1 | 2022/05/30 10:57:01 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
INFO | jvm 1 | 2022/05/30 10:57:01 | at java.lang.reflect.Method.invoke(Method.java:498)
INFO | jvm 1 | 2022/05/30 10:57:01 | at com.wm.app.b2b.server.JavaService.baseInvoke(JavaService.java:411)
INFO | jvm 1 | 2022/05/30 10:57:01 | at com.wm.app.b2b.server.invoke.InvokeManager.process(InvokeManager.java:739)
INFO | jvm 1 | 2022/05/30 10:57:01 | at wm.bci.internal.BciServiceInvokeNotifier.process(BciServiceInvokeNotifier.java:32)
INFO | jvm 1 | 2022/05/30 10:57:01 | at com.wm.ps.serviceMock.ServiceInterceptor.process(ServiceInterceptor.java:360)
INFO | jvm 1 | 2022/05/30 10:57:01 | at com.wm.app.b2b.server.util.tspace.ReservationProcessor.process(ReservationProcessor.java:46)
INFO | jvm 1 | 2022/05/30 10:57:01 | at com.wm.app.b2b.server.invoke.StatisticsProcessor.process(StatisticsProcessor.java:61)
INFO | jvm 1 | 2022/05/30 10:57:01 | at com.wm.app.b2b.server.invoke.ServiceCompletionImpl.process(ServiceCompletionImpl.java:250)
INFO | jvm 1 | 2022/05/30 10:57:01 | at com.wm.app.b2b.server.invoke.ValidateProcessor.process(ValidateProcessor.java:56)
INFO | jvm 1 | 2022/05/30 10:57:01 | at com.wm.app.b2b.server.invoke.PipelineProcessor.process(PipelineProcessor.java:178)
INFO | jvm 1 | 2022/05/30 10:57:01 | at com.wm.app.b2b.server.ACLManager.process(ACLManager.java:334)
INFO | jvm 1 | 2022/05/30 10:57:01 | at com.wm.app.b2b.server.invoke.DispatchProcessor.process(DispatchProcessor.java:41)
INFO | jvm 1 | 2022/05/30 10:57:01 | at com.wm.app.b2b.server.AuditLogManager.process(AuditLogManager.java:401)
INFO | jvm 1 | 2022/05/30 10:57:01 | at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:611)
INFO | jvm 1 | 2022/05/30 10:57:01 | at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:423)
INFO | jvm 1 | 2022/05/30 10:57:01 | at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:381)
INFO | jvm 1 | 2022/05/30 10:57:01 | at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:253)
INFO | jvm 1 | 2022/05/30 10:57:01 | at com.wm.app.b2b.server.comm.DefaultServerRequestHandler.handleMessage(DefaultServerRequestHandler.java:127)
INFO | jvm 1 | 2022/05/30 10:57:01 | at com.wm.app.b2b.server.HTTPMessageHandler.process(HTTPMessageHandler.java:163)
INFO | jvm 1 | 2022/05/30 10:57:01 | at com.wm.app.b2b.server.HTTPDispatch.handleRequest(HTTPDispatch.java:223)
INFO | jvm 1 | 2022/05/30 10:57:01 | at com.wm.app.b2b.server.Dispatch.run(Dispatch.java:430)
INFO | jvm 1 | 2022/05/30 10:57:01 | at com.wm.util.pool.PooledThread.run(PooledThread.java:134)
INFO | jvm 1 | 2022/05/30 10:57:01 | at java.lang.Thread.run(Thread.java:748)
INFO | jvm 1 | 2022/05/30 10:57:01 | Caused by: java.lang.NoClassDefFoundError: com/lmax/disruptor/EventFactory
INFO | jvm 1 | 2022/05/30 10:57:01 | at org.apache.logging.log4j.core.config.AbstractConfiguration.getAsyncLoggerConfigDelegate(AbstractConfiguration.java:203)
INFO | jvm 1 | 2022/05/30 10:57:01 | at org.apache.logging.log4j.core.async.AsyncLoggerConfig.(AsyncLoggerConfig.java:91)
INFO | jvm 1 | 2022/05/30 10:57:01 | at org.apache.logging.log4j.core.async.AsyncLoggerConfig.createLogger(AsyncLoggerConfig.java:273)
INFO | jvm 1 | 2022/05/30 10:57:01 | … 40 more
INFO | jvm 1 | 2022/05/30 10:57:01 | Caused by: java.lang.ClassNotFoundException: com.lmax.disruptor.EventFactory cannot be found by org.apache.logging.log4j.core_2.11.2
INFO | jvm 1 | 2022/05/30 10:57:01 | at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:511)
INFO | jvm 1 | 2022/05/30 10:57:01 | at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
INFO | jvm 1 | 2022/05/30 10:57:01 | at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:414)
INFO | jvm 1 | 2022/05/30 10:57:01 | at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:153)
INFO | jvm 1 | 2022/05/30 10:57:01 | at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
INFO | jvm 1 | 2022/05/30 10:57:01 | … 43 more
INFO | jvm 1 | 2022/05/30 10:57:01 |
INFO | jvm 1 | 2022/05/30 10:57:01 | 2022-05-30 10:57:01,042 HTTP Handler 10.21.14.26 ERROR Unable to invoke factory method in class org.apache.logging.log4j.core.async.AsyncLoggerConfig for element AsyncLogger: java.lang.NoClassDefFoundError: com/lmax/disruptor/EventFactory java.lang.reflect.InvocationTargetException
INFO | jvm 1 | 2022/05/30 10:57:01 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
INFO | jvm 1 | 2022/05/30 10:57:01 | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
INFO | jvm 1 | 2022/05/30 10:57:01 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
INFO | jvm 1 | 2022/05/30 10:57:01 | at java.lang.reflect.Method.invoke(Method.java:498)
INFO | jvm 1 | 2022/05/30 10:57:01 | at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:136)
INFO | jvm 1 | 2022/05/30 10:57:01 | at org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:964)
INFO | jvm 1 | 2022/05/30 10:57:01 | at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:904)
INFO | jvm 1 | 2022/05/30 10:57:01 | at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:896)
INFO | jvm 1 | 2022/05/30 10:57:01 | at org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:514)
INFO | jvm 1 | 2022/05/30 10:57:01 | at org.apache.logging.log4j.core.config.AbstractConfiguration.initialize(AbstractConfiguration.java:238)
INFO | jvm 1 | 2022/05/30 10:57:01 | at org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:250)
INFO | jvm 1 | 2022/05/30 10:57:01 | at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:548)
INFO | jvm 1 | 2022/05/30 10:57:01 | at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:263)
INFO | jvm 1 | 2022/05/30 10:57:01 | at Log4jDemo.utils.java.init(java.java:83)
INFO | jvm 1 | 2022/05/30 10:57:01 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
INFO | jvm 1 | 2022/05/30 10:57:01 | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
INFO | jvm 1 | 2022/05/30 10:57:01 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
INFO | jvm 1 | 2022/05/30 10:57:01 | at java.lang.reflect.Method.invoke(Method.java:498)
INFO | jvm 1 | 2022/05/30 10:57:01 | at com.wm.app.b2b.server.JavaService.baseInvoke(JavaService.java:411)
INFO | jvm 1 | 2022/05/30 10:57:01 | at com.wm.app.b2b.server.invoke.InvokeManager.process(InvokeManager.java:739)
INFO | jvm 1 | 2022/05/30 10:57:01 | at wm.bci.internal.BciServiceInvokeNotifier.process(BciServiceInvokeNotifier.java:32)
INFO | jvm 1 | 2022/05/30 10:57:01 | at com.wm.ps.serviceMock.ServiceInterceptor.process(ServiceInterceptor.java:360)
INFO | jvm 1 | 2022/05/30 10:57:01 | at com.wm.app.b2b.server.util.tspace.ReservationProcessor.process(ReservationProcessor.java:46)
INFO | jvm 1 | 2022/05/30 10:57:01 | at com.wm.app.b2b.server.invoke.StatisticsProcessor.process(StatisticsProcessor.java:61)
INFO | jvm 1 | 2022/05/30 10:57:01 | at com.wm.app.b2b.server.invoke.ServiceCompletionImpl.process(ServiceCompletionImpl.java:250)
INFO | jvm 1 | 2022/05/30 10:57:01 | at com.wm.app.b2b.server.invoke.ValidateProcessor.process(ValidateProcessor.java:56)
INFO | jvm 1 | 2022/05/30 10:57:01 | at com.wm.app.b2b.server.invoke.PipelineProcessor.process(PipelineProcessor.java:178)
INFO | jvm 1 | 2022/05/30 10:57:01 | at com.wm.app.b2b.server.ACLManager.process(ACLManager.java:334)
INFO | jvm 1 | 2022/05/30 10:57:01 | at com.wm.app.b2b.server.invoke.DispatchProcessor.process(DispatchProcessor.java:41)
INFO | jvm 1 | 2022/05/30 10:57:01 | at com.wm.app.b2b.server.AuditLogManager.process(AuditLogManager.java:401)
INFO | jvm 1 | 2022/05/30 10:57:01 | at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:611)
INFO | jvm 1 | 2022/05/30 10:57:01 | at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:423)
INFO | jvm 1 | 2022/05/30 10:57:01 | at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:381)
INFO | jvm 1 | 2022/05/30 10:57:01 | at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:253)
INFO | jvm 1 | 2022/05/30 10:57:01 | at com.wm.app.b2b.server.comm.DefaultServerRequestHandler.handleMessage(DefaultServerRequestHandler.java:127)
INFO | jvm 1 | 2022/05/30 10:57:01 | at com.wm.app.b2b.server.HTTPMessageHandler.process(HTTPMessageHandler.java:163)
INFO | jvm 1 | 2022/05/30 10:57:01 | at com.wm.app.b2b.server.HTTPDispatch.handleRequest(HTTPDispatch.java:223)
INFO | jvm 1 | 2022/05/30 10:57:01 | at com.wm.app.b2b.server.Dispatch.run(Dispatch.java:430)
INFO | jvm 1 | 2022/05/30 10:57:01 | at com.wm.util.pool.PooledThread.run(PooledThread.java:134)
INFO | jvm 1 | 2022/05/30 10:57:01 | at java.lang.Thread.run(Thread.java:748)
INFO | jvm 1 | 2022/05/30 10:57:01 | Caused by: java.lang.NoClassDefFoundError: com/lmax/disruptor/EventFactory
INFO | jvm 1 | 2022/05/30 10:57:01 | at org.apache.logging.log4j.core.config.AbstractConfiguration.getAsyncLoggerConfigDelegate(AbstractConfiguration.java:203)
INFO | jvm 1 | 2022/05/30 10:57:01 | at org.apache.logging.log4j.core.async.AsyncLoggerConfig.(AsyncLoggerConfig.java:91)
INFO | jvm 1 | 2022/05/30 10:57:01 | at org.apache.logging.log4j.core.async.AsyncLoggerConfig.createLogger(AsyncLoggerConfig.java:273)
INFO | jvm 1 | 2022/05/30 10:57:01 | … 40 more
INFO | jvm 1 | 2022/05/30 10:57:01 | Caused by: java.lang.ClassNotFoundException: com.lmax.disruptor.EventFactory cannot be found by org.apache.logging.log4j.core_2.11.2
INFO | jvm 1 | 2022/05/30 10:57:01 | at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:511)
INFO | jvm 1 | 2022/05/30 10:57:01 | at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
INFO | jvm 1 | 2022/05/30 10:57:01 | at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:414)
INFO | jvm 1 | 2022/05/30 10:57:01 | at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:153)
INFO | jvm 1 | 2022/05/30 10:57:01 | at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
INFO | jvm 1 | 2022/05/30 10:57:01 | … 43 more
INFO | jvm 1 | 2022/05/30 10:57:01 |
INFO | jvm 1 | 2022/05/30 10:57:01 | 2022-05-30 10:57:01,042 HTTP Handler 10.21.14.26 ERROR Null object returned for AsyncLogger in Loggers.
INFO | jvm 1 | 2022/05/30 10:57:01 | 2022-05-30 10:57:01,042 HTTP Handler 10.21.14.26 ERROR Null object returned for AsyncLogger in Loggers.

log4j2.xml file used in package:

<?xml version="1.0" encoding="UTF-8"?> {"level":"%p","time":"%d{ISO8601}","thread":"%t","file":"%F","applicationData":%m}%n
	<AsyncLogger additivity="false" level="Info" name="InfoLogger">
			<AppenderRef ref="Log4jDemo"/>
	</AsyncLogger>
	<AsyncLogger additivity="false" level="Error" name="ErrorLogger">
		<AppenderRef ref="Log4jDemo"/>
	</AsyncLogger>
		
</Loggers>

Jars are placed in package in path Log4jDemo/code/jars

  1. disruptor-3.4.4.jar
  2. log4j-API-2.17.2.jar
  3. log4j-core-2.17.2 jar

Hi,

looks like a class loading issue as log4j2 is already bundled with the wM Suite.

Please check for the latest Fixes for wM 10.5 to solve the log4j2 security issue and if the log4j2 jars are already loaded from common/lib-directory which is blocking the loading from your custom package location.

Regards,
Holger

1 Like

Hi Holger,

Thanks for reply.

I have tried in new environment with latest fixes, but still getting the same error. Please let me know what could be the reason for this issue.

I can see similar issue posted in given link,

1 Like

Issue got resolved after updating manifest file of custom package.

1 Like

Hi Sourab - Can you specify what exactly you have updated in the manifest file of the custom package to fix this issue.

Thanks
Sujoy

Hi @Sujoy_Pal1 ,

value name=“classloader” package value.
This tag in manifest file will load the jars present in package.

Thanks,
Sourab

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.