You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "justinas-dabravolskas (via GitHub)" <gi...@apache.org> on 2026/01/26 16:56:17 UTC
[I] Properties config with partial “appenders” list fails in >= 2.25.0 with ConfigurationException: No type attribute provided for component appender [logging-log4j2]
justinas-dabravolskas opened a new issue, #4036:
URL: https://github.com/apache/logging-log4j2/issues/4036
## Description
Upgrading to Log4j 2.25.0 introduces a regression in properties-based configuration when the top-level appenders property lists only a subset of the defined appenders. At startup, Log4j throws:
ConfigurationException: No type attribute provided for component appender
This appears to be caused by the new processing of “remaining” root-level properties in PropertiesConfigurationBuilder.build(), which now folds leftover dotted prefixes (like appender.) into synthetic components and then requires a type on the container key appender. In prior releases, extra appender. groups not listed in appenders did not cause a failure.
It was introduced by [commit](https://github.com/apache/logging-log4j2/commit/c299479b03aa0eeb2baca64e39b017d649b0e09b#diff-a398802ec75cb65f7576c05a7235bb60947c2fa51d1ca57f70bc667f45597724)
## Expected behavior
- Properties configs that specify **appenders = …** should not fail if additional **appender.<id>.*** groups exist but are not listed.
1. Only the listed (or referenced) **appenders** should be instantiated; unlisted groups should not trigger a root-level component parse or an exception.
## Configuration
**Version:** >= 2.25.0
```
# Root logger configuration
status = warn
name = PropertiesConfig
appenders = console
# Console appender
appender.console.type = Console
appender.console.name = Console
appender.console.target = SYSTEM_OUT
appender.console.layout.type = PatternLayout
appender.console.layout.pattern = %d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n
appender.console2.type = Console
appender.console2.name = Console
appender.console2.target = SYSTEM_OUT
appender.console2.layout.type = PatternLayout
appender.console2.layout.pattern = %d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n
```
## Logs
```
Caused by: org.apache.logging.log4j.core.config.ConfigurationException: No type attribute provided for component appender
at org.apache.logging.log4j.core.config.properties.PropertiesConfigurationBuilder.createComponent(PropertiesConfigurationBuilder.java:362)
at org.apache.logging.log4j.core.config.properties.PropertiesConfigurationBuilder.processRemainingProperties(PropertiesConfigurationBuilder.java:206)
at org.apache.logging.log4j.core.config.properties.PropertiesConfigurationBuilder.build(PropertiesConfigurationBuilder.java:190)
Caused by: org.apache.logging.log4j.core.config.ConfigurationException: No type attribute provided for component appender
at org.apache.logging.log4j.core.config.properties.PropertiesConfigurationFactory.getConfiguration(PropertiesConfigurationFactory.java:56)
at org.apache.logging.log4j.core.config.properties.PropertiesConfigurationFactory.getConfiguration(PropertiesConfigurationFactory.java:34)
at org.apache.logging.log4j.core.config.ConfigurationFactory$Factory.getConfiguration(ConfigurationFactory.java:544)
at org.apache.logging.log4j.core.config.ConfigurationFactory$Factory.getConfiguration(ConfigurationFactory.java:463)
at org.apache.logging.log4j.core.config.ConfigurationFactory.getConfiguration(ConfigurationFactory.java:321)
at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:778)
at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:808)
at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:311)
at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:160)
at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:48)
at org.apache.logging.log4j.LogManager.getContext(LogManager.java:139)
at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:557)
at com.l4jmre.App.<clinit>(App.java:11)
```
## Reproduction
An example configuration throws the above exception.
## Workarounds
- Remove the appenders line entirely (let names be inferred), or
- List all defined appenders: appenders = console, console2
Both avoid the synthetic root-level “component appender” and the resulting exception.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Properties config with partial “appenders” list fails in >= 2.25.0 with ConfigurationException: No type attribute provided for component appender [logging-log4j2]
Posted by "vy (via GitHub)" <gi...@apache.org>.
vy closed issue #4036: Properties config with partial “appenders” list fails in >= 2.25.0 with ConfigurationException: No type attribute provided for component appender
URL: https://github.com/apache/logging-log4j2/issues/4036
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Properties config with partial “appenders” list fails in >= 2.25.0 with ConfigurationException: No type attribute provided for component appender [logging-log4j2]
Posted by "Milanka00 (via GitHub)" <gi...@apache.org>.
Milanka00 commented on issue #4036:
URL: https://github.com/apache/logging-log4j2/issues/4036#issuecomment-3852502567
Hi all,
I am experiencing the same issue while upgrading Apache Log4j from 2.24.3 to 2.25.3 in response to the reported vulnerability [1].
While debugging, it appears that this behavior was introduced by the newly added method `processRemainingProperties` [2].
Would it be possible to address this and release a fix? Since this was a minor version upgrade, it would ideally not introduce breaking or incompatible changes to existing log4j2.properties configurations.
Thank you for looking into this.
[1] [CVE-2025-68161](https://nvd.nist.gov/vuln/detail/CVE-2025-68161)
[2] [processRemainingProperties](https://github.com/apache/logging-log4j2/blame/4f474b32751f4ccad67424ca585612584440cd63/log4j-core/src/main/java/org/apache/logging/log4j/core/config/properties/PropertiesConfigurationBuilder.java#L197)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Properties config with partial “appenders” list fails in >= 2.25.0 with ConfigurationException: No type attribute provided for component appender [logging-log4j2]
Posted by "vy (via GitHub)" <gi...@apache.org>.
vy commented on issue #4036:
URL: https://github.com/apache/logging-log4j2/issues/4036#issuecomment-4068663686
@justinas-dabravolskas, @Milanka00, @srinireddy2020, thanks for the report. Would you be interested in submitting a fix (incl. tests) for this one?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Properties config with partial “appenders” list fails in >= 2.25.0 with ConfigurationException: No type attribute provided for component appender [logging-log4j2]
Posted by "MichaelMorrisEst (via GitHub)" <gi...@apache.org>.
MichaelMorrisEst commented on issue #4036:
URL: https://github.com/apache/logging-log4j2/issues/4036#issuecomment-4068825480
> [@MichaelMorrisEst](https://github.com/MichaelMorrisEst), do you have some cycles to process this one?
Yes, I will look into it
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Properties config with partial “appenders” list fails in >= 2.25.0 with ConfigurationException: No type attribute provided for component appender [logging-log4j2]
Posted by "vy (via GitHub)" <gi...@apache.org>.
vy commented on issue #4036:
URL: https://github.com/apache/logging-log4j2/issues/4036#issuecomment-4068646489
@MichaelMorrisEst, do you have some cycles to process this one?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Properties config with partial “appenders” list fails in >= 2.25.0 with ConfigurationException: No type attribute provided for component appender [logging-log4j2]
Posted by "srinireddy2020 (via GitHub)" <gi...@apache.org>.
srinireddy2020 commented on issue #4036:
URL: https://github.com/apache/logging-log4j2/issues/4036#issuecomment-4033324276
Recently, we upgraded Log4j2 from version 2.24.1 to 2.25.3, but it fails to support backward compatibility. Hitting ConfigurationException
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Properties config with partial “appenders” list fails in >= 2.25.0 with ConfigurationException: No type attribute provided for component appender [logging-log4j2]
Posted by "justinas-dabravolskas (via GitHub)" <gi...@apache.org>.
justinas-dabravolskas commented on issue #4036:
URL: https://github.com/apache/logging-log4j2/issues/4036#issuecomment-3977124501
Hi @vy!
Just checking in on this. Since you handled the initial implementation of **processRemainingProperties**, I’d love to get your thoughts on whether this is an expected side effect or something that can/will be fixed?
Regards,
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org