Re: org.apache.logging.log4j.jmx.HierarchyDynamicMBean not found in log4j 2

Ralph Goers <[email protected]>
Newsgroups gmane.comp.jakarta.log4j.user
Message-ID <[email protected]>
I’m confused. Log4j 1.x used the package org.apache.log4j. Log4j 2.x uses 
org.apache.logging.log4j. So how was that class part of Log4j 1.x?

Indeed - https://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/jmx/HierarchyDynamicMBean.html 
indicates the package name you show below is wrong.

Although Gary just added the JMX components to log4j-1.2-api I don’t believe you should actually use them. 
Log4j 2 comes with its own JMX support and since the design of Log4j 2 is different than Log4j 1 I suspect 
not everything in 1.x will work as expected.

Ralph

> On Mar 21, 2022, at 4:34 PM, Gary Gregory <[email protected]> wrote:
> 
> Shaib,
> 
> That whole package was never ported into the log4j-1.2-api module.
> 
> I just added the missing package for API binary compatibility.
> 
> Do note the package Javadoc: "This package lets you manage log4j settings
> using JMX. It is unfortunately not of production quality."
> 
> There is no testing for behavioral compatibility, this is currently only to
> avoid class not found errors. It is unlikely to work as expected.
> 
> You can find this code in the 'release-2.x' branch and snapshot builds on
> https://repository.apache.org/content/repositories/snapshots/
> 
> Gary
> 
> On Mon, Mar 21, 2022 at 5:13 PM Shaib Al-Agily
> <[email protected]> wrote:
> 
>> Hello,
>> 
>> Per Apache's website recommendations, our company is in the process of
>> migrating some of its applications from log4j-1.2.14 to log4j-core-2.17.1.
>> 
>> Class "org.apache.logging.log4j.jmx.HierarchyDynamicMBean" is referenced
>> in one of our application and that is generating an error. It appears class
>> org.apache.logging.log4j.jmx.HierarchyDynamicMBean is not implemented in
>> log4j 2.
>> 
>> Questions:
>> 1.           Is the class
>> org.apache.logging.log4j.jmx.HierarchyDynamicMBean implemented in log4j 2?
>> Where?
>> 2.           Is it merged in another class?
>> 3.           Is there an alternative class/solution?
>> 
>> Thank you very much
>> 
>> Shaib
>> 
>> 
>>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.