You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@logging.apache.org by Ralph Goers <ra...@dslextreme.com> on 2022/01/31 05:49:58 UTC

Build fails in Master

I just pulled master and am unable to build it.

[INFO] Running org.apache.log4j.config.PropertiesConfigurationTest
2022-01-30 22:39:47,046 main ERROR Unable to create Layout org.apache.log4j.EnhancedPatternLayout due to ClassNotFoundException:org.apache.log4j.EnhancedPatternLayout

[ERROR] Tests run: 13, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.473 s <<< FAILURE! - in org.apache.log4j.config.XmlConfigurationTest
[ERROR] org.apache.log4j.config.XmlConfigurationTest.testConsoleEnhancedPatternLayout  Time elapsed: 0.01 s  <<< FAILURE!
org.junit.ComparisonFailure: expected:<%[d{ISO8601} [%t][%c] %-5p %properties %ndc: %]m%n> but was:<%[]m%n>
	at org.apache.log4j.config.XmlConfigurationTest.testConsoleEnhancedPatternLayout(XmlConfigurationTest.java:115)

Ralph


Re: Build fails in Master

Posted by Matt Sicker <bo...@gmail.com>.
This:
https://github.com/apache/logging-log4j2/blob/5016b9522d58aedffd18def7d8300eec4637e330/log4j-plugins/src/main/java/org/apache/logging/log4j/plugins/PluginAliases.java#L36
https://github.com/apache/logging-log4j2/blob/5016b9522d58aedffd18def7d8300eec4637e330/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/PluginAliases.java#L35

They should both work the same way as there's a generic strategy for
extracting the alias list.

On Mon, Jan 31, 2022 at 1:39 PM Ralph Goers <ra...@dslextreme.com> wrote:
>
> I’m not sure what all that means Matt.
>
> After I changed the import for core.config.plugins to just plugins the build ran fine. So PluginAliases are working, provided they use the annotation from the plugins module.
>
> They just don’t work when using the annotation from core, which should work to support backwards compatibility.
>
> Ralph
>
> > On Jan 31, 2022, at 12:25 PM, Matt Sicker <bo...@gmail.com> wrote:
> >
> > Aliases aren't yet supported in the new DI system (well, the
> > new-new-DI system; the BeanManager version did have support for
> > aliases). There's an alias lookup strategy thing defined on the
> > plugins.PluginAliases annotation that might be missing on the core
> > version.
> >
> > On Mon, Jan 31, 2022 at 12:49 PM Ralph Goers <ra...@dslextreme.com> wrote:
> >>
> >> And nevermind again. The PluginAliases moved to the plugins module. I changed that and those tests are now fine.
> >>
> >> However, that does point out a problem that any log4j 2 plugin with pluginAliases is not going to work in log4j 3.0. We need to fix that.
> >>
> >> Ralph
> >>
> >>> On Jan 31, 2022, at 11:44 AM, Ralph Goers <ra...@dslextreme.com> wrote:
> >>>
> >>> I see. In release-2.x PatternLayout is annotated with @PluginAliases, one of which is EnhancedPatternLayout. Master also has that annotation but it is marked deprecated.
> >>>
> >>> Matt, did you break that annotation?
> >>>
> >>> Ralph
> >>>
> >>>> On Jan 31, 2022, at 11:35 AM, Ralph Goers <ra...@dslextreme.com> wrote:
> >>>>
> >>>> Gary,
> >>>>
> >>>> I would really like to know how you tested https://github.com/apache/logging-log4j2/pull/708. It references EnhancedPatternLayout which is not present in the PR.
> >>>>
> >>>> Ralph
> >>>>
> >>>>> On Jan 31, 2022, at 5:01 AM, Gary Gregory <ga...@gmail.com> wrote:
> >>>>>
> >>>>> Hi All,
> >>>>>
> >>>>> The branch master started to fail to build for me probably a week ago, but
> >>>>> it was not faliing for anyone else. I suspect my slow mac mini might have
> >>>>> been a factor in my failure as Matt's analysis points the finger at a
> >>>>> timing issue in plugin/loading concurrent code combined with the fact that
> >>>>> some of our tests run in parallel. Matt has been trying to fix this for a
> >>>>> while and now the build fails differently but not just on my machine, it
> >>>>> now also fails in GitHub.
> >>>>> :-(
> >>>>> Gary
> >>>>>
> >>>>> On Mon, Jan 31, 2022 at 12:50 AM Ralph Goers <ra...@dslextreme.com>
> >>>>> wrote:
> >>>>>
> >>>>>> I just pulled master and am unable to build it.
> >>>>>>
> >>>>>> [INFO] Running org.apache.log4j.config.PropertiesConfigurationTest
> >>>>>> 2022-01-30 22:39:47,046 main ERROR Unable to create Layout
> >>>>>> org.apache.log4j.EnhancedPatternLayout due to
> >>>>>> ClassNotFoundException:org.apache.log4j.EnhancedPatternLayout
> >>>>>>
> >>>>>> [ERROR] Tests run: 13, Failures: 1, Errors: 0, Skipped: 0, Time elapsed:
> >>>>>> 0.473 s <<< FAILURE! - in org.apache.log4j.config.XmlConfigurationTest
> >>>>>> [ERROR]
> >>>>>> org.apache.log4j.config.XmlConfigurationTest.testConsoleEnhancedPatternLayout
> >>>>>> Time elapsed: 0.01 s  <<< FAILURE!
> >>>>>> org.junit.ComparisonFailure: expected:<%[d{ISO8601} [%t][%c] %-5p
> >>>>>> %properties %ndc: %]m%n> but was:<%[]m%n>
> >>>>>>     at
> >>>>>> org.apache.log4j.config.XmlConfigurationTest.testConsoleEnhancedPatternLayout(XmlConfigurationTest.java:115)
> >>>>>>
> >>>>>> Ralph
> >>>>>>
> >>>>>>
> >>>>
> >>>
> >>
>

Re: Build fails in Master

Posted by Ralph Goers <ra...@dslextreme.com>.
I’m not sure what all that means Matt. 

After I changed the import for core.config.plugins to just plugins the build ran fine. So PluginAliases are working, provided they use the annotation from the plugins module.

They just don’t work when using the annotation from core, which should work to support backwards compatibility.

Ralph

> On Jan 31, 2022, at 12:25 PM, Matt Sicker <bo...@gmail.com> wrote:
> 
> Aliases aren't yet supported in the new DI system (well, the
> new-new-DI system; the BeanManager version did have support for
> aliases). There's an alias lookup strategy thing defined on the
> plugins.PluginAliases annotation that might be missing on the core
> version.
> 
> On Mon, Jan 31, 2022 at 12:49 PM Ralph Goers <ra...@dslextreme.com> wrote:
>> 
>> And nevermind again. The PluginAliases moved to the plugins module. I changed that and those tests are now fine.
>> 
>> However, that does point out a problem that any log4j 2 plugin with pluginAliases is not going to work in log4j 3.0. We need to fix that.
>> 
>> Ralph
>> 
>>> On Jan 31, 2022, at 11:44 AM, Ralph Goers <ra...@dslextreme.com> wrote:
>>> 
>>> I see. In release-2.x PatternLayout is annotated with @PluginAliases, one of which is EnhancedPatternLayout. Master also has that annotation but it is marked deprecated.
>>> 
>>> Matt, did you break that annotation?
>>> 
>>> Ralph
>>> 
>>>> On Jan 31, 2022, at 11:35 AM, Ralph Goers <ra...@dslextreme.com> wrote:
>>>> 
>>>> Gary,
>>>> 
>>>> I would really like to know how you tested https://github.com/apache/logging-log4j2/pull/708. It references EnhancedPatternLayout which is not present in the PR.
>>>> 
>>>> Ralph
>>>> 
>>>>> On Jan 31, 2022, at 5:01 AM, Gary Gregory <ga...@gmail.com> wrote:
>>>>> 
>>>>> Hi All,
>>>>> 
>>>>> The branch master started to fail to build for me probably a week ago, but
>>>>> it was not faliing for anyone else. I suspect my slow mac mini might have
>>>>> been a factor in my failure as Matt's analysis points the finger at a
>>>>> timing issue in plugin/loading concurrent code combined with the fact that
>>>>> some of our tests run in parallel. Matt has been trying to fix this for a
>>>>> while and now the build fails differently but not just on my machine, it
>>>>> now also fails in GitHub.
>>>>> :-(
>>>>> Gary
>>>>> 
>>>>> On Mon, Jan 31, 2022 at 12:50 AM Ralph Goers <ra...@dslextreme.com>
>>>>> wrote:
>>>>> 
>>>>>> I just pulled master and am unable to build it.
>>>>>> 
>>>>>> [INFO] Running org.apache.log4j.config.PropertiesConfigurationTest
>>>>>> 2022-01-30 22:39:47,046 main ERROR Unable to create Layout
>>>>>> org.apache.log4j.EnhancedPatternLayout due to
>>>>>> ClassNotFoundException:org.apache.log4j.EnhancedPatternLayout
>>>>>> 
>>>>>> [ERROR] Tests run: 13, Failures: 1, Errors: 0, Skipped: 0, Time elapsed:
>>>>>> 0.473 s <<< FAILURE! - in org.apache.log4j.config.XmlConfigurationTest
>>>>>> [ERROR]
>>>>>> org.apache.log4j.config.XmlConfigurationTest.testConsoleEnhancedPatternLayout
>>>>>> Time elapsed: 0.01 s  <<< FAILURE!
>>>>>> org.junit.ComparisonFailure: expected:<%[d{ISO8601} [%t][%c] %-5p
>>>>>> %properties %ndc: %]m%n> but was:<%[]m%n>
>>>>>>     at
>>>>>> org.apache.log4j.config.XmlConfigurationTest.testConsoleEnhancedPatternLayout(XmlConfigurationTest.java:115)
>>>>>> 
>>>>>> Ralph
>>>>>> 
>>>>>> 
>>>> 
>>> 
>> 


Re: Build fails in Master

Posted by Matt Sicker <bo...@gmail.com>.
Aliases aren't yet supported in the new DI system (well, the
new-new-DI system; the BeanManager version did have support for
aliases). There's an alias lookup strategy thing defined on the
plugins.PluginAliases annotation that might be missing on the core
version.

On Mon, Jan 31, 2022 at 12:49 PM Ralph Goers <ra...@dslextreme.com> wrote:
>
> And nevermind again. The PluginAliases moved to the plugins module. I changed that and those tests are now fine.
>
> However, that does point out a problem that any log4j 2 plugin with pluginAliases is not going to work in log4j 3.0. We need to fix that.
>
> Ralph
>
> > On Jan 31, 2022, at 11:44 AM, Ralph Goers <ra...@dslextreme.com> wrote:
> >
> > I see. In release-2.x PatternLayout is annotated with @PluginAliases, one of which is EnhancedPatternLayout. Master also has that annotation but it is marked deprecated.
> >
> > Matt, did you break that annotation?
> >
> > Ralph
> >
> >> On Jan 31, 2022, at 11:35 AM, Ralph Goers <ra...@dslextreme.com> wrote:
> >>
> >> Gary,
> >>
> >> I would really like to know how you tested https://github.com/apache/logging-log4j2/pull/708. It references EnhancedPatternLayout which is not present in the PR.
> >>
> >> Ralph
> >>
> >>> On Jan 31, 2022, at 5:01 AM, Gary Gregory <ga...@gmail.com> wrote:
> >>>
> >>> Hi All,
> >>>
> >>> The branch master started to fail to build for me probably a week ago, but
> >>> it was not faliing for anyone else. I suspect my slow mac mini might have
> >>> been a factor in my failure as Matt's analysis points the finger at a
> >>> timing issue in plugin/loading concurrent code combined with the fact that
> >>> some of our tests run in parallel. Matt has been trying to fix this for a
> >>> while and now the build fails differently but not just on my machine, it
> >>> now also fails in GitHub.
> >>> :-(
> >>> Gary
> >>>
> >>> On Mon, Jan 31, 2022 at 12:50 AM Ralph Goers <ra...@dslextreme.com>
> >>> wrote:
> >>>
> >>>> I just pulled master and am unable to build it.
> >>>>
> >>>> [INFO] Running org.apache.log4j.config.PropertiesConfigurationTest
> >>>> 2022-01-30 22:39:47,046 main ERROR Unable to create Layout
> >>>> org.apache.log4j.EnhancedPatternLayout due to
> >>>> ClassNotFoundException:org.apache.log4j.EnhancedPatternLayout
> >>>>
> >>>> [ERROR] Tests run: 13, Failures: 1, Errors: 0, Skipped: 0, Time elapsed:
> >>>> 0.473 s <<< FAILURE! - in org.apache.log4j.config.XmlConfigurationTest
> >>>> [ERROR]
> >>>> org.apache.log4j.config.XmlConfigurationTest.testConsoleEnhancedPatternLayout
> >>>> Time elapsed: 0.01 s  <<< FAILURE!
> >>>> org.junit.ComparisonFailure: expected:<%[d{ISO8601} [%t][%c] %-5p
> >>>> %properties %ndc: %]m%n> but was:<%[]m%n>
> >>>>      at
> >>>> org.apache.log4j.config.XmlConfigurationTest.testConsoleEnhancedPatternLayout(XmlConfigurationTest.java:115)
> >>>>
> >>>> Ralph
> >>>>
> >>>>
> >>
> >
>

Re: Build fails in Master

Posted by Ralph Goers <ra...@dslextreme.com>.
And nevermind again. The PluginAliases moved to the plugins module. I changed that and those tests are now fine.

However, that does point out a problem that any log4j 2 plugin with pluginAliases is not going to work in log4j 3.0. We need to fix that.

Ralph

> On Jan 31, 2022, at 11:44 AM, Ralph Goers <ra...@dslextreme.com> wrote:
> 
> I see. In release-2.x PatternLayout is annotated with @PluginAliases, one of which is EnhancedPatternLayout. Master also has that annotation but it is marked deprecated.
> 
> Matt, did you break that annotation?
> 
> Ralph
> 
>> On Jan 31, 2022, at 11:35 AM, Ralph Goers <ra...@dslextreme.com> wrote:
>> 
>> Gary,
>> 
>> I would really like to know how you tested https://github.com/apache/logging-log4j2/pull/708. It references EnhancedPatternLayout which is not present in the PR.
>> 
>> Ralph
>> 
>>> On Jan 31, 2022, at 5:01 AM, Gary Gregory <ga...@gmail.com> wrote:
>>> 
>>> Hi All,
>>> 
>>> The branch master started to fail to build for me probably a week ago, but
>>> it was not faliing for anyone else. I suspect my slow mac mini might have
>>> been a factor in my failure as Matt's analysis points the finger at a
>>> timing issue in plugin/loading concurrent code combined with the fact that
>>> some of our tests run in parallel. Matt has been trying to fix this for a
>>> while and now the build fails differently but not just on my machine, it
>>> now also fails in GitHub.
>>> :-(
>>> Gary
>>> 
>>> On Mon, Jan 31, 2022 at 12:50 AM Ralph Goers <ra...@dslextreme.com>
>>> wrote:
>>> 
>>>> I just pulled master and am unable to build it.
>>>> 
>>>> [INFO] Running org.apache.log4j.config.PropertiesConfigurationTest
>>>> 2022-01-30 22:39:47,046 main ERROR Unable to create Layout
>>>> org.apache.log4j.EnhancedPatternLayout due to
>>>> ClassNotFoundException:org.apache.log4j.EnhancedPatternLayout
>>>> 
>>>> [ERROR] Tests run: 13, Failures: 1, Errors: 0, Skipped: 0, Time elapsed:
>>>> 0.473 s <<< FAILURE! - in org.apache.log4j.config.XmlConfigurationTest
>>>> [ERROR]
>>>> org.apache.log4j.config.XmlConfigurationTest.testConsoleEnhancedPatternLayout
>>>> Time elapsed: 0.01 s  <<< FAILURE!
>>>> org.junit.ComparisonFailure: expected:<%[d{ISO8601} [%t][%c] %-5p
>>>> %properties %ndc: %]m%n> but was:<%[]m%n>
>>>>      at
>>>> org.apache.log4j.config.XmlConfigurationTest.testConsoleEnhancedPatternLayout(XmlConfigurationTest.java:115)
>>>> 
>>>> Ralph
>>>> 
>>>> 
>> 
> 


Re: Build fails in Master

Posted by Ralph Goers <ra...@dslextreme.com>.
I see. In release-2.x PatternLayout is annotated with @PluginAliases, one of which is EnhancedPatternLayout. Master also has that annotation but it is marked deprecated.

Matt, did you break that annotation?

Ralph

> On Jan 31, 2022, at 11:35 AM, Ralph Goers <ra...@dslextreme.com> wrote:
> 
> Gary,
> 
> I would really like to know how you tested https://github.com/apache/logging-log4j2/pull/708. It references EnhancedPatternLayout which is not present in the PR.
> 
> Ralph
> 
>> On Jan 31, 2022, at 5:01 AM, Gary Gregory <ga...@gmail.com> wrote:
>> 
>> Hi All,
>> 
>> The branch master started to fail to build for me probably a week ago, but
>> it was not faliing for anyone else. I suspect my slow mac mini might have
>> been a factor in my failure as Matt's analysis points the finger at a
>> timing issue in plugin/loading concurrent code combined with the fact that
>> some of our tests run in parallel. Matt has been trying to fix this for a
>> while and now the build fails differently but not just on my machine, it
>> now also fails in GitHub.
>> :-(
>> Gary
>> 
>> On Mon, Jan 31, 2022 at 12:50 AM Ralph Goers <ra...@dslextreme.com>
>> wrote:
>> 
>>> I just pulled master and am unable to build it.
>>> 
>>> [INFO] Running org.apache.log4j.config.PropertiesConfigurationTest
>>> 2022-01-30 22:39:47,046 main ERROR Unable to create Layout
>>> org.apache.log4j.EnhancedPatternLayout due to
>>> ClassNotFoundException:org.apache.log4j.EnhancedPatternLayout
>>> 
>>> [ERROR] Tests run: 13, Failures: 1, Errors: 0, Skipped: 0, Time elapsed:
>>> 0.473 s <<< FAILURE! - in org.apache.log4j.config.XmlConfigurationTest
>>> [ERROR]
>>> org.apache.log4j.config.XmlConfigurationTest.testConsoleEnhancedPatternLayout
>>> Time elapsed: 0.01 s  <<< FAILURE!
>>> org.junit.ComparisonFailure: expected:<%[d{ISO8601} [%t][%c] %-5p
>>> %properties %ndc: %]m%n> but was:<%[]m%n>
>>>       at
>>> org.apache.log4j.config.XmlConfigurationTest.testConsoleEnhancedPatternLayout(XmlConfigurationTest.java:115)
>>> 
>>> Ralph
>>> 
>>> 
> 


Re: Build fails in Master

Posted by Ralph Goers <ra...@dslextreme.com>.
Gary,

I would really like to know how you tested https://github.com/apache/logging-log4j2/pull/708. It references EnhancedPatternLayout which is not present in the PR.

Ralph

> On Jan 31, 2022, at 5:01 AM, Gary Gregory <ga...@gmail.com> wrote:
> 
> Hi All,
> 
> The branch master started to fail to build for me probably a week ago, but
> it was not faliing for anyone else. I suspect my slow mac mini might have
> been a factor in my failure as Matt's analysis points the finger at a
> timing issue in plugin/loading concurrent code combined with the fact that
> some of our tests run in parallel. Matt has been trying to fix this for a
> while and now the build fails differently but not just on my machine, it
> now also fails in GitHub.
> :-(
> Gary
> 
> On Mon, Jan 31, 2022 at 12:50 AM Ralph Goers <ra...@dslextreme.com>
> wrote:
> 
>> I just pulled master and am unable to build it.
>> 
>> [INFO] Running org.apache.log4j.config.PropertiesConfigurationTest
>> 2022-01-30 22:39:47,046 main ERROR Unable to create Layout
>> org.apache.log4j.EnhancedPatternLayout due to
>> ClassNotFoundException:org.apache.log4j.EnhancedPatternLayout
>> 
>> [ERROR] Tests run: 13, Failures: 1, Errors: 0, Skipped: 0, Time elapsed:
>> 0.473 s <<< FAILURE! - in org.apache.log4j.config.XmlConfigurationTest
>> [ERROR]
>> org.apache.log4j.config.XmlConfigurationTest.testConsoleEnhancedPatternLayout
>> Time elapsed: 0.01 s  <<< FAILURE!
>> org.junit.ComparisonFailure: expected:<%[d{ISO8601} [%t][%c] %-5p
>> %properties %ndc: %]m%n> but was:<%[]m%n>
>>        at
>> org.apache.log4j.config.XmlConfigurationTest.testConsoleEnhancedPatternLayout(XmlConfigurationTest.java:115)
>> 
>> Ralph
>> 
>> 


Re: Build fails in Master

Posted by Matt Sicker <bo...@gmail.com>.
That test failure is likely genuine.

On Mon, Jan 31, 2022 at 6:02 AM Gary Gregory <ga...@gmail.com> wrote:
>
> Hi All,
>
> The branch master started to fail to build for me probably a week ago, but
> it was not faliing for anyone else. I suspect my slow mac mini might have
> been a factor in my failure as Matt's analysis points the finger at a
> timing issue in plugin/loading concurrent code combined with the fact that
> some of our tests run in parallel. Matt has been trying to fix this for a
> while and now the build fails differently but not just on my machine, it
> now also fails in GitHub.
> :-(
> Gary
>
> On Mon, Jan 31, 2022 at 12:50 AM Ralph Goers <ra...@dslextreme.com>
> wrote:
>
> > I just pulled master and am unable to build it.
> >
> > [INFO] Running org.apache.log4j.config.PropertiesConfigurationTest
> > 2022-01-30 22:39:47,046 main ERROR Unable to create Layout
> > org.apache.log4j.EnhancedPatternLayout due to
> > ClassNotFoundException:org.apache.log4j.EnhancedPatternLayout
> >
> > [ERROR] Tests run: 13, Failures: 1, Errors: 0, Skipped: 0, Time elapsed:
> > 0.473 s <<< FAILURE! - in org.apache.log4j.config.XmlConfigurationTest
> > [ERROR]
> > org.apache.log4j.config.XmlConfigurationTest.testConsoleEnhancedPatternLayout
> > Time elapsed: 0.01 s  <<< FAILURE!
> > org.junit.ComparisonFailure: expected:<%[d{ISO8601} [%t][%c] %-5p
> > %properties %ndc: %]m%n> but was:<%[]m%n>
> >         at
> > org.apache.log4j.config.XmlConfigurationTest.testConsoleEnhancedPatternLayout(XmlConfigurationTest.java:115)
> >
> > Ralph
> >
> >

Re: Build fails in Master

Posted by Gary Gregory <ga...@gmail.com>.
Hi All,

The branch master started to fail to build for me probably a week ago, but
it was not faliing for anyone else. I suspect my slow mac mini might have
been a factor in my failure as Matt's analysis points the finger at a
timing issue in plugin/loading concurrent code combined with the fact that
some of our tests run in parallel. Matt has been trying to fix this for a
while and now the build fails differently but not just on my machine, it
now also fails in GitHub.
:-(
Gary

On Mon, Jan 31, 2022 at 12:50 AM Ralph Goers <ra...@dslextreme.com>
wrote:

> I just pulled master and am unable to build it.
>
> [INFO] Running org.apache.log4j.config.PropertiesConfigurationTest
> 2022-01-30 22:39:47,046 main ERROR Unable to create Layout
> org.apache.log4j.EnhancedPatternLayout due to
> ClassNotFoundException:org.apache.log4j.EnhancedPatternLayout
>
> [ERROR] Tests run: 13, Failures: 1, Errors: 0, Skipped: 0, Time elapsed:
> 0.473 s <<< FAILURE! - in org.apache.log4j.config.XmlConfigurationTest
> [ERROR]
> org.apache.log4j.config.XmlConfigurationTest.testConsoleEnhancedPatternLayout
> Time elapsed: 0.01 s  <<< FAILURE!
> org.junit.ComparisonFailure: expected:<%[d{ISO8601} [%t][%c] %-5p
> %properties %ndc: %]m%n> but was:<%[]m%n>
>         at
> org.apache.log4j.config.XmlConfigurationTest.testConsoleEnhancedPatternLayout(XmlConfigurationTest.java:115)
>
> Ralph
>
>