verjan-isencia commented on issue #3706: URL: https://github.com/apache/logging-log4j2/issues/3706#issuecomment-2934674703
I have been debugging the problem in our OSGI platform, and the problem seems to be with the classloader used at the moment the static variable in DisruptUtil is initialized: ``` static final int DISRUPTOR_MAJOR_VERSION = LoaderUtil.isClassAvailable("com.lmax.disruptor.SequenceReportingEventHandler") ? 3 : 4; ``` Inside LoaderUtil, the classloader is chosen with which to call Class.forName("com.lmax.disruptor.SequenceReportingEventHandler") and it ends up using the ThreadContextClassLoader. Problem is that in our case that happens to be the _org.apache.aries.cdi.container.internal.loader.BundleClassLoader_ (because we need support for CDI at some point in the application), and that classloader does not appear to see any classes of the disruptor bundle. The problem would be fixed using the bundle classloader of the disruptor bundle (f.e. _com.lmax.disruptor.EventHandler.class.getClassLoader()_). If not, I suppose I could try to find a way to get the version initialized earlier in the startup process. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@logging.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org