[ 
https://issues.apache.org/jira/browse/LOG4J2-3531?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17552047#comment-17552047
 ] 

Simo Nikula commented on LOG4J2-3531:
-------------------------------------

Latest snapshot was this and it failed in similar way

log4j-core-2.17.3-20220608.190523-75.jar        Wed Jun 08 19:06:18 UTC 2022    
1860299 
{noformat}
$ jar -tvf log4j-core.jar | grep XmlConfiguration.class
 17425 Wed Jun 08 19:06:06 EEST 2022 
org/apache/logging/log4j/core/config/xml/XmlConfiguration.class

[6/9/22 11:35:24:281 EEST] 000000a9 SystemErr     R  
javax.xml.parsers.ParserConfigurationException: Feature 
'http://apache.org/xml/features/xinclude' is not recognized.
[6/9/22 11:35:24:282 EEST] 000000a9 SystemErr     R     at 
org.apache.xerces.jaxp.DocumentBuilderFactoryImpl.newDocumentBuilder(Unknown 
Source)
[6/9/22 11:35:24:282 EEST] 000000a9 SystemErr     R     at 
org.apache.logging.log4j.core.config.xml.XmlConfiguration.newDocumentBuilder(XmlConfiguration.java:193)
{noformat}


> log4j2.xml cannot be parsed on WebSphere
> ----------------------------------------
>
>                 Key: LOG4J2-3531
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-3531
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Configurators
>    Affects Versions: 2.17.2
>            Reporter: Simo Nikula
>            Assignee: Piotr Karwasz
>            Priority: Minor
>
> Basically similar as LOG4J2-1127
> {noformat}
> ERROR StatusLogger Error parsing ..log4j2.xml
> javax.xml.parsers.ParserConfigurationException: Feature 
> 'http://apache.org/xml/features/xinclude' is not recognized.
>    at 
> org.apache.xerces.jaxp.DocumentBuilderFactoryImpl.newDocumentBuilder(Unknown 
> Source)
>    at 
> org.apache.logging.log4j.core.config.xml.XmlConfiguration.newDocumentBuilder(XmlConfiguration.java:193)
>    at 
> org.apache.logging.log4j.core.config.xml.XmlConfiguration.<init>(XmlConfiguration.java:91)
>    at 
> org.apache.logging.log4j.core.config.xml.XmlConfigurationFactory.getConfiguration(XmlConfigurationFactory.java:46)
>    at 
> org.apache.logging.log4j.core.config.ConfigurationFactory$Factory.getConfiguration(ConfigurationFactory.java:559)
>    at 
> org.apache.logging.log4j.core.config.ConfigurationFactory$Factory.getConfiguration(ConfigurationFactory.java:483)
>    at 
> org.apache.logging.log4j.core.config.ConfigurationFactory.getConfiguration(ConfigurationFactory.java:325)
>    at 
> org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:690)
>    at 
> org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:711)
>    at 
> org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:253)
>    at 
> org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:155)
>    at 
> org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:47)
>    at org.apache.logging.log4j.LogManager.getContext(LogManager.java:196)
>    at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:599)
>    ...
> ERROR StatusLogger No logging configuration   
> {noformat}
> Current retry does not cover this scenario.
> {code:java}
>            final DocumentBuilder documentBuilder = newDocumentBuilder(true);
>             Document document;
>             try {
>                 document = documentBuilder.parse(source);
>             } catch (final Exception e) {
>                 // LOG4J2-1127
>                 final Throwable throwable = Throwables.getRootCause(e);
>                 if (throwable instanceof UnsupportedOperationException) {
>                     LOGGER.warn(
>                             "The DocumentBuilder {} does not support an 
> operation: {}."
>                             + "Trying again without XInclude...",
>                             documentBuilder, e);
>                     document = newDocumentBuilder(false).parse(source);
>                 } else {
>                     throw e;
>                 }
>             }
> {code}



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to