ppkarwasz commented on issue #3504: URL: https://github.com/apache/logging-log4j2/issues/3504#issuecomment-2692896201
> However, it allows dynamically importing extensions along with JARs at runtime using the server **classloader**. Can you clarify more what do you mean by "server classloader"? Are you talking about the parent of all web-app classloaders (see [Tomcat classloading](https://tomcat.apache.org/tomcat-11.0-doc/class-loader-howto.html)? How do you dynamically add JARs to a running classloader? Classloader are usually designed to be immutable. > `ExtendedLogger.class` throws `NoClassDefFoundError`. Do you have a root cause for the `NoClassDefFoundError`? This error is thrown for a variety of reasons, for example once the classloader fails to load a class, all **successive** attempt to load that class will throw a `NoClassDefFoundError`. If `o.a.l.l.spi.ExtendedLogger` were to dynamically appear in a classloader, but the classloader already attempted to load the class, a `NoClassDefFoundError` will be thrown. Some libraries, [for example `spring-jcl`](https://github.com/spring-projects/spring-framework/blob/6.2.x/spring-jcl/src/main/java/org/apache/commons/logging/LogAdapter.java), try to load `o.a.l.l.spi.ExtendedLogger` to test if `log4j-api` is present on the classpath. -- 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