You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by EDMONDO SENA <ed...@gmail.com> on 2020/04/29 09:42:28 UTC

Java.lang.LinkageError

Hi Everybody,

I'm using log4j  2 with Junit 5 and java 11 with last version of PowerMock, but the following error is showed:

"Could not reconfigure jmx
java.lang.LinkageError:  loader constraint violation : loader org.powermock.core.classloader.javassist.JavassistMockClassLoader, child of 'app' jdk.internal.loader.ClassLoader$AppClassLoader wants to load interface javax.management.MBeanServer."

A different interface with the same name was previously loaded by 'bootstrap'.

Can you help me in order to fix this error?
Kind regards.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: Java.lang.LinkageError

Posted by EDMONDO SENA <ed...@gmail.com>.
No It is not so!

PowerMock with java 11 and Log4j old version (1), everything was working.
Adding Log4j 2 We've that problem...



Il giorno mer 29 apr 2020 alle ore 13:33 Benjamin Asbach <
contact-a1w@impl.it> ha scritto:

> Hello Edmondo,
>
> I don't think this is an log4j related issue.
>
> You're using Powermock in combination with JUnit 5 which currently is
> not supported [1]. There's some kind of workaround [2] you might try
> that out.
>
> Greetings
> Benjamin
>
> [1] https://github.com/powermock/powermock/issues/830
> [2]
> https://github.com/powermock/powermock/issues/830#issuecomment-616243661
>
> On 2020-04-29 11:42, EDMONDO SENA wrote:
> > Hi Everybody,
> >
> > I'm using log4j  2 with Junit 5 and java 11 with last version of
> > PowerMock, but the following error is showed:
> >
> > "Could not reconfigure jmx
> > java.lang.LinkageError:  loader constraint violation : loader
> > org.powermock.core.classloader.javassist.JavassistMockClassLoader,
> > child of 'app' jdk.internal.loader.ClassLoader$AppClassLoader wants to
> > load interface javax.management.MBeanServer."
> >
> > A different interface with the same name was previously loaded by
> > 'bootstrap'.
> >
> > Can you help me in order to fix this error?
> > Kind regards.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>

Re: Java.lang.LinkageError

Posted by Matt Sicker <bo...@gmail.com>.
Also, if you’re trying to mock log4j2 in tests, you can always use the
LoggerContextRule from our test libraries to configure logging at the test
level.

On Wed, Apr 29, 2020 at 08:42 Matt Sicker <bo...@gmail.com> wrote:

> Sounds like you’ll need to configure PowerMock to ignore the log4j2 JMX
> classes. There’s also a system property in log4j2 to disable JMX which is
> worth a try.
>
> On Wed, Apr 29, 2020 at 08:34 EDMONDO SENA <ed...@gmail.com> wrote:
>
>> I repeat, we've done some tests and with java 11, Junit 4 and Log4j 1
>> everything has worked well.
>> The only difference is log4j -> log4j 2.13 and we've this problem.
>> Can you suggest us what's the workaround?
>>
>> Kind regards.
>>
>>
>> On 2020/04/29 13:32:17, EDMONDO SENA <ed...@gmail.com> wrote:
>> > Matt sorry,
>> >
>> > I need a solution!
>> >
>> > Before we were Java 8, and Log4j and everything has worked!
>> > Well, now we've java 11 and Log4j 2.
>> > How can we fix it?
>> > Have you any suggest?
>> >
>> >
>> >
>> >
>> > On 2020/04/29 13:29:04, Matt Sicker <bo...@gmail.com> wrote:
>> > > The JMX module isn’t fully compatible with Java 11 as far as I can
>> tell. It
>> > > doesn’t even compile above 8.
>> > >
>> > > On Wed, Apr 29, 2020 at 07:17 EDMONDO SENA <ed...@gmail.com> wrote:
>> > >
>> > > > In API Document is reported this phrase:
>> > > >
>> > > > Enabling JMX
>> > > > JMX support is enabled by default. When Log4j initializes, the
>> > > > StatusLogger, ContextSelector, and all LoggerContexts,
>> LoggerConfigs and
>> > > > Appenders are instrumented with MBeans. To disable JMX completely,
>> and
>> > > > prevent these MBeans from being created, specify system property
>> > > > log4j2.disableJmx to true when you start the Java VM.
>> > > >
>> > > > Can you explain me if the problem can be fixed set
>> log4j2.disableJmx=true
>> > > > or using
>> > > > @PowerMockIgnore("Javax.management.* ")?
>> > > >
>> > > > Or something else?
>> > > >
>> > > >
>> > > >
>> > > > On 2020/04/29 12:07:06, EDMONDO SENA <ed...@gmail.com> wrote:
>> > > > > Any question?
>> > > > >
>> > > > > I'm using Log4j 2.13.0.......
>> > > > >
>> > > > >
>> > > >
>> https://stackanswers.net/questions/powermock-after-log4j2-3-upgrade-could-not-reconfigure-jmx-java-lang-linkageerror
>> > > > >
>> > > > >
>> > > > >
>> > > > > On 2020/04/29 11:55:32, EDMONDO SENA <ed...@gmail.com> wrote:
>> > > > > > Sorry, we're using Java 11, Junit 4 e Log4j 2!
>> > > > > >
>> > > > > >
>> > > > > > On 2020/04/29 11:49:03, EDMONDO SENA <ed...@gmail.com> wrote:
>> > > > > > > No It is not so!
>> > > > > > >
>> > > > > > > PowerMock with java 11 and Log4j old version (1), everything
>> was
>> > > > working.
>> > > > > > > Adding Log4j 2 We've that problem...
>> > > > > > >
>> > > > > > >
>> > > > > > >
>> > > > > > > On 2020/04/29 11:33:24, Benjamin Asbach <co...@impl.it>
>> > > > wrote:
>> > > > > > > > Hello Edmondo,
>> > > > > > > >
>> > > > > > > > I don't think this is an log4j related issue.
>> > > > > > > >
>> > > > > > > > You're using Powermock in combination with JUnit 5 which
>> currently
>> > > > is
>> > > > > > > > not supported [1]. There's some kind of workaround [2] you
>> might
>> > > > try
>> > > > > > > > that out.
>> > > > > > > >
>> > > > > > > > Greetings
>> > > > > > > > Benjamin
>> > > > > > > >
>> > > > > > > > [1] https://github.com/powermock/powermock/issues/830
>> > > > > > > > [2]
>> > > > > > > >
>> > > >
>> https://github.com/powermock/powermock/issues/830#issuecomment-616243661
>> > > > > > > >
>> > > > > > > > On 2020-04-29 11:42, EDMONDO SENA wrote:
>> > > > > > > > > Hi Everybody,
>> > > > > > > > >
>> > > > > > > > > I'm using log4j  2 with Junit 5 and java 11 with last
>> version of
>> > > > > > > > > PowerMock, but the following error is showed:
>> > > > > > > > >
>> > > > > > > > > "Could not reconfigure jmx
>> > > > > > > > > java.lang.LinkageError:  loader constraint violation :
>> loader
>> > > > > > > > >
>> > > > org.powermock.core.classloader.javassist.JavassistMockClassLoader,
>> > > > > > > > > child of 'app'
>> jdk.internal.loader.ClassLoader$AppClassLoader
>> > > > wants to
>> > > > > > > > > load interface javax.management.MBeanServer."
>> > > > > > > > >
>> > > > > > > > > A different interface with the same name was previously
>> loaded
>> > > > by
>> > > > > > > > > 'bootstrap'.
>> > > > > > > > >
>> > > > > > > > > Can you help me in order to fix this error?
>> > > > > > > > > Kind regards.
>> > > > > > > > >
>> > > > > > > > >
>> > > >
>> ---------------------------------------------------------------------
>> > > > > > > > > To unsubscribe, e-mail:
>> > > > log4j-user-unsubscribe@logging.apache.org
>> > > > > > > > > For additional commands, e-mail:
>> > > > log4j-user-help@logging.apache.org
>> > > > > > > >
>> > > > > > > >
>> > > >
>> ---------------------------------------------------------------------
>> > > > > > > > To unsubscribe, e-mail:
>> log4j-user-unsubscribe@logging.apache.org
>> > > > > > > > For additional commands, e-mail:
>> > > > log4j-user-help@logging.apache.org
>> > > > > > > >
>> > > > > > > >
>> > > > > > >
>> > > > > > >
>> ---------------------------------------------------------------------
>> > > > > > > To unsubscribe, e-mail:
>> log4j-user-unsubscribe@logging.apache.org
>> > > > > > > For additional commands, e-mail:
>> log4j-user-help@logging.apache.org
>> > > > > > >
>> > > > > > >
>> > > > > >
>> > > > > >
>> ---------------------------------------------------------------------
>> > > > > > To unsubscribe, e-mail:
>> log4j-user-unsubscribe@logging.apache.org
>> > > > > > For additional commands, e-mail:
>> log4j-user-help@logging.apache.org
>> > > > > >
>> > > > > >
>> > > > >
>> > > > >
>> ---------------------------------------------------------------------
>> > > > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>> > > > > For additional commands, e-mail:
>> log4j-user-help@logging.apache.org
>> > > > >
>> > > > >
>> > > >
>> > > >
>> ---------------------------------------------------------------------
>> > > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>> > > > For additional commands, e-mail: log4j-user-help@logging.apache.org
>> > > >
>> > > > --
>> > > Matt Sicker <bo...@gmail.com>
>> > >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>> > For additional commands, e-mail: log4j-user-help@logging.apache.org
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>>
>> --
> Matt Sicker <bo...@gmail.com>
>
-- 
Matt Sicker <bo...@gmail.com>

Re: Java.lang.LinkageError

Posted by Matt Sicker <bo...@gmail.com>.
I don't know anything about log4j1 as I haven't used that for several
years, sorry.

On Wed, 29 Apr 2020 at 09:33, EDMONDO SENA <ed...@gmail.com> wrote:
>
> Matt, last question:
>
> Before for log4j 1 the JMX wasn't enabled for default?
>
>
>
> On 2020/04/29 14:30:12, Matt Sicker <bo...@gmail.com> wrote:
> > Yes, I mean the system property. I don't know much about PowerMock,
> > though I never mock loggers.
> >
> > On Wed, 29 Apr 2020 at 08:52, EDMONDO SENA <ed...@gmail.com> wrote:
> > >
> > > Hi Matt,
> > >
> > > We've 100 files to change.
> > > So, in order to speed solution is it disable JMX in log4j2?
> > > You mean log4j2.disable.jmx=true?
> > > You think that use @PowerMockIgnore("Javax.management.* ") is useless?
> > >
> > >
> > >
> > > On 2020/04/29 13:42:02, Matt Sicker <bo...@gmail.com> wrote:
> > > > Sounds like you’ll need to configure PowerMock to ignore the log4j2 JMX
> > > > classes. There’s also a system property in log4j2 to disable JMX which is
> > > > worth a try.
> > > >
> > > > On Wed, Apr 29, 2020 at 08:34 EDMONDO SENA <ed...@gmail.com> wrote:
> > > >
> > > > > I repeat, we've done some tests and with java 11, Junit 4 and Log4j 1
> > > > > everything has worked well.
> > > > > The only difference is log4j -> log4j 2.13 and we've this problem.
> > > > > Can you suggest us what's the workaround?
> > > > >
> > > > > Kind regards.
> > > > >
> > > > >
> > > > > On 2020/04/29 13:32:17, EDMONDO SENA <ed...@gmail.com> wrote:
> > > > > > Matt sorry,
> > > > > >
> > > > > > I need a solution!
> > > > > >
> > > > > > Before we were Java 8, and Log4j and everything has worked!
> > > > > > Well, now we've java 11 and Log4j 2.
> > > > > > How can we fix it?
> > > > > > Have you any suggest?
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > On 2020/04/29 13:29:04, Matt Sicker <bo...@gmail.com> wrote:
> > > > > > > The JMX module isn’t fully compatible with Java 11 as far as I can
> > > > > tell. It
> > > > > > > doesn’t even compile above 8.
> > > > > > >
> > > > > > > On Wed, Apr 29, 2020 at 07:17 EDMONDO SENA <ed...@gmail.com> wrote:
> > > > > > >
> > > > > > > > In API Document is reported this phrase:
> > > > > > > >
> > > > > > > > Enabling JMX
> > > > > > > > JMX support is enabled by default. When Log4j initializes, the
> > > > > > > > StatusLogger, ContextSelector, and all LoggerContexts, LoggerConfigs
> > > > > and
> > > > > > > > Appenders are instrumented with MBeans. To disable JMX completely,
> > > > > and
> > > > > > > > prevent these MBeans from being created, specify system property
> > > > > > > > log4j2.disableJmx to true when you start the Java VM.
> > > > > > > >
> > > > > > > > Can you explain me if the problem can be fixed set
> > > > > log4j2.disableJmx=true
> > > > > > > > or using
> > > > > > > > @PowerMockIgnore("Javax.management.* ")?
> > > > > > > >
> > > > > > > > Or something else?
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > On 2020/04/29 12:07:06, EDMONDO SENA <ed...@gmail.com> wrote:
> > > > > > > > > Any question?
> > > > > > > > >
> > > > > > > > > I'm using Log4j 2.13.0.......
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > https://stackanswers.net/questions/powermock-after-log4j2-3-upgrade-could-not-reconfigure-jmx-java-lang-linkageerror
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > On 2020/04/29 11:55:32, EDMONDO SENA <ed...@gmail.com> wrote:
> > > > > > > > > > Sorry, we're using Java 11, Junit 4 e Log4j 2!
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > On 2020/04/29 11:49:03, EDMONDO SENA <ed...@gmail.com> wrote:
> > > > > > > > > > > No It is not so!
> > > > > > > > > > >
> > > > > > > > > > > PowerMock with java 11 and Log4j old version (1), everything
> > > > > was
> > > > > > > > working.
> > > > > > > > > > > Adding Log4j 2 We've that problem...
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > On 2020/04/29 11:33:24, Benjamin Asbach <co...@impl.it>
> > > > > > > > wrote:
> > > > > > > > > > > > Hello Edmondo,
> > > > > > > > > > > >
> > > > > > > > > > > > I don't think this is an log4j related issue.
> > > > > > > > > > > >
> > > > > > > > > > > > You're using Powermock in combination with JUnit 5 which
> > > > > currently
> > > > > > > > is
> > > > > > > > > > > > not supported [1]. There's some kind of workaround [2] you
> > > > > might
> > > > > > > > try
> > > > > > > > > > > > that out.
> > > > > > > > > > > >
> > > > > > > > > > > > Greetings
> > > > > > > > > > > > Benjamin
> > > > > > > > > > > >
> > > > > > > > > > > > [1] https://github.com/powermock/powermock/issues/830
> > > > > > > > > > > > [2]
> > > > > > > > > > > >
> > > > > > > >
> > > > > https://github.com/powermock/powermock/issues/830#issuecomment-616243661
> > > > > > > > > > > >
> > > > > > > > > > > > On 2020-04-29 11:42, EDMONDO SENA wrote:
> > > > > > > > > > > > > Hi Everybody,
> > > > > > > > > > > > >
> > > > > > > > > > > > > I'm using log4j  2 with Junit 5 and java 11 with last
> > > > > version of
> > > > > > > > > > > > > PowerMock, but the following error is showed:
> > > > > > > > > > > > >
> > > > > > > > > > > > > "Could not reconfigure jmx
> > > > > > > > > > > > > java.lang.LinkageError:  loader constraint violation :
> > > > > loader
> > > > > > > > > > > > >
> > > > > > > > org.powermock.core.classloader.javassist.JavassistMockClassLoader,
> > > > > > > > > > > > > child of 'app'
> > > > > jdk.internal.loader.ClassLoader$AppClassLoader
> > > > > > > > wants to
> > > > > > > > > > > > > load interface javax.management.MBeanServer."
> > > > > > > > > > > > >
> > > > > > > > > > > > > A different interface with the same name was previously
> > > > > loaded
> > > > > > > > by
> > > > > > > > > > > > > 'bootstrap'.
> > > > > > > > > > > > >
> > > > > > > > > > > > > Can you help me in order to fix this error?
> > > > > > > > > > > > > Kind regards.
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > ---------------------------------------------------------------------
> > > > > > > > > > > > > To unsubscribe, e-mail:
> > > > > > > > log4j-user-unsubscribe@logging.apache.org
> > > > > > > > > > > > > For additional commands, e-mail:
> > > > > > > > log4j-user-help@logging.apache.org
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > ---------------------------------------------------------------------
> > > > > > > > > > > > To unsubscribe, e-mail:
> > > > > log4j-user-unsubscribe@logging.apache.org
> > > > > > > > > > > > For additional commands, e-mail:
> > > > > > > > log4j-user-help@logging.apache.org
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > ---------------------------------------------------------------------
> > > > > > > > > > > To unsubscribe, e-mail:
> > > > > log4j-user-unsubscribe@logging.apache.org
> > > > > > > > > > > For additional commands, e-mail:
> > > > > log4j-user-help@logging.apache.org
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > ---------------------------------------------------------------------
> > > > > > > > > > To unsubscribe, e-mail:
> > > > > log4j-user-unsubscribe@logging.apache.org
> > > > > > > > > > For additional commands, e-mail:
> > > > > log4j-user-help@logging.apache.org
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > ---------------------------------------------------------------------
> > > > > > > > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > > > > > > > > For additional commands, e-mail:
> > > > > log4j-user-help@logging.apache.org
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > > > ---------------------------------------------------------------------
> > > > > > > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > > > > > > > For additional commands, e-mail: log4j-user-help@logging.apache.org
> > > > > > > >
> > > > > > > > --
> > > > > > > Matt Sicker <bo...@gmail.com>
> > > > > > >
> > > > > >
> > > > > > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > > > > > For additional commands, e-mail: log4j-user-help@logging.apache.org
> > > > > >
> > > > > >
> > > > >
> > > > > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > > > > For additional commands, e-mail: log4j-user-help@logging.apache.org
> > > > >
> > > > > --
> > > > Matt Sicker <bo...@gmail.com>
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > > For additional commands, e-mail: log4j-user-help@logging.apache.org
> > >
> >
> >
> > --
> > Matt Sicker <bo...@gmail.com>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>


-- 
Matt Sicker <bo...@gmail.com>

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: Java.lang.LinkageError

Posted by Ralph Goers <ra...@dslextreme.com>.
Log4j 1.x and Log4j 2 are completely different code bases. They have very little in common. I’m not even sure Log4j 1 had any support for JMX. 

Ralph

> On Apr 29, 2020, at 7:33 AM, EDMONDO SENA <ed...@gmail.com> wrote:
> 
> Matt, last question:
> 
> Before for log4j 1 the JMX wasn't enabled for default?
> 
> 
> 
> On 2020/04/29 14:30:12, Matt Sicker <bo...@gmail.com> wrote: 
>> Yes, I mean the system property. I don't know much about PowerMock,
>> though I never mock loggers.
>> 
>> On Wed, 29 Apr 2020 at 08:52, EDMONDO SENA <ed...@gmail.com> wrote:
>>> 
>>> Hi Matt,
>>> 
>>> We've 100 files to change.
>>> So, in order to speed solution is it disable JMX in log4j2?
>>> You mean log4j2.disable.jmx=true?
>>> You think that use @PowerMockIgnore("Javax.management.* ") is useless?
>>> 
>>> 
>>> 
>>> On 2020/04/29 13:42:02, Matt Sicker <bo...@gmail.com> wrote:
>>>> Sounds like you’ll need to configure PowerMock to ignore the log4j2 JMX
>>>> classes. There’s also a system property in log4j2 to disable JMX which is
>>>> worth a try.
>>>> 
>>>> On Wed, Apr 29, 2020 at 08:34 EDMONDO SENA <ed...@gmail.com> wrote:
>>>> 
>>>>> I repeat, we've done some tests and with java 11, Junit 4 and Log4j 1
>>>>> everything has worked well.
>>>>> The only difference is log4j -> log4j 2.13 and we've this problem.
>>>>> Can you suggest us what's the workaround?
>>>>> 
>>>>> Kind regards.
>>>>> 
>>>>> 
>>>>> On 2020/04/29 13:32:17, EDMONDO SENA <ed...@gmail.com> wrote:
>>>>>> Matt sorry,
>>>>>> 
>>>>>> I need a solution!
>>>>>> 
>>>>>> Before we were Java 8, and Log4j and everything has worked!
>>>>>> Well, now we've java 11 and Log4j 2.
>>>>>> How can we fix it?
>>>>>> Have you any suggest?
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> On 2020/04/29 13:29:04, Matt Sicker <bo...@gmail.com> wrote:
>>>>>>> The JMX module isn’t fully compatible with Java 11 as far as I can
>>>>> tell. It
>>>>>>> doesn’t even compile above 8.
>>>>>>> 
>>>>>>> On Wed, Apr 29, 2020 at 07:17 EDMONDO SENA <ed...@gmail.com> wrote:
>>>>>>> 
>>>>>>>> In API Document is reported this phrase:
>>>>>>>> 
>>>>>>>> Enabling JMX
>>>>>>>> JMX support is enabled by default. When Log4j initializes, the
>>>>>>>> StatusLogger, ContextSelector, and all LoggerContexts, LoggerConfigs
>>>>> and
>>>>>>>> Appenders are instrumented with MBeans. To disable JMX completely,
>>>>> and
>>>>>>>> prevent these MBeans from being created, specify system property
>>>>>>>> log4j2.disableJmx to true when you start the Java VM.
>>>>>>>> 
>>>>>>>> Can you explain me if the problem can be fixed set
>>>>> log4j2.disableJmx=true
>>>>>>>> or using
>>>>>>>> @PowerMockIgnore("Javax.management.* ")?
>>>>>>>> 
>>>>>>>> Or something else?
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> On 2020/04/29 12:07:06, EDMONDO SENA <ed...@gmail.com> wrote:
>>>>>>>>> Any question?
>>>>>>>>> 
>>>>>>>>> I'm using Log4j 2.13.0.......
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>> 
>>>>> https://stackanswers.net/questions/powermock-after-log4j2-3-upgrade-could-not-reconfigure-jmx-java-lang-linkageerror
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> On 2020/04/29 11:55:32, EDMONDO SENA <ed...@gmail.com> wrote:
>>>>>>>>>> Sorry, we're using Java 11, Junit 4 e Log4j 2!
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> On 2020/04/29 11:49:03, EDMONDO SENA <ed...@gmail.com> wrote:
>>>>>>>>>>> No It is not so!
>>>>>>>>>>> 
>>>>>>>>>>> PowerMock with java 11 and Log4j old version (1), everything
>>>>> was
>>>>>>>> working.
>>>>>>>>>>> Adding Log4j 2 We've that problem...
>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>>> On 2020/04/29 11:33:24, Benjamin Asbach <co...@impl.it>
>>>>>>>> wrote:
>>>>>>>>>>>> Hello Edmondo,
>>>>>>>>>>>> 
>>>>>>>>>>>> I don't think this is an log4j related issue.
>>>>>>>>>>>> 
>>>>>>>>>>>> You're using Powermock in combination with JUnit 5 which
>>>>> currently
>>>>>>>> is
>>>>>>>>>>>> not supported [1]. There's some kind of workaround [2] you
>>>>> might
>>>>>>>> try
>>>>>>>>>>>> that out.
>>>>>>>>>>>> 
>>>>>>>>>>>> Greetings
>>>>>>>>>>>> Benjamin
>>>>>>>>>>>> 
>>>>>>>>>>>> [1] https://github.com/powermock/powermock/issues/830
>>>>>>>>>>>> [2]
>>>>>>>>>>>> 
>>>>>>>> 
>>>>> https://github.com/powermock/powermock/issues/830#issuecomment-616243661
>>>>>>>>>>>> 
>>>>>>>>>>>> On 2020-04-29 11:42, EDMONDO SENA wrote:
>>>>>>>>>>>>> Hi Everybody,
>>>>>>>>>>>>> 
>>>>>>>>>>>>> I'm using log4j  2 with Junit 5 and java 11 with last
>>>>> version of
>>>>>>>>>>>>> PowerMock, but the following error is showed:
>>>>>>>>>>>>> 
>>>>>>>>>>>>> "Could not reconfigure jmx
>>>>>>>>>>>>> java.lang.LinkageError:  loader constraint violation :
>>>>> loader
>>>>>>>>>>>>> 
>>>>>>>> org.powermock.core.classloader.javassist.JavassistMockClassLoader,
>>>>>>>>>>>>> child of 'app'
>>>>> jdk.internal.loader.ClassLoader$AppClassLoader
>>>>>>>> wants to
>>>>>>>>>>>>> load interface javax.management.MBeanServer."
>>>>>>>>>>>>> 
>>>>>>>>>>>>> A different interface with the same name was previously
>>>>> loaded
>>>>>>>> by
>>>>>>>>>>>>> 'bootstrap'.
>>>>>>>>>>>>> 
>>>>>>>>>>>>> Can you help me in order to fix this error?
>>>>>>>>>>>>> Kind regards.
>>>>>>>>>>>>> 
>>>>>>>>>>>>> 
>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>>>>>> To unsubscribe, e-mail:
>>>>>>>> log4j-user-unsubscribe@logging.apache.org
>>>>>>>>>>>>> For additional commands, e-mail:
>>>>>>>> log4j-user-help@logging.apache.org
>>>>>>>>>>>> 
>>>>>>>>>>>> 
>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>>>>> To unsubscribe, e-mail:
>>>>> log4j-user-unsubscribe@logging.apache.org
>>>>>>>>>>>> For additional commands, e-mail:
>>>>>>>> log4j-user-help@logging.apache.org
>>>>>>>>>>>> 
>>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>> ---------------------------------------------------------------------
>>>>>>>>>>> To unsubscribe, e-mail:
>>>>> log4j-user-unsubscribe@logging.apache.org
>>>>>>>>>>> For additional commands, e-mail:
>>>>> log4j-user-help@logging.apache.org
>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> 
>>>>> ---------------------------------------------------------------------
>>>>>>>>>> To unsubscribe, e-mail:
>>>>> log4j-user-unsubscribe@logging.apache.org
>>>>>>>>>> For additional commands, e-mail:
>>>>> log4j-user-help@logging.apache.org
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>> ---------------------------------------------------------------------
>>>>>>>>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>>>>>>>>> For additional commands, e-mail:
>>>>> log4j-user-help@logging.apache.org
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>> 
>>>>>>>> ---------------------------------------------------------------------
>>>>>>>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>>>>>>>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>>>>>>>> 
>>>>>>>> --
>>>>>>> Matt Sicker <bo...@gmail.com>
>>>>>>> 
>>>>>> 
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>>>>>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>>>>>> 
>>>>>> 
>>>>> 
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>>>>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>>>>> 
>>>>> --
>>>> Matt Sicker <bo...@gmail.com>
>>>> 
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>>> 
>> 
>> 
>> -- 
>> Matt Sicker <bo...@gmail.com>
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>> 
>> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: Java.lang.LinkageError

Posted by EDMONDO SENA <ed...@gmail.com>.
Matt, last question:

Before for log4j 1 the JMX wasn't enabled for default?



On 2020/04/29 14:30:12, Matt Sicker <bo...@gmail.com> wrote: 
> Yes, I mean the system property. I don't know much about PowerMock,
> though I never mock loggers.
> 
> On Wed, 29 Apr 2020 at 08:52, EDMONDO SENA <ed...@gmail.com> wrote:
> >
> > Hi Matt,
> >
> > We've 100 files to change.
> > So, in order to speed solution is it disable JMX in log4j2?
> > You mean log4j2.disable.jmx=true?
> > You think that use @PowerMockIgnore("Javax.management.* ") is useless?
> >
> >
> >
> > On 2020/04/29 13:42:02, Matt Sicker <bo...@gmail.com> wrote:
> > > Sounds like you’ll need to configure PowerMock to ignore the log4j2 JMX
> > > classes. There’s also a system property in log4j2 to disable JMX which is
> > > worth a try.
> > >
> > > On Wed, Apr 29, 2020 at 08:34 EDMONDO SENA <ed...@gmail.com> wrote:
> > >
> > > > I repeat, we've done some tests and with java 11, Junit 4 and Log4j 1
> > > > everything has worked well.
> > > > The only difference is log4j -> log4j 2.13 and we've this problem.
> > > > Can you suggest us what's the workaround?
> > > >
> > > > Kind regards.
> > > >
> > > >
> > > > On 2020/04/29 13:32:17, EDMONDO SENA <ed...@gmail.com> wrote:
> > > > > Matt sorry,
> > > > >
> > > > > I need a solution!
> > > > >
> > > > > Before we were Java 8, and Log4j and everything has worked!
> > > > > Well, now we've java 11 and Log4j 2.
> > > > > How can we fix it?
> > > > > Have you any suggest?
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > On 2020/04/29 13:29:04, Matt Sicker <bo...@gmail.com> wrote:
> > > > > > The JMX module isn’t fully compatible with Java 11 as far as I can
> > > > tell. It
> > > > > > doesn’t even compile above 8.
> > > > > >
> > > > > > On Wed, Apr 29, 2020 at 07:17 EDMONDO SENA <ed...@gmail.com> wrote:
> > > > > >
> > > > > > > In API Document is reported this phrase:
> > > > > > >
> > > > > > > Enabling JMX
> > > > > > > JMX support is enabled by default. When Log4j initializes, the
> > > > > > > StatusLogger, ContextSelector, and all LoggerContexts, LoggerConfigs
> > > > and
> > > > > > > Appenders are instrumented with MBeans. To disable JMX completely,
> > > > and
> > > > > > > prevent these MBeans from being created, specify system property
> > > > > > > log4j2.disableJmx to true when you start the Java VM.
> > > > > > >
> > > > > > > Can you explain me if the problem can be fixed set
> > > > log4j2.disableJmx=true
> > > > > > > or using
> > > > > > > @PowerMockIgnore("Javax.management.* ")?
> > > > > > >
> > > > > > > Or something else?
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > On 2020/04/29 12:07:06, EDMONDO SENA <ed...@gmail.com> wrote:
> > > > > > > > Any question?
> > > > > > > >
> > > > > > > > I'm using Log4j 2.13.0.......
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > https://stackanswers.net/questions/powermock-after-log4j2-3-upgrade-could-not-reconfigure-jmx-java-lang-linkageerror
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > On 2020/04/29 11:55:32, EDMONDO SENA <ed...@gmail.com> wrote:
> > > > > > > > > Sorry, we're using Java 11, Junit 4 e Log4j 2!
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > On 2020/04/29 11:49:03, EDMONDO SENA <ed...@gmail.com> wrote:
> > > > > > > > > > No It is not so!
> > > > > > > > > >
> > > > > > > > > > PowerMock with java 11 and Log4j old version (1), everything
> > > > was
> > > > > > > working.
> > > > > > > > > > Adding Log4j 2 We've that problem...
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > On 2020/04/29 11:33:24, Benjamin Asbach <co...@impl.it>
> > > > > > > wrote:
> > > > > > > > > > > Hello Edmondo,
> > > > > > > > > > >
> > > > > > > > > > > I don't think this is an log4j related issue.
> > > > > > > > > > >
> > > > > > > > > > > You're using Powermock in combination with JUnit 5 which
> > > > currently
> > > > > > > is
> > > > > > > > > > > not supported [1]. There's some kind of workaround [2] you
> > > > might
> > > > > > > try
> > > > > > > > > > > that out.
> > > > > > > > > > >
> > > > > > > > > > > Greetings
> > > > > > > > > > > Benjamin
> > > > > > > > > > >
> > > > > > > > > > > [1] https://github.com/powermock/powermock/issues/830
> > > > > > > > > > > [2]
> > > > > > > > > > >
> > > > > > >
> > > > https://github.com/powermock/powermock/issues/830#issuecomment-616243661
> > > > > > > > > > >
> > > > > > > > > > > On 2020-04-29 11:42, EDMONDO SENA wrote:
> > > > > > > > > > > > Hi Everybody,
> > > > > > > > > > > >
> > > > > > > > > > > > I'm using log4j  2 with Junit 5 and java 11 with last
> > > > version of
> > > > > > > > > > > > PowerMock, but the following error is showed:
> > > > > > > > > > > >
> > > > > > > > > > > > "Could not reconfigure jmx
> > > > > > > > > > > > java.lang.LinkageError:  loader constraint violation :
> > > > loader
> > > > > > > > > > > >
> > > > > > > org.powermock.core.classloader.javassist.JavassistMockClassLoader,
> > > > > > > > > > > > child of 'app'
> > > > jdk.internal.loader.ClassLoader$AppClassLoader
> > > > > > > wants to
> > > > > > > > > > > > load interface javax.management.MBeanServer."
> > > > > > > > > > > >
> > > > > > > > > > > > A different interface with the same name was previously
> > > > loaded
> > > > > > > by
> > > > > > > > > > > > 'bootstrap'.
> > > > > > > > > > > >
> > > > > > > > > > > > Can you help me in order to fix this error?
> > > > > > > > > > > > Kind regards.
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > ---------------------------------------------------------------------
> > > > > > > > > > > > To unsubscribe, e-mail:
> > > > > > > log4j-user-unsubscribe@logging.apache.org
> > > > > > > > > > > > For additional commands, e-mail:
> > > > > > > log4j-user-help@logging.apache.org
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > ---------------------------------------------------------------------
> > > > > > > > > > > To unsubscribe, e-mail:
> > > > log4j-user-unsubscribe@logging.apache.org
> > > > > > > > > > > For additional commands, e-mail:
> > > > > > > log4j-user-help@logging.apache.org
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > ---------------------------------------------------------------------
> > > > > > > > > > To unsubscribe, e-mail:
> > > > log4j-user-unsubscribe@logging.apache.org
> > > > > > > > > > For additional commands, e-mail:
> > > > log4j-user-help@logging.apache.org
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > ---------------------------------------------------------------------
> > > > > > > > > To unsubscribe, e-mail:
> > > > log4j-user-unsubscribe@logging.apache.org
> > > > > > > > > For additional commands, e-mail:
> > > > log4j-user-help@logging.apache.org
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > ---------------------------------------------------------------------
> > > > > > > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > > > > > > > For additional commands, e-mail:
> > > > log4j-user-help@logging.apache.org
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > > ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > > > > > > For additional commands, e-mail: log4j-user-help@logging.apache.org
> > > > > > >
> > > > > > > --
> > > > > > Matt Sicker <bo...@gmail.com>
> > > > > >
> > > > >
> > > > > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > > > > For additional commands, e-mail: log4j-user-help@logging.apache.org
> > > > >
> > > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > > > For additional commands, e-mail: log4j-user-help@logging.apache.org
> > > >
> > > > --
> > > Matt Sicker <bo...@gmail.com>
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
> >
> 
> 
> -- 
> Matt Sicker <bo...@gmail.com>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: Java.lang.LinkageError

Posted by Matt Sicker <bo...@gmail.com>.
Yes, I mean the system property. I don't know much about PowerMock,
though I never mock loggers.

On Wed, 29 Apr 2020 at 08:52, EDMONDO SENA <ed...@gmail.com> wrote:
>
> Hi Matt,
>
> We've 100 files to change.
> So, in order to speed solution is it disable JMX in log4j2?
> You mean log4j2.disable.jmx=true?
> You think that use @PowerMockIgnore("Javax.management.* ") is useless?
>
>
>
> On 2020/04/29 13:42:02, Matt Sicker <bo...@gmail.com> wrote:
> > Sounds like you’ll need to configure PowerMock to ignore the log4j2 JMX
> > classes. There’s also a system property in log4j2 to disable JMX which is
> > worth a try.
> >
> > On Wed, Apr 29, 2020 at 08:34 EDMONDO SENA <ed...@gmail.com> wrote:
> >
> > > I repeat, we've done some tests and with java 11, Junit 4 and Log4j 1
> > > everything has worked well.
> > > The only difference is log4j -> log4j 2.13 and we've this problem.
> > > Can you suggest us what's the workaround?
> > >
> > > Kind regards.
> > >
> > >
> > > On 2020/04/29 13:32:17, EDMONDO SENA <ed...@gmail.com> wrote:
> > > > Matt sorry,
> > > >
> > > > I need a solution!
> > > >
> > > > Before we were Java 8, and Log4j and everything has worked!
> > > > Well, now we've java 11 and Log4j 2.
> > > > How can we fix it?
> > > > Have you any suggest?
> > > >
> > > >
> > > >
> > > >
> > > > On 2020/04/29 13:29:04, Matt Sicker <bo...@gmail.com> wrote:
> > > > > The JMX module isn’t fully compatible with Java 11 as far as I can
> > > tell. It
> > > > > doesn’t even compile above 8.
> > > > >
> > > > > On Wed, Apr 29, 2020 at 07:17 EDMONDO SENA <ed...@gmail.com> wrote:
> > > > >
> > > > > > In API Document is reported this phrase:
> > > > > >
> > > > > > Enabling JMX
> > > > > > JMX support is enabled by default. When Log4j initializes, the
> > > > > > StatusLogger, ContextSelector, and all LoggerContexts, LoggerConfigs
> > > and
> > > > > > Appenders are instrumented with MBeans. To disable JMX completely,
> > > and
> > > > > > prevent these MBeans from being created, specify system property
> > > > > > log4j2.disableJmx to true when you start the Java VM.
> > > > > >
> > > > > > Can you explain me if the problem can be fixed set
> > > log4j2.disableJmx=true
> > > > > > or using
> > > > > > @PowerMockIgnore("Javax.management.* ")?
> > > > > >
> > > > > > Or something else?
> > > > > >
> > > > > >
> > > > > >
> > > > > > On 2020/04/29 12:07:06, EDMONDO SENA <ed...@gmail.com> wrote:
> > > > > > > Any question?
> > > > > > >
> > > > > > > I'm using Log4j 2.13.0.......
> > > > > > >
> > > > > > >
> > > > > >
> > > https://stackanswers.net/questions/powermock-after-log4j2-3-upgrade-could-not-reconfigure-jmx-java-lang-linkageerror
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > On 2020/04/29 11:55:32, EDMONDO SENA <ed...@gmail.com> wrote:
> > > > > > > > Sorry, we're using Java 11, Junit 4 e Log4j 2!
> > > > > > > >
> > > > > > > >
> > > > > > > > On 2020/04/29 11:49:03, EDMONDO SENA <ed...@gmail.com> wrote:
> > > > > > > > > No It is not so!
> > > > > > > > >
> > > > > > > > > PowerMock with java 11 and Log4j old version (1), everything
> > > was
> > > > > > working.
> > > > > > > > > Adding Log4j 2 We've that problem...
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > On 2020/04/29 11:33:24, Benjamin Asbach <co...@impl.it>
> > > > > > wrote:
> > > > > > > > > > Hello Edmondo,
> > > > > > > > > >
> > > > > > > > > > I don't think this is an log4j related issue.
> > > > > > > > > >
> > > > > > > > > > You're using Powermock in combination with JUnit 5 which
> > > currently
> > > > > > is
> > > > > > > > > > not supported [1]. There's some kind of workaround [2] you
> > > might
> > > > > > try
> > > > > > > > > > that out.
> > > > > > > > > >
> > > > > > > > > > Greetings
> > > > > > > > > > Benjamin
> > > > > > > > > >
> > > > > > > > > > [1] https://github.com/powermock/powermock/issues/830
> > > > > > > > > > [2]
> > > > > > > > > >
> > > > > >
> > > https://github.com/powermock/powermock/issues/830#issuecomment-616243661
> > > > > > > > > >
> > > > > > > > > > On 2020-04-29 11:42, EDMONDO SENA wrote:
> > > > > > > > > > > Hi Everybody,
> > > > > > > > > > >
> > > > > > > > > > > I'm using log4j  2 with Junit 5 and java 11 with last
> > > version of
> > > > > > > > > > > PowerMock, but the following error is showed:
> > > > > > > > > > >
> > > > > > > > > > > "Could not reconfigure jmx
> > > > > > > > > > > java.lang.LinkageError:  loader constraint violation :
> > > loader
> > > > > > > > > > >
> > > > > > org.powermock.core.classloader.javassist.JavassistMockClassLoader,
> > > > > > > > > > > child of 'app'
> > > jdk.internal.loader.ClassLoader$AppClassLoader
> > > > > > wants to
> > > > > > > > > > > load interface javax.management.MBeanServer."
> > > > > > > > > > >
> > > > > > > > > > > A different interface with the same name was previously
> > > loaded
> > > > > > by
> > > > > > > > > > > 'bootstrap'.
> > > > > > > > > > >
> > > > > > > > > > > Can you help me in order to fix this error?
> > > > > > > > > > > Kind regards.
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > ---------------------------------------------------------------------
> > > > > > > > > > > To unsubscribe, e-mail:
> > > > > > log4j-user-unsubscribe@logging.apache.org
> > > > > > > > > > > For additional commands, e-mail:
> > > > > > log4j-user-help@logging.apache.org
> > > > > > > > > >
> > > > > > > > > >
> > > > > > ---------------------------------------------------------------------
> > > > > > > > > > To unsubscribe, e-mail:
> > > log4j-user-unsubscribe@logging.apache.org
> > > > > > > > > > For additional commands, e-mail:
> > > > > > log4j-user-help@logging.apache.org
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > ---------------------------------------------------------------------
> > > > > > > > > To unsubscribe, e-mail:
> > > log4j-user-unsubscribe@logging.apache.org
> > > > > > > > > For additional commands, e-mail:
> > > log4j-user-help@logging.apache.org
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > ---------------------------------------------------------------------
> > > > > > > > To unsubscribe, e-mail:
> > > log4j-user-unsubscribe@logging.apache.org
> > > > > > > > For additional commands, e-mail:
> > > log4j-user-help@logging.apache.org
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > > > > > > For additional commands, e-mail:
> > > log4j-user-help@logging.apache.org
> > > > > > >
> > > > > > >
> > > > > >
> > > > > > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > > > > > For additional commands, e-mail: log4j-user-help@logging.apache.org
> > > > > >
> > > > > > --
> > > > > Matt Sicker <bo...@gmail.com>
> > > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > > > For additional commands, e-mail: log4j-user-help@logging.apache.org
> > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > > For additional commands, e-mail: log4j-user-help@logging.apache.org
> > >
> > > --
> > Matt Sicker <bo...@gmail.com>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>


-- 
Matt Sicker <bo...@gmail.com>

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: Java.lang.LinkageError

Posted by EDMONDO SENA <ed...@gmail.com>.
Hi Matt,

We've 100 files to change.
So, in order to speed solution is it disable JMX in log4j2?
You mean log4j2.disable.jmx=true?
You think that use @PowerMockIgnore("Javax.management.* ") is useless?



On 2020/04/29 13:42:02, Matt Sicker <bo...@gmail.com> wrote: 
> Sounds like you’ll need to configure PowerMock to ignore the log4j2 JMX
> classes. There’s also a system property in log4j2 to disable JMX which is
> worth a try.
> 
> On Wed, Apr 29, 2020 at 08:34 EDMONDO SENA <ed...@gmail.com> wrote:
> 
> > I repeat, we've done some tests and with java 11, Junit 4 and Log4j 1
> > everything has worked well.
> > The only difference is log4j -> log4j 2.13 and we've this problem.
> > Can you suggest us what's the workaround?
> >
> > Kind regards.
> >
> >
> > On 2020/04/29 13:32:17, EDMONDO SENA <ed...@gmail.com> wrote:
> > > Matt sorry,
> > >
> > > I need a solution!
> > >
> > > Before we were Java 8, and Log4j and everything has worked!
> > > Well, now we've java 11 and Log4j 2.
> > > How can we fix it?
> > > Have you any suggest?
> > >
> > >
> > >
> > >
> > > On 2020/04/29 13:29:04, Matt Sicker <bo...@gmail.com> wrote:
> > > > The JMX module isn’t fully compatible with Java 11 as far as I can
> > tell. It
> > > > doesn’t even compile above 8.
> > > >
> > > > On Wed, Apr 29, 2020 at 07:17 EDMONDO SENA <ed...@gmail.com> wrote:
> > > >
> > > > > In API Document is reported this phrase:
> > > > >
> > > > > Enabling JMX
> > > > > JMX support is enabled by default. When Log4j initializes, the
> > > > > StatusLogger, ContextSelector, and all LoggerContexts, LoggerConfigs
> > and
> > > > > Appenders are instrumented with MBeans. To disable JMX completely,
> > and
> > > > > prevent these MBeans from being created, specify system property
> > > > > log4j2.disableJmx to true when you start the Java VM.
> > > > >
> > > > > Can you explain me if the problem can be fixed set
> > log4j2.disableJmx=true
> > > > > or using
> > > > > @PowerMockIgnore("Javax.management.* ")?
> > > > >
> > > > > Or something else?
> > > > >
> > > > >
> > > > >
> > > > > On 2020/04/29 12:07:06, EDMONDO SENA <ed...@gmail.com> wrote:
> > > > > > Any question?
> > > > > >
> > > > > > I'm using Log4j 2.13.0.......
> > > > > >
> > > > > >
> > > > >
> > https://stackanswers.net/questions/powermock-after-log4j2-3-upgrade-could-not-reconfigure-jmx-java-lang-linkageerror
> > > > > >
> > > > > >
> > > > > >
> > > > > > On 2020/04/29 11:55:32, EDMONDO SENA <ed...@gmail.com> wrote:
> > > > > > > Sorry, we're using Java 11, Junit 4 e Log4j 2!
> > > > > > >
> > > > > > >
> > > > > > > On 2020/04/29 11:49:03, EDMONDO SENA <ed...@gmail.com> wrote:
> > > > > > > > No It is not so!
> > > > > > > >
> > > > > > > > PowerMock with java 11 and Log4j old version (1), everything
> > was
> > > > > working.
> > > > > > > > Adding Log4j 2 We've that problem...
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > On 2020/04/29 11:33:24, Benjamin Asbach <co...@impl.it>
> > > > > wrote:
> > > > > > > > > Hello Edmondo,
> > > > > > > > >
> > > > > > > > > I don't think this is an log4j related issue.
> > > > > > > > >
> > > > > > > > > You're using Powermock in combination with JUnit 5 which
> > currently
> > > > > is
> > > > > > > > > not supported [1]. There's some kind of workaround [2] you
> > might
> > > > > try
> > > > > > > > > that out.
> > > > > > > > >
> > > > > > > > > Greetings
> > > > > > > > > Benjamin
> > > > > > > > >
> > > > > > > > > [1] https://github.com/powermock/powermock/issues/830
> > > > > > > > > [2]
> > > > > > > > >
> > > > >
> > https://github.com/powermock/powermock/issues/830#issuecomment-616243661
> > > > > > > > >
> > > > > > > > > On 2020-04-29 11:42, EDMONDO SENA wrote:
> > > > > > > > > > Hi Everybody,
> > > > > > > > > >
> > > > > > > > > > I'm using log4j  2 with Junit 5 and java 11 with last
> > version of
> > > > > > > > > > PowerMock, but the following error is showed:
> > > > > > > > > >
> > > > > > > > > > "Could not reconfigure jmx
> > > > > > > > > > java.lang.LinkageError:  loader constraint violation :
> > loader
> > > > > > > > > >
> > > > > org.powermock.core.classloader.javassist.JavassistMockClassLoader,
> > > > > > > > > > child of 'app'
> > jdk.internal.loader.ClassLoader$AppClassLoader
> > > > > wants to
> > > > > > > > > > load interface javax.management.MBeanServer."
> > > > > > > > > >
> > > > > > > > > > A different interface with the same name was previously
> > loaded
> > > > > by
> > > > > > > > > > 'bootstrap'.
> > > > > > > > > >
> > > > > > > > > > Can you help me in order to fix this error?
> > > > > > > > > > Kind regards.
> > > > > > > > > >
> > > > > > > > > >
> > > > > ---------------------------------------------------------------------
> > > > > > > > > > To unsubscribe, e-mail:
> > > > > log4j-user-unsubscribe@logging.apache.org
> > > > > > > > > > For additional commands, e-mail:
> > > > > log4j-user-help@logging.apache.org
> > > > > > > > >
> > > > > > > > >
> > > > > ---------------------------------------------------------------------
> > > > > > > > > To unsubscribe, e-mail:
> > log4j-user-unsubscribe@logging.apache.org
> > > > > > > > > For additional commands, e-mail:
> > > > > log4j-user-help@logging.apache.org
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > ---------------------------------------------------------------------
> > > > > > > > To unsubscribe, e-mail:
> > log4j-user-unsubscribe@logging.apache.org
> > > > > > > > For additional commands, e-mail:
> > log4j-user-help@logging.apache.org
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail:
> > log4j-user-unsubscribe@logging.apache.org
> > > > > > > For additional commands, e-mail:
> > log4j-user-help@logging.apache.org
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > > > > > For additional commands, e-mail:
> > log4j-user-help@logging.apache.org
> > > > > >
> > > > > >
> > > > >
> > > > > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > > > > For additional commands, e-mail: log4j-user-help@logging.apache.org
> > > > >
> > > > > --
> > > > Matt Sicker <bo...@gmail.com>
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > > For additional commands, e-mail: log4j-user-help@logging.apache.org
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
> >
> > --
> Matt Sicker <bo...@gmail.com>
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: Java.lang.LinkageError

Posted by Matt Sicker <bo...@gmail.com>.
Sounds like you’ll need to configure PowerMock to ignore the log4j2 JMX
classes. There’s also a system property in log4j2 to disable JMX which is
worth a try.

On Wed, Apr 29, 2020 at 08:34 EDMONDO SENA <ed...@gmail.com> wrote:

> I repeat, we've done some tests and with java 11, Junit 4 and Log4j 1
> everything has worked well.
> The only difference is log4j -> log4j 2.13 and we've this problem.
> Can you suggest us what's the workaround?
>
> Kind regards.
>
>
> On 2020/04/29 13:32:17, EDMONDO SENA <ed...@gmail.com> wrote:
> > Matt sorry,
> >
> > I need a solution!
> >
> > Before we were Java 8, and Log4j and everything has worked!
> > Well, now we've java 11 and Log4j 2.
> > How can we fix it?
> > Have you any suggest?
> >
> >
> >
> >
> > On 2020/04/29 13:29:04, Matt Sicker <bo...@gmail.com> wrote:
> > > The JMX module isn’t fully compatible with Java 11 as far as I can
> tell. It
> > > doesn’t even compile above 8.
> > >
> > > On Wed, Apr 29, 2020 at 07:17 EDMONDO SENA <ed...@gmail.com> wrote:
> > >
> > > > In API Document is reported this phrase:
> > > >
> > > > Enabling JMX
> > > > JMX support is enabled by default. When Log4j initializes, the
> > > > StatusLogger, ContextSelector, and all LoggerContexts, LoggerConfigs
> and
> > > > Appenders are instrumented with MBeans. To disable JMX completely,
> and
> > > > prevent these MBeans from being created, specify system property
> > > > log4j2.disableJmx to true when you start the Java VM.
> > > >
> > > > Can you explain me if the problem can be fixed set
> log4j2.disableJmx=true
> > > > or using
> > > > @PowerMockIgnore("Javax.management.* ")?
> > > >
> > > > Or something else?
> > > >
> > > >
> > > >
> > > > On 2020/04/29 12:07:06, EDMONDO SENA <ed...@gmail.com> wrote:
> > > > > Any question?
> > > > >
> > > > > I'm using Log4j 2.13.0.......
> > > > >
> > > > >
> > > >
> https://stackanswers.net/questions/powermock-after-log4j2-3-upgrade-could-not-reconfigure-jmx-java-lang-linkageerror
> > > > >
> > > > >
> > > > >
> > > > > On 2020/04/29 11:55:32, EDMONDO SENA <ed...@gmail.com> wrote:
> > > > > > Sorry, we're using Java 11, Junit 4 e Log4j 2!
> > > > > >
> > > > > >
> > > > > > On 2020/04/29 11:49:03, EDMONDO SENA <ed...@gmail.com> wrote:
> > > > > > > No It is not so!
> > > > > > >
> > > > > > > PowerMock with java 11 and Log4j old version (1), everything
> was
> > > > working.
> > > > > > > Adding Log4j 2 We've that problem...
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > On 2020/04/29 11:33:24, Benjamin Asbach <co...@impl.it>
> > > > wrote:
> > > > > > > > Hello Edmondo,
> > > > > > > >
> > > > > > > > I don't think this is an log4j related issue.
> > > > > > > >
> > > > > > > > You're using Powermock in combination with JUnit 5 which
> currently
> > > > is
> > > > > > > > not supported [1]. There's some kind of workaround [2] you
> might
> > > > try
> > > > > > > > that out.
> > > > > > > >
> > > > > > > > Greetings
> > > > > > > > Benjamin
> > > > > > > >
> > > > > > > > [1] https://github.com/powermock/powermock/issues/830
> > > > > > > > [2]
> > > > > > > >
> > > >
> https://github.com/powermock/powermock/issues/830#issuecomment-616243661
> > > > > > > >
> > > > > > > > On 2020-04-29 11:42, EDMONDO SENA wrote:
> > > > > > > > > Hi Everybody,
> > > > > > > > >
> > > > > > > > > I'm using log4j  2 with Junit 5 and java 11 with last
> version of
> > > > > > > > > PowerMock, but the following error is showed:
> > > > > > > > >
> > > > > > > > > "Could not reconfigure jmx
> > > > > > > > > java.lang.LinkageError:  loader constraint violation :
> loader
> > > > > > > > >
> > > > org.powermock.core.classloader.javassist.JavassistMockClassLoader,
> > > > > > > > > child of 'app'
> jdk.internal.loader.ClassLoader$AppClassLoader
> > > > wants to
> > > > > > > > > load interface javax.management.MBeanServer."
> > > > > > > > >
> > > > > > > > > A different interface with the same name was previously
> loaded
> > > > by
> > > > > > > > > 'bootstrap'.
> > > > > > > > >
> > > > > > > > > Can you help me in order to fix this error?
> > > > > > > > > Kind regards.
> > > > > > > > >
> > > > > > > > >
> > > > ---------------------------------------------------------------------
> > > > > > > > > To unsubscribe, e-mail:
> > > > log4j-user-unsubscribe@logging.apache.org
> > > > > > > > > For additional commands, e-mail:
> > > > log4j-user-help@logging.apache.org
> > > > > > > >
> > > > > > > >
> > > > ---------------------------------------------------------------------
> > > > > > > > To unsubscribe, e-mail:
> log4j-user-unsubscribe@logging.apache.org
> > > > > > > > For additional commands, e-mail:
> > > > log4j-user-help@logging.apache.org
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail:
> log4j-user-unsubscribe@logging.apache.org
> > > > > > > For additional commands, e-mail:
> log4j-user-help@logging.apache.org
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail:
> log4j-user-unsubscribe@logging.apache.org
> > > > > > For additional commands, e-mail:
> log4j-user-help@logging.apache.org
> > > > > >
> > > > > >
> > > > >
> > > > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > > > > For additional commands, e-mail:
> log4j-user-help@logging.apache.org
> > > > >
> > > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > > > For additional commands, e-mail: log4j-user-help@logging.apache.org
> > > >
> > > > --
> > > Matt Sicker <bo...@gmail.com>
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
> --
Matt Sicker <bo...@gmail.com>

Re: Java.lang.LinkageError

Posted by EDMONDO SENA <ed...@gmail.com>.
I repeat, we've done some tests and with java 11, Junit 4 and Log4j 1 everything has worked well.
The only difference is log4j -> log4j 2.13 and we've this problem.
Can you suggest us what's the workaround?

Kind regards.


On 2020/04/29 13:32:17, EDMONDO SENA <ed...@gmail.com> wrote: 
> Matt sorry,
> 
> I need a solution!
> 
> Before we were Java 8, and Log4j and everything has worked!
> Well, now we've java 11 and Log4j 2.
> How can we fix it?
> Have you any suggest?
> 
> 
> 
> 
> On 2020/04/29 13:29:04, Matt Sicker <bo...@gmail.com> wrote: 
> > The JMX module isn’t fully compatible with Java 11 as far as I can tell. It
> > doesn’t even compile above 8.
> > 
> > On Wed, Apr 29, 2020 at 07:17 EDMONDO SENA <ed...@gmail.com> wrote:
> > 
> > > In API Document is reported this phrase:
> > >
> > > Enabling JMX
> > > JMX support is enabled by default. When Log4j initializes, the
> > > StatusLogger, ContextSelector, and all LoggerContexts, LoggerConfigs and
> > > Appenders are instrumented with MBeans. To disable JMX completely, and
> > > prevent these MBeans from being created, specify system property
> > > log4j2.disableJmx to true when you start the Java VM.
> > >
> > > Can you explain me if the problem can be fixed set  log4j2.disableJmx=true
> > > or using
> > > @PowerMockIgnore("Javax.management.* ")?
> > >
> > > Or something else?
> > >
> > >
> > >
> > > On 2020/04/29 12:07:06, EDMONDO SENA <ed...@gmail.com> wrote:
> > > > Any question?
> > > >
> > > > I'm using Log4j 2.13.0.......
> > > >
> > > >
> > > https://stackanswers.net/questions/powermock-after-log4j2-3-upgrade-could-not-reconfigure-jmx-java-lang-linkageerror
> > > >
> > > >
> > > >
> > > > On 2020/04/29 11:55:32, EDMONDO SENA <ed...@gmail.com> wrote:
> > > > > Sorry, we're using Java 11, Junit 4 e Log4j 2!
> > > > >
> > > > >
> > > > > On 2020/04/29 11:49:03, EDMONDO SENA <ed...@gmail.com> wrote:
> > > > > > No It is not so!
> > > > > >
> > > > > > PowerMock with java 11 and Log4j old version (1), everything was
> > > working.
> > > > > > Adding Log4j 2 We've that problem...
> > > > > >
> > > > > >
> > > > > >
> > > > > > On 2020/04/29 11:33:24, Benjamin Asbach <co...@impl.it>
> > > wrote:
> > > > > > > Hello Edmondo,
> > > > > > >
> > > > > > > I don't think this is an log4j related issue.
> > > > > > >
> > > > > > > You're using Powermock in combination with JUnit 5 which currently
> > > is
> > > > > > > not supported [1]. There's some kind of workaround [2] you might
> > > try
> > > > > > > that out.
> > > > > > >
> > > > > > > Greetings
> > > > > > > Benjamin
> > > > > > >
> > > > > > > [1] https://github.com/powermock/powermock/issues/830
> > > > > > > [2]
> > > > > > >
> > > https://github.com/powermock/powermock/issues/830#issuecomment-616243661
> > > > > > >
> > > > > > > On 2020-04-29 11:42, EDMONDO SENA wrote:
> > > > > > > > Hi Everybody,
> > > > > > > >
> > > > > > > > I'm using log4j  2 with Junit 5 and java 11 with last version of
> > > > > > > > PowerMock, but the following error is showed:
> > > > > > > >
> > > > > > > > "Could not reconfigure jmx
> > > > > > > > java.lang.LinkageError:  loader constraint violation : loader
> > > > > > > >
> > > org.powermock.core.classloader.javassist.JavassistMockClassLoader,
> > > > > > > > child of 'app' jdk.internal.loader.ClassLoader$AppClassLoader
> > > wants to
> > > > > > > > load interface javax.management.MBeanServer."
> > > > > > > >
> > > > > > > > A different interface with the same name was previously loaded
> > > by
> > > > > > > > 'bootstrap'.
> > > > > > > >
> > > > > > > > Can you help me in order to fix this error?
> > > > > > > > Kind regards.
> > > > > > > >
> > > > > > > >
> > > ---------------------------------------------------------------------
> > > > > > > > To unsubscribe, e-mail:
> > > log4j-user-unsubscribe@logging.apache.org
> > > > > > > > For additional commands, e-mail:
> > > log4j-user-help@logging.apache.org
> > > > > > >
> > > > > > >
> > > ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > > > > > > For additional commands, e-mail:
> > > log4j-user-help@logging.apache.org
> > > > > > >
> > > > > > >
> > > > > >
> > > > > > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > > > > > For additional commands, e-mail: log4j-user-help@logging.apache.org
> > > > > >
> > > > > >
> > > > >
> > > > > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > > > > For additional commands, e-mail: log4j-user-help@logging.apache.org
> > > > >
> > > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > > > For additional commands, e-mail: log4j-user-help@logging.apache.org
> > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > > For additional commands, e-mail: log4j-user-help@logging.apache.org
> > >
> > > --
> > Matt Sicker <bo...@gmail.com>
> > 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: Java.lang.LinkageError

Posted by EDMONDO SENA <ed...@gmail.com>.
Matt sorry,

I need a solution!

Before we were Java 8, and Log4j and everything has worked!
Well, now we've java 11 and Log4j 2.
How can we fix it?
Have you any suggest?




On 2020/04/29 13:29:04, Matt Sicker <bo...@gmail.com> wrote: 
> The JMX module isn’t fully compatible with Java 11 as far as I can tell. It
> doesn’t even compile above 8.
> 
> On Wed, Apr 29, 2020 at 07:17 EDMONDO SENA <ed...@gmail.com> wrote:
> 
> > In API Document is reported this phrase:
> >
> > Enabling JMX
> > JMX support is enabled by default. When Log4j initializes, the
> > StatusLogger, ContextSelector, and all LoggerContexts, LoggerConfigs and
> > Appenders are instrumented with MBeans. To disable JMX completely, and
> > prevent these MBeans from being created, specify system property
> > log4j2.disableJmx to true when you start the Java VM.
> >
> > Can you explain me if the problem can be fixed set  log4j2.disableJmx=true
> > or using
> > @PowerMockIgnore("Javax.management.* ")?
> >
> > Or something else?
> >
> >
> >
> > On 2020/04/29 12:07:06, EDMONDO SENA <ed...@gmail.com> wrote:
> > > Any question?
> > >
> > > I'm using Log4j 2.13.0.......
> > >
> > >
> > https://stackanswers.net/questions/powermock-after-log4j2-3-upgrade-could-not-reconfigure-jmx-java-lang-linkageerror
> > >
> > >
> > >
> > > On 2020/04/29 11:55:32, EDMONDO SENA <ed...@gmail.com> wrote:
> > > > Sorry, we're using Java 11, Junit 4 e Log4j 2!
> > > >
> > > >
> > > > On 2020/04/29 11:49:03, EDMONDO SENA <ed...@gmail.com> wrote:
> > > > > No It is not so!
> > > > >
> > > > > PowerMock with java 11 and Log4j old version (1), everything was
> > working.
> > > > > Adding Log4j 2 We've that problem...
> > > > >
> > > > >
> > > > >
> > > > > On 2020/04/29 11:33:24, Benjamin Asbach <co...@impl.it>
> > wrote:
> > > > > > Hello Edmondo,
> > > > > >
> > > > > > I don't think this is an log4j related issue.
> > > > > >
> > > > > > You're using Powermock in combination with JUnit 5 which currently
> > is
> > > > > > not supported [1]. There's some kind of workaround [2] you might
> > try
> > > > > > that out.
> > > > > >
> > > > > > Greetings
> > > > > > Benjamin
> > > > > >
> > > > > > [1] https://github.com/powermock/powermock/issues/830
> > > > > > [2]
> > > > > >
> > https://github.com/powermock/powermock/issues/830#issuecomment-616243661
> > > > > >
> > > > > > On 2020-04-29 11:42, EDMONDO SENA wrote:
> > > > > > > Hi Everybody,
> > > > > > >
> > > > > > > I'm using log4j  2 with Junit 5 and java 11 with last version of
> > > > > > > PowerMock, but the following error is showed:
> > > > > > >
> > > > > > > "Could not reconfigure jmx
> > > > > > > java.lang.LinkageError:  loader constraint violation : loader
> > > > > > >
> > org.powermock.core.classloader.javassist.JavassistMockClassLoader,
> > > > > > > child of 'app' jdk.internal.loader.ClassLoader$AppClassLoader
> > wants to
> > > > > > > load interface javax.management.MBeanServer."
> > > > > > >
> > > > > > > A different interface with the same name was previously loaded
> > by
> > > > > > > 'bootstrap'.
> > > > > > >
> > > > > > > Can you help me in order to fix this error?
> > > > > > > Kind regards.
> > > > > > >
> > > > > > >
> > ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail:
> > log4j-user-unsubscribe@logging.apache.org
> > > > > > > For additional commands, e-mail:
> > log4j-user-help@logging.apache.org
> > > > > >
> > > > > >
> > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > > > > > For additional commands, e-mail:
> > log4j-user-help@logging.apache.org
> > > > > >
> > > > > >
> > > > >
> > > > > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > > > > For additional commands, e-mail: log4j-user-help@logging.apache.org
> > > > >
> > > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > > > For additional commands, e-mail: log4j-user-help@logging.apache.org
> > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > > For additional commands, e-mail: log4j-user-help@logging.apache.org
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
> >
> > --
> Matt Sicker <bo...@gmail.com>
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: Java.lang.LinkageError

Posted by Matt Sicker <bo...@gmail.com>.
The JMX module isn’t fully compatible with Java 11 as far as I can tell. It
doesn’t even compile above 8.

On Wed, Apr 29, 2020 at 07:17 EDMONDO SENA <ed...@gmail.com> wrote:

> In API Document is reported this phrase:
>
> Enabling JMX
> JMX support is enabled by default. When Log4j initializes, the
> StatusLogger, ContextSelector, and all LoggerContexts, LoggerConfigs and
> Appenders are instrumented with MBeans. To disable JMX completely, and
> prevent these MBeans from being created, specify system property
> log4j2.disableJmx to true when you start the Java VM.
>
> Can you explain me if the problem can be fixed set  log4j2.disableJmx=true
> or using
> @PowerMockIgnore("Javax.management.* ")?
>
> Or something else?
>
>
>
> On 2020/04/29 12:07:06, EDMONDO SENA <ed...@gmail.com> wrote:
> > Any question?
> >
> > I'm using Log4j 2.13.0.......
> >
> >
> https://stackanswers.net/questions/powermock-after-log4j2-3-upgrade-could-not-reconfigure-jmx-java-lang-linkageerror
> >
> >
> >
> > On 2020/04/29 11:55:32, EDMONDO SENA <ed...@gmail.com> wrote:
> > > Sorry, we're using Java 11, Junit 4 e Log4j 2!
> > >
> > >
> > > On 2020/04/29 11:49:03, EDMONDO SENA <ed...@gmail.com> wrote:
> > > > No It is not so!
> > > >
> > > > PowerMock with java 11 and Log4j old version (1), everything was
> working.
> > > > Adding Log4j 2 We've that problem...
> > > >
> > > >
> > > >
> > > > On 2020/04/29 11:33:24, Benjamin Asbach <co...@impl.it>
> wrote:
> > > > > Hello Edmondo,
> > > > >
> > > > > I don't think this is an log4j related issue.
> > > > >
> > > > > You're using Powermock in combination with JUnit 5 which currently
> is
> > > > > not supported [1]. There's some kind of workaround [2] you might
> try
> > > > > that out.
> > > > >
> > > > > Greetings
> > > > > Benjamin
> > > > >
> > > > > [1] https://github.com/powermock/powermock/issues/830
> > > > > [2]
> > > > >
> https://github.com/powermock/powermock/issues/830#issuecomment-616243661
> > > > >
> > > > > On 2020-04-29 11:42, EDMONDO SENA wrote:
> > > > > > Hi Everybody,
> > > > > >
> > > > > > I'm using log4j  2 with Junit 5 and java 11 with last version of
> > > > > > PowerMock, but the following error is showed:
> > > > > >
> > > > > > "Could not reconfigure jmx
> > > > > > java.lang.LinkageError:  loader constraint violation : loader
> > > > > >
> org.powermock.core.classloader.javassist.JavassistMockClassLoader,
> > > > > > child of 'app' jdk.internal.loader.ClassLoader$AppClassLoader
> wants to
> > > > > > load interface javax.management.MBeanServer."
> > > > > >
> > > > > > A different interface with the same name was previously loaded
> by
> > > > > > 'bootstrap'.
> > > > > >
> > > > > > Can you help me in order to fix this error?
> > > > > > Kind regards.
> > > > > >
> > > > > >
> ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail:
> log4j-user-unsubscribe@logging.apache.org
> > > > > > For additional commands, e-mail:
> log4j-user-help@logging.apache.org
> > > > >
> > > > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > > > > For additional commands, e-mail:
> log4j-user-help@logging.apache.org
> > > > >
> > > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > > > For additional commands, e-mail: log4j-user-help@logging.apache.org
> > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > > For additional commands, e-mail: log4j-user-help@logging.apache.org
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
> --
Matt Sicker <bo...@gmail.com>

Re: Java.lang.LinkageError

Posted by EDMONDO SENA <ed...@gmail.com>.
In API Document is reported this phrase:

Enabling JMX
JMX support is enabled by default. When Log4j initializes, the StatusLogger, ContextSelector, and all LoggerContexts, LoggerConfigs and Appenders are instrumented with MBeans. To disable JMX completely, and prevent these MBeans from being created, specify system property log4j2.disableJmx to true when you start the Java VM.

Can you explain me if the problem can be fixed set  log4j2.disableJmx=true or using 
@PowerMockIgnore("Javax.management.* ")?

Or something else?



On 2020/04/29 12:07:06, EDMONDO SENA <ed...@gmail.com> wrote: 
> Any question?
> 
> I'm using Log4j 2.13.0.......
> 
> https://stackanswers.net/questions/powermock-after-log4j2-3-upgrade-could-not-reconfigure-jmx-java-lang-linkageerror
> 
> 
> 
> On 2020/04/29 11:55:32, EDMONDO SENA <ed...@gmail.com> wrote: 
> > Sorry, we're using Java 11, Junit 4 e Log4j 2!
> > 
> > 
> > On 2020/04/29 11:49:03, EDMONDO SENA <ed...@gmail.com> wrote: 
> > > No It is not so!
> > > 
> > > PowerMock with java 11 and Log4j old version (1), everything was working.
> > > Adding Log4j 2 We've that problem...
> > > 
> > > 
> > > 
> > > On 2020/04/29 11:33:24, Benjamin Asbach <co...@impl.it> wrote: 
> > > > Hello Edmondo,
> > > > 
> > > > I don't think this is an log4j related issue.
> > > > 
> > > > You're using Powermock in combination with JUnit 5 which currently is 
> > > > not supported [1]. There's some kind of workaround [2] you might try 
> > > > that out.
> > > > 
> > > > Greetings
> > > > Benjamin
> > > > 
> > > > [1] https://github.com/powermock/powermock/issues/830
> > > > [2] 
> > > > https://github.com/powermock/powermock/issues/830#issuecomment-616243661
> > > > 
> > > > On 2020-04-29 11:42, EDMONDO SENA wrote:
> > > > > Hi Everybody,
> > > > > 
> > > > > I'm using log4j  2 with Junit 5 and java 11 with last version of
> > > > > PowerMock, but the following error is showed:
> > > > > 
> > > > > "Could not reconfigure jmx
> > > > > java.lang.LinkageError:  loader constraint violation : loader
> > > > > org.powermock.core.classloader.javassist.JavassistMockClassLoader,
> > > > > child of 'app' jdk.internal.loader.ClassLoader$AppClassLoader wants to
> > > > > load interface javax.management.MBeanServer."
> > > > > 
> > > > > A different interface with the same name was previously loaded by 
> > > > > 'bootstrap'.
> > > > > 
> > > > > Can you help me in order to fix this error?
> > > > > Kind regards.
> > > > > 
> > > > > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > > > > For additional commands, e-mail: log4j-user-help@logging.apache.org
> > > > 
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > > > For additional commands, e-mail: log4j-user-help@logging.apache.org
> > > > 
> > > > 
> > > 
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > > For additional commands, e-mail: log4j-user-help@logging.apache.org
> > > 
> > > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
> > 
> > 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: Java.lang.LinkageError

Posted by EDMONDO SENA <ed...@gmail.com>.
Any question?

I'm using Log4j 2.13.0.......

https://stackanswers.net/questions/powermock-after-log4j2-3-upgrade-could-not-reconfigure-jmx-java-lang-linkageerror



On 2020/04/29 11:55:32, EDMONDO SENA <ed...@gmail.com> wrote: 
> Sorry, we're using Java 11, Junit 4 e Log4j 2!
> 
> 
> On 2020/04/29 11:49:03, EDMONDO SENA <ed...@gmail.com> wrote: 
> > No It is not so!
> > 
> > PowerMock with java 11 and Log4j old version (1), everything was working.
> > Adding Log4j 2 We've that problem...
> > 
> > 
> > 
> > On 2020/04/29 11:33:24, Benjamin Asbach <co...@impl.it> wrote: 
> > > Hello Edmondo,
> > > 
> > > I don't think this is an log4j related issue.
> > > 
> > > You're using Powermock in combination with JUnit 5 which currently is 
> > > not supported [1]. There's some kind of workaround [2] you might try 
> > > that out.
> > > 
> > > Greetings
> > > Benjamin
> > > 
> > > [1] https://github.com/powermock/powermock/issues/830
> > > [2] 
> > > https://github.com/powermock/powermock/issues/830#issuecomment-616243661
> > > 
> > > On 2020-04-29 11:42, EDMONDO SENA wrote:
> > > > Hi Everybody,
> > > > 
> > > > I'm using log4j  2 with Junit 5 and java 11 with last version of
> > > > PowerMock, but the following error is showed:
> > > > 
> > > > "Could not reconfigure jmx
> > > > java.lang.LinkageError:  loader constraint violation : loader
> > > > org.powermock.core.classloader.javassist.JavassistMockClassLoader,
> > > > child of 'app' jdk.internal.loader.ClassLoader$AppClassLoader wants to
> > > > load interface javax.management.MBeanServer."
> > > > 
> > > > A different interface with the same name was previously loaded by 
> > > > 'bootstrap'.
> > > > 
> > > > Can you help me in order to fix this error?
> > > > Kind regards.
> > > > 
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > > > For additional commands, e-mail: log4j-user-help@logging.apache.org
> > > 
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > > For additional commands, e-mail: log4j-user-help@logging.apache.org
> > > 
> > > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
> > 
> > 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: Java.lang.LinkageError

Posted by EDMONDO SENA <ed...@gmail.com>.
Sorry, we're using Java 11, Junit 4 e Log4j 2!


On 2020/04/29 11:49:03, EDMONDO SENA <ed...@gmail.com> wrote: 
> No It is not so!
> 
> PowerMock with java 11 and Log4j old version (1), everything was working.
> Adding Log4j 2 We've that problem...
> 
> 
> 
> On 2020/04/29 11:33:24, Benjamin Asbach <co...@impl.it> wrote: 
> > Hello Edmondo,
> > 
> > I don't think this is an log4j related issue.
> > 
> > You're using Powermock in combination with JUnit 5 which currently is 
> > not supported [1]. There's some kind of workaround [2] you might try 
> > that out.
> > 
> > Greetings
> > Benjamin
> > 
> > [1] https://github.com/powermock/powermock/issues/830
> > [2] 
> > https://github.com/powermock/powermock/issues/830#issuecomment-616243661
> > 
> > On 2020-04-29 11:42, EDMONDO SENA wrote:
> > > Hi Everybody,
> > > 
> > > I'm using log4j  2 with Junit 5 and java 11 with last version of
> > > PowerMock, but the following error is showed:
> > > 
> > > "Could not reconfigure jmx
> > > java.lang.LinkageError:  loader constraint violation : loader
> > > org.powermock.core.classloader.javassist.JavassistMockClassLoader,
> > > child of 'app' jdk.internal.loader.ClassLoader$AppClassLoader wants to
> > > load interface javax.management.MBeanServer."
> > > 
> > > A different interface with the same name was previously loaded by 
> > > 'bootstrap'.
> > > 
> > > Can you help me in order to fix this error?
> > > Kind regards.
> > > 
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > > For additional commands, e-mail: log4j-user-help@logging.apache.org
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
> > 
> > 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: Java.lang.LinkageError

Posted by EDMONDO SENA <ed...@gmail.com>.
No It is not so!

PowerMock with java 11 and Log4j old version (1), everything was working.
Adding Log4j 2 We've that problem...



On 2020/04/29 11:33:24, Benjamin Asbach <co...@impl.it> wrote: 
> Hello Edmondo,
> 
> I don't think this is an log4j related issue.
> 
> You're using Powermock in combination with JUnit 5 which currently is 
> not supported [1]. There's some kind of workaround [2] you might try 
> that out.
> 
> Greetings
> Benjamin
> 
> [1] https://github.com/powermock/powermock/issues/830
> [2] 
> https://github.com/powermock/powermock/issues/830#issuecomment-616243661
> 
> On 2020-04-29 11:42, EDMONDO SENA wrote:
> > Hi Everybody,
> > 
> > I'm using log4j  2 with Junit 5 and java 11 with last version of
> > PowerMock, but the following error is showed:
> > 
> > "Could not reconfigure jmx
> > java.lang.LinkageError:  loader constraint violation : loader
> > org.powermock.core.classloader.javassist.JavassistMockClassLoader,
> > child of 'app' jdk.internal.loader.ClassLoader$AppClassLoader wants to
> > load interface javax.management.MBeanServer."
> > 
> > A different interface with the same name was previously loaded by 
> > 'bootstrap'.
> > 
> > Can you help me in order to fix this error?
> > Kind regards.
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: Java.lang.LinkageError

Posted by Benjamin Asbach <co...@impl.it>.
Hello Edmondo,

I don't think this is an log4j related issue.

You're using Powermock in combination with JUnit 5 which currently is 
not supported [1]. There's some kind of workaround [2] you might try 
that out.

Greetings
Benjamin

[1] https://github.com/powermock/powermock/issues/830
[2] 
https://github.com/powermock/powermock/issues/830#issuecomment-616243661

On 2020-04-29 11:42, EDMONDO SENA wrote:
> Hi Everybody,
> 
> I'm using log4j  2 with Junit 5 and java 11 with last version of
> PowerMock, but the following error is showed:
> 
> "Could not reconfigure jmx
> java.lang.LinkageError:  loader constraint violation : loader
> org.powermock.core.classloader.javassist.JavassistMockClassLoader,
> child of 'app' jdk.internal.loader.ClassLoader$AppClassLoader wants to
> load interface javax.management.MBeanServer."
> 
> A different interface with the same name was previously loaded by 
> 'bootstrap'.
> 
> Can you help me in order to fix this error?
> Kind regards.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org