[jira] [Commented] (LOG4J2-2283) ParserConfigurationException when using Log4j with oracle.xml.jaxp.JXDocumentBuilderFactory

2018-06-26 Thread Ralph Goers (JIRA)


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

Ralph Goers commented on LOG4J2-2283:
-

Gary, I've seen this kind of thing before. Once the XML parser decides to throw 
an exception it is done. It flags itself as having had an error and refuses to 
do any more. Since this in an Oracle package it is highly unlikely the source 
is available so it is difficult for us to know what the exact problem is. In 
fact, all the Javadoc I can find online for this class says it doesn't even 
have a setFeature method, yet it is showing up in the stack trace so it 
obviously does. More than likely it just doesn't like the feature being set.

To really handle this error we would have to throw the exception all the way 
back to the init method where a new DocumentBuilder would have to be 
constructed that does not attempt to set this feature.

Given that XML processing is clearly borked here a workaround would be to 
convert log4j2.xml to JSON or java properties.

> ParserConfigurationException when using Log4j with 
> oracle.xml.jaxp.JXDocumentBuilderFactory
> ---
>
> Key: LOG4J2-2283
> URL: https://issues.apache.org/jira/browse/LOG4J2-2283
> Project: Log4j 2
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 2.10.0
>Reporter: Vishnu Priya Matha
>Priority: Major
> Fix For: 3.0.0, 2.11.1
>
>
> I am using Junit 4.10 and log4j 2.10 versions. When I run the junit test, I 
> am unable to get the logs and following is the error when I turn on the log4j 
> debugging:
> ERROR StatusLogger Error parsing /scratch/log4j.xml
>  javax.xml.parsers.ParserConfigurationException
>  at 
> oracle.xml.jaxp.JXDocumentBuilderFactory.setFeature(JXDocumentBuilderFactory.java:374)
>  at 
> org.apache.logging.log4j.core.config.xml.XmlConfiguration.setFeature(XmlConfiguration.java:213)
>  at 
> org.apache.logging.log4j.core.config.xml.XmlConfiguration.disableDtdProcessing(XmlConfiguration.java:205)
>  at 
> org.apache.logging.log4j.core.config.xml.XmlConfiguration.newDocumentBuilder(XmlConfiguration.java:194)
>  at 
> org.apache.logging.log4j.core.config.xml.XmlConfiguration.(XmlConfiguration.java:92)
>  at 
> org.apache.logging.log4j.core.config.xml.XmlConfigurationFactory.getConfiguration(XmlConfigurationFactory.java:46)
>  at 
> org.apache.logging.log4j.core.config.ConfigurationFactory.getConfiguration(ConfigurationFactory.java:239)
>  at 
> org.apache.logging.log4j.core.config.ConfigurationFactory$Factory.getConfiguration(ConfigurationFactory.java:369)
>  at 
> org.apache.logging.log4j.core.config.ConfigurationFactory.getConfiguration(ConfigurationFactory.java:260)
>  at 
> org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:613)
>  at 
> org.apache.logging.log4j.core.LoggerContext.setConfigLocation(LoggerContext.java:603)
>  at oracle.oki.service.SampleBaseTest.setUpClass(SampleBaseTest.java:113)
>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>  at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>  at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>  at java.lang.reflect.Method.invoke(Method.java:497)
>  at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
>  at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
>  at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
>  at 
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
>  at 
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)
>  at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
>  at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:39)
>  at 
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:422)
>  at 
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:931)
>  at 
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:785)
> Following is how I setup my logging configuration:
> LoggerContext context = (LoggerContext) LogManager.getContext(false);
>  File file = new File("/scratch/log4j.xml");
>  
>  // this will force a reconfiguration
>  context.setConfigLocation(file.toURI());
> And the log4j.xml has following contents:
> 
> 
>  
>  /scratch/CelsiusConverter.log
>  
>  
>  
>  System.err
>  
>  
>  
>  System.err
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
> 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Comment Edited] (LOG4J2-2283) ParserConfigurationException when using Log4j with oracle.xml.jaxp.JXDocumentBuilderFactory

2018-06-26 Thread Roger Lee (JIRA)


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

Roger Lee edited comment on LOG4J2-2283 at 6/27/18 2:13 AM:


I'm away from the client's machine where the error is occurring now. I 
implemented Log4j2 2.11.0 in IntelliJ on MacOS and Unit tests to test that the 
various log levels are called. Using a custom Appender I get the number of 
messages retrieved for each of the LEVELS when various logging levels are set. 
So six for ALL (TRACE, DEBUG. INFO, WARN, ERROR, FATAL) and two for WARN etc. 
All the unit tests with 2.11.0 on MacOS pass. Probably due to no version of the 
oracle.xml.jaxp.JXDocumentBuilderFactory being present.

When the code was pulled onto the Windows PC with log4j2 2.11, which has 
Oracle's WebLogic 12 installed I'm getting:

{{Error parsing 
C:\Users\rogerl\IdeaProjects\networkrail_screens_clone\screens-war\build\resources\main\log4j2.xml}}
 {{javax.xml.parsers.ParserConfigurationException}}

And all the Unit Tests fail - as the number of messages retrieved for each 
LEVEL is zero.

I've tried with both 2.11.1-SNAPSHOT and 3.0.0-SNAPSHOT.

 


was (Author: notify):
I'm away from the client's machine where the error is occurring now. I 
implemented Log4j2 2.11.0 in IntelliJ on MacOS and Unit tests to test that the 
various log levels are called. Using a custom Appender I get the number of 
messages retrieved for each of the LEVELS when various logging levels are set. 
So six for ALL (TRACE, DEBUG. INFO, WARN, ERROR, FATAL) and two for WARN etc. 
All the unit tests with 2.11.0 on MacOS pass. Probably due to no version of the 
oracle.xml.jaxp.JXDocumentBuilderFactory being present.

When pulled the code onto the Windows PC with log4j2 2.11, which has Oracle's 
WebLogic 12 installed I'm getting:

{{Error parsing 
C:\Users\rogerl\IdeaProjects\networkrail_screens_clone\screens-war\build\resources\main\log4j2.xml}}
 {{javax.xml.parsers.ParserConfigurationException}}

I've tried with 2.11.1-SNAPSHOT and 3.0.0-SNAPSHOT in my Gradle build and the 
exception is thrown and all the Unit Tests fail - as the number of messages 
retrieved for each LEVEL is zero.

 

> ParserConfigurationException when using Log4j with 
> oracle.xml.jaxp.JXDocumentBuilderFactory
> ---
>
> Key: LOG4J2-2283
> URL: https://issues.apache.org/jira/browse/LOG4J2-2283
> Project: Log4j 2
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 2.10.0
>Reporter: Vishnu Priya Matha
>Priority: Major
> Fix For: 3.0.0, 2.11.1
>
>
> I am using Junit 4.10 and log4j 2.10 versions. When I run the junit test, I 
> am unable to get the logs and following is the error when I turn on the log4j 
> debugging:
> ERROR StatusLogger Error parsing /scratch/log4j.xml
>  javax.xml.parsers.ParserConfigurationException
>  at 
> oracle.xml.jaxp.JXDocumentBuilderFactory.setFeature(JXDocumentBuilderFactory.java:374)
>  at 
> org.apache.logging.log4j.core.config.xml.XmlConfiguration.setFeature(XmlConfiguration.java:213)
>  at 
> org.apache.logging.log4j.core.config.xml.XmlConfiguration.disableDtdProcessing(XmlConfiguration.java:205)
>  at 
> org.apache.logging.log4j.core.config.xml.XmlConfiguration.newDocumentBuilder(XmlConfiguration.java:194)
>  at 
> org.apache.logging.log4j.core.config.xml.XmlConfiguration.(XmlConfiguration.java:92)
>  at 
> org.apache.logging.log4j.core.config.xml.XmlConfigurationFactory.getConfiguration(XmlConfigurationFactory.java:46)
>  at 
> org.apache.logging.log4j.core.config.ConfigurationFactory.getConfiguration(ConfigurationFactory.java:239)
>  at 
> org.apache.logging.log4j.core.config.ConfigurationFactory$Factory.getConfiguration(ConfigurationFactory.java:369)
>  at 
> org.apache.logging.log4j.core.config.ConfigurationFactory.getConfiguration(ConfigurationFactory.java:260)
>  at 
> org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:613)
>  at 
> org.apache.logging.log4j.core.LoggerContext.setConfigLocation(LoggerContext.java:603)
>  at oracle.oki.service.SampleBaseTest.setUpClass(SampleBaseTest.java:113)
>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>  at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>  at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>  at java.lang.reflect.Method.invoke(Method.java:497)
>  at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
>  at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
>  at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
>  at 
> 

[jira] [Comment Edited] (LOG4J2-2283) ParserConfigurationException when using Log4j with oracle.xml.jaxp.JXDocumentBuilderFactory

2018-06-26 Thread Roger Lee (JIRA)


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

Roger Lee edited comment on LOG4J2-2283 at 6/27/18 2:09 AM:


I'm away from the client's machine where the error is occurring now. I 
implemented Log4j2 2.11.0 in IntelliJ on MacOS and Unit tests to test that the 
various log levels are called. Using a custom Appender I get the number of 
messages retrieved for each of the LEVELS when various levels are set So 6 for 
ALL (TRACE, DEBUG. INFO, WARN, ERROR, FATAL) 2 for WARN etc. All the unit tests 
with 2.11.0 on MacOS pass. Probably due to no version of the 
oracle.xml.jaxp.JXDocumentBuilderFactory being present

When pulled the code onto the Windows PC with log4j2 2.11, which has Oracle's 
WebLogic 12 installed I'm getting:

{{Error parsing 
C:\Users\rogerl\IdeaProjects\networkrail_screens_clone\screens-war\build\resources\main\log4j2.xml}}
{{javax.xml.parsers.ParserConfigurationException}}

I've tried with 2.11.1-SNAPSHOT and 3.0.0-SNAPSHOT in my Gradle build and the 
exception is thrown and all the Unit Tests fail - as the number of messages 
retrieved for each LEVEL is zero.

 


was (Author: notify):
I'm away from the client's machine where the error is occurring now. I 
implemented Log4j2 2.11.0 in IntelliJ on MacOS and Unit tests to test that the 
various log levels are called. Using a custom Appender I get the number of 
messages retrieved for each of the LEVELS when various levels are set So 6 for 
ALL (TRACE, DEBUG. INFO, WARN, ERROR, FATAL) 2 for WARN etc. All the unit tests 
with 2.11.0 on MacOS pass. Probably due to no version of the of 

When pulled the code onto the Windows machine with 2.11 I am getting:

Error parsing 
C:\Users\rogerl\IdeaProjects\networkrail_screens_clone\screens-war\build\resources\main\log4j2.xml
javax.xml.parsers.ParserConfigurationException

I've tried with 2.11.1-SNAPSHOT and 3.0.0-SNAPSHOT in my Gradle build and the 
previously listed error above is thrown and all the Unit Tests still fail - as 
the number of messages retrieved for each LEVEL is zero. With 
"ParserConfigurationException".

 

> ParserConfigurationException when using Log4j with 
> oracle.xml.jaxp.JXDocumentBuilderFactory
> ---
>
> Key: LOG4J2-2283
> URL: https://issues.apache.org/jira/browse/LOG4J2-2283
> Project: Log4j 2
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 2.10.0
>Reporter: Vishnu Priya Matha
>Priority: Major
> Fix For: 3.0.0, 2.11.1
>
>
> I am using Junit 4.10 and log4j 2.10 versions. When I run the junit test, I 
> am unable to get the logs and following is the error when I turn on the log4j 
> debugging:
> ERROR StatusLogger Error parsing /scratch/log4j.xml
>  javax.xml.parsers.ParserConfigurationException
>  at 
> oracle.xml.jaxp.JXDocumentBuilderFactory.setFeature(JXDocumentBuilderFactory.java:374)
>  at 
> org.apache.logging.log4j.core.config.xml.XmlConfiguration.setFeature(XmlConfiguration.java:213)
>  at 
> org.apache.logging.log4j.core.config.xml.XmlConfiguration.disableDtdProcessing(XmlConfiguration.java:205)
>  at 
> org.apache.logging.log4j.core.config.xml.XmlConfiguration.newDocumentBuilder(XmlConfiguration.java:194)
>  at 
> org.apache.logging.log4j.core.config.xml.XmlConfiguration.(XmlConfiguration.java:92)
>  at 
> org.apache.logging.log4j.core.config.xml.XmlConfigurationFactory.getConfiguration(XmlConfigurationFactory.java:46)
>  at 
> org.apache.logging.log4j.core.config.ConfigurationFactory.getConfiguration(ConfigurationFactory.java:239)
>  at 
> org.apache.logging.log4j.core.config.ConfigurationFactory$Factory.getConfiguration(ConfigurationFactory.java:369)
>  at 
> org.apache.logging.log4j.core.config.ConfigurationFactory.getConfiguration(ConfigurationFactory.java:260)
>  at 
> org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:613)
>  at 
> org.apache.logging.log4j.core.LoggerContext.setConfigLocation(LoggerContext.java:603)
>  at oracle.oki.service.SampleBaseTest.setUpClass(SampleBaseTest.java:113)
>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>  at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>  at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>  at java.lang.reflect.Method.invoke(Method.java:497)
>  at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
>  at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
>  at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
>  at 
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
>  at 
> 

[jira] [Comment Edited] (LOG4J2-2283) ParserConfigurationException when using Log4j with oracle.xml.jaxp.JXDocumentBuilderFactory

2018-06-26 Thread Roger Lee (JIRA)


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

Roger Lee edited comment on LOG4J2-2283 at 6/27/18 2:05 AM:


I'm away from the client's machine where the error is occurring now. I 
implemented Log4j2 2.11.0 in IntelliJ on MacOS and Unit tests to test that the 
various log levels are called. Using a custom Appender I get the number of 
messages retrieved for each of the LEVELS when various levels are set So 6 for 
ALL (TRACE, DEBUG. INFO, WARN, ERROR, FATAL) 2 for WARN etc. All the unit tests 
with 2.11.0 on MacOS pass. Probably due to no version of the of 

When pulled the code onto the Windows machine with 2.11 I am getting:

Error parsing 
C:\Users\rogerl\IdeaProjects\networkrail_screens_clone\screens-war\build\resources\main\log4j2.xml
javax.xml.parsers.ParserConfigurationException

I've tried with 2.11.1-SNAPSHOT and 3.0.0-SNAPSHOT in my Gradle build and the 
previously listed error above is thrown and all the Unit Tests still fail - as 
the number of messages retrieved for each LEVEL is zero. With 
"ParserConfigurationException".

 


was (Author: notify):
I'm away from the client's machine where the error is occurring now. I 
implemented Log4j2 2.11.0 in IntelliJ on MacOS and Unit tests to test that the 
various log levels are called. Using a custom Appender I get the number of 
messages retrieved for each of the LEVELS when various levels are set So 6 for 
ALL (TRACE, DEBUG. INFO, WARN, ERROR, FATAL) 2 for WARN etc. All the unit tests 
with 2.11.0 on MacOS pass.

When pulled the code onto the Windows machine with 2.11 I am getting:

Error parsing 
C:\Users\rogerl\IdeaProjects\networkrail_screens_clone\screens-war\build\resources\main\log4j2.xml
javax.xml.parsers.ParserConfigurationException

I've tried with 2.11.1-SNAPSHOT and 3.0.0-SNAPSHOT in my Gradle build and the 
previously listed error above is thrown and all the Unit Tests still fail - as 
the number of messages retrieved for each LEVEL is zero. With 
"ParserConfigurationException".

 

> ParserConfigurationException when using Log4j with 
> oracle.xml.jaxp.JXDocumentBuilderFactory
> ---
>
> Key: LOG4J2-2283
> URL: https://issues.apache.org/jira/browse/LOG4J2-2283
> Project: Log4j 2
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 2.10.0
>Reporter: Vishnu Priya Matha
>Priority: Major
> Fix For: 3.0.0, 2.11.1
>
>
> I am using Junit 4.10 and log4j 2.10 versions. When I run the junit test, I 
> am unable to get the logs and following is the error when I turn on the log4j 
> debugging:
> ERROR StatusLogger Error parsing /scratch/log4j.xml
>  javax.xml.parsers.ParserConfigurationException
>  at 
> oracle.xml.jaxp.JXDocumentBuilderFactory.setFeature(JXDocumentBuilderFactory.java:374)
>  at 
> org.apache.logging.log4j.core.config.xml.XmlConfiguration.setFeature(XmlConfiguration.java:213)
>  at 
> org.apache.logging.log4j.core.config.xml.XmlConfiguration.disableDtdProcessing(XmlConfiguration.java:205)
>  at 
> org.apache.logging.log4j.core.config.xml.XmlConfiguration.newDocumentBuilder(XmlConfiguration.java:194)
>  at 
> org.apache.logging.log4j.core.config.xml.XmlConfiguration.(XmlConfiguration.java:92)
>  at 
> org.apache.logging.log4j.core.config.xml.XmlConfigurationFactory.getConfiguration(XmlConfigurationFactory.java:46)
>  at 
> org.apache.logging.log4j.core.config.ConfigurationFactory.getConfiguration(ConfigurationFactory.java:239)
>  at 
> org.apache.logging.log4j.core.config.ConfigurationFactory$Factory.getConfiguration(ConfigurationFactory.java:369)
>  at 
> org.apache.logging.log4j.core.config.ConfigurationFactory.getConfiguration(ConfigurationFactory.java:260)
>  at 
> org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:613)
>  at 
> org.apache.logging.log4j.core.LoggerContext.setConfigLocation(LoggerContext.java:603)
>  at oracle.oki.service.SampleBaseTest.setUpClass(SampleBaseTest.java:113)
>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>  at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>  at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>  at java.lang.reflect.Method.invoke(Method.java:497)
>  at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
>  at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
>  at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
>  at 
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
>  at 
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)
>  at 

[jira] [Comment Edited] (LOG4J2-2283) ParserConfigurationException when using Log4j with oracle.xml.jaxp.JXDocumentBuilderFactory

2018-06-26 Thread Roger Lee (JIRA)


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

Roger Lee edited comment on LOG4J2-2283 at 6/27/18 2:02 AM:


I'm away from the client's machine where the error is occurring now. I 
implemented Log4j2 2.11.0 in IntelliJ on MacOS and Unit tests to test that the 
various log levels are called. Using a custom Appender I get the number of 
messages retrieved for each of the LEVELS when various levels are set So 6 for 
ALL (TRACE, DEBUG. INFO, WARN, ERROR, FATAL) 2 for WARN etc. All the unit tests 
with 2.11.0 on MacOS pass.

When pulled the code onto the Windows machine with 2.11 I am getting:

Error parsing 
C:\Users\rogerl\IdeaProjects\networkrail_screens_clone\screens-war\build\resources\main\log4j2.xml
javax.xml.parsers.ParserConfigurationException

I've tried with 2.11.1-SNAPSHOT and 3.0.0-SNAPSHOT in my Gradle build and the 
previously listed error above is thrown and all the Unit Tests still fail - as 
the number of messages retrieved for each LEVEL is zero. With 
"ParserConfigurationException".

 


was (Author: notify):
I'm away from the client's machine where the error is occurring now. I 
implemented Log4j2 2.11.0 in IntelliJ on MacOS and Unit tests to test that the 
various log levels are called. Using a custom Appender I get the number of 
messages retrieved for each of the LEVELS when various levels are set So 6 for 
ALL (TRACE, DEBUG. INFO, WARN, ERROR, FATAL) 2 for WARN etc. All the unit tests 
with 2.11.0 on MacOS pass.

When pulled the code onto the Windows machine with 2.11 I am getting:

Error parsing 
C:\Users\rogerl\IdeaProjects\networkrail_screens_clone\screens-war\build\resources\main\log4j2.xml
javax.xml.parsers.ParserConfigurationException

I've tried with 2.11.1-SNAPSHOT and 3.0.0-SNAPSHOT in my Gradle build and the 
previously listed error above and all the Unit Tests still fail as the number 
of messages retrieved for each LEVEL is zero. With 
"ParserConfigurationException".

 

> ParserConfigurationException when using Log4j with 
> oracle.xml.jaxp.JXDocumentBuilderFactory
> ---
>
> Key: LOG4J2-2283
> URL: https://issues.apache.org/jira/browse/LOG4J2-2283
> Project: Log4j 2
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 2.10.0
>Reporter: Vishnu Priya Matha
>Priority: Major
> Fix For: 3.0.0, 2.11.1
>
>
> I am using Junit 4.10 and log4j 2.10 versions. When I run the junit test, I 
> am unable to get the logs and following is the error when I turn on the log4j 
> debugging:
> ERROR StatusLogger Error parsing /scratch/log4j.xml
>  javax.xml.parsers.ParserConfigurationException
>  at 
> oracle.xml.jaxp.JXDocumentBuilderFactory.setFeature(JXDocumentBuilderFactory.java:374)
>  at 
> org.apache.logging.log4j.core.config.xml.XmlConfiguration.setFeature(XmlConfiguration.java:213)
>  at 
> org.apache.logging.log4j.core.config.xml.XmlConfiguration.disableDtdProcessing(XmlConfiguration.java:205)
>  at 
> org.apache.logging.log4j.core.config.xml.XmlConfiguration.newDocumentBuilder(XmlConfiguration.java:194)
>  at 
> org.apache.logging.log4j.core.config.xml.XmlConfiguration.(XmlConfiguration.java:92)
>  at 
> org.apache.logging.log4j.core.config.xml.XmlConfigurationFactory.getConfiguration(XmlConfigurationFactory.java:46)
>  at 
> org.apache.logging.log4j.core.config.ConfigurationFactory.getConfiguration(ConfigurationFactory.java:239)
>  at 
> org.apache.logging.log4j.core.config.ConfigurationFactory$Factory.getConfiguration(ConfigurationFactory.java:369)
>  at 
> org.apache.logging.log4j.core.config.ConfigurationFactory.getConfiguration(ConfigurationFactory.java:260)
>  at 
> org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:613)
>  at 
> org.apache.logging.log4j.core.LoggerContext.setConfigLocation(LoggerContext.java:603)
>  at oracle.oki.service.SampleBaseTest.setUpClass(SampleBaseTest.java:113)
>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>  at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>  at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>  at java.lang.reflect.Method.invoke(Method.java:497)
>  at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
>  at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
>  at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
>  at 
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
>  at 
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)
>  at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
>  at 

Jenkins build is back to normal : Log4j 2 3.x #103

2018-06-26 Thread Apache Jenkins Server
See 




[jira] [Closed] (LOG4J2-2358) Update Kafka client from 1.0.0 to 1.1.0.

2018-06-26 Thread Gary Gregory (JIRA)


 [ 
https://issues.apache.org/jira/browse/LOG4J2-2358?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gary Gregory closed LOG4J2-2358.

   Resolution: Fixed
 Assignee: Gary Gregory
Fix Version/s: 2.11.1
   3.0.0

In git master.

> Update Kafka client from 1.0.0 to 1.1.0.
> 
>
> Key: LOG4J2-2358
> URL: https://issues.apache.org/jira/browse/LOG4J2-2358
> Project: Log4j 2
>  Issue Type: Improvement
>  Components: Appenders
>Reporter: Gary Gregory
>Assignee: Gary Gregory
>Priority: Major
> Fix For: 3.0.0, 2.11.1
>
>
> Update Kafka client from 1.0.0 to 1.1.0.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (LOG4J2-2358) Update Kafka client from 1.0.0 to 1.1.0.

2018-06-26 Thread ASF subversion and git services (JIRA)


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

ASF subversion and git services commented on LOG4J2-2358:
-

Commit b66f09c3416881db1e28afbaf95e076156f47f58 in logging-log4j2's branch 
refs/heads/release-2.x from [~garydgregory]
[ https://git-wip-us.apache.org/repos/asf?p=logging-log4j2.git;h=b66f09c ]

[LOG4J2-2358] Update Kafka client from 1.0.0 to 1.1.0.

> Update Kafka client from 1.0.0 to 1.1.0.
> 
>
> Key: LOG4J2-2358
> URL: https://issues.apache.org/jira/browse/LOG4J2-2358
> Project: Log4j 2
>  Issue Type: Improvement
>  Components: Appenders
>Reporter: Gary Gregory
>Priority: Major
>
> Update Kafka client from 1.0.0 to 1.1.0.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


Build failed in Jenkins: Log4j 2 3.x #102

2018-06-26 Thread Apache Jenkins Server
See 


Changes:

[garydgregory] Update Maven PMD plugin from 3.9.0 to 3.10.0.

--
[...truncated 1.43 MB...]
Uploaded: 
https://repository.apache.org/content/repositories/snapshots/org/apache/logging/log4j/log4j-appserver/3.0.0-SNAPSHOT/maven-metadata.xml
 (2 KB at 0.8 KB/sec)
Deploying the main artifact log4j-appserver-3.0.0-SNAPSHOT-test-sources.jar
Uploading: 
https://repository.apache.org/content/repositories/snapshots/org/apache/logging/log4j/log4j-appserver/3.0.0-SNAPSHOT/log4j-appserver-3.0.0-20180626.215207-106-test-sources.jar
Uploaded: 
https://repository.apache.org/content/repositories/snapshots/org/apache/logging/log4j/log4j-appserver/3.0.0-SNAPSHOT/log4j-appserver-3.0.0-20180626.215207-106-test-sources.jar
 (9 KB at 1.5 KB/sec)
Uploading: 
https://repository.apache.org/content/repositories/snapshots/org/apache/logging/log4j/log4j-appserver/3.0.0-SNAPSHOT/maven-metadata.xml
Uploaded: 
https://repository.apache.org/content/repositories/snapshots/org/apache/logging/log4j/log4j-appserver/3.0.0-SNAPSHOT/maven-metadata.xml
 (2 KB at 0.4 KB/sec)
[INFO] Deployment in 
https://repository.apache.org/content/repositories/snapshots 
(id=apache.snapshots.https,uniqueVersion=true)
Deploying the main artifact log4j-bom-3.0.0-SNAPSHOT.pom
Downloading: 
https://repository.apache.org/content/repositories/snapshots/org/apache/logging/log4j/log4j-bom/3.0.0-SNAPSHOT/maven-metadata.xml
Downloaded: 
https://repository.apache.org/content/repositories/snapshots/org/apache/logging/log4j/log4j-bom/3.0.0-SNAPSHOT/maven-metadata.xml
 (614 B at 0.3 KB/sec)
Uploading: 
https://repository.apache.org/content/repositories/snapshots/org/apache/logging/log4j/log4j-bom/3.0.0-SNAPSHOT/log4j-bom-3.0.0-20180626.215232-106.pom
Uploaded: 
https://repository.apache.org/content/repositories/snapshots/org/apache/logging/log4j/log4j-bom/3.0.0-SNAPSHOT/log4j-bom-3.0.0-20180626.215232-106.pom
 (9 KB at 1.4 KB/sec)
Downloading: 
https://repository.apache.org/content/repositories/snapshots/org/apache/logging/log4j/log4j-bom/maven-metadata.xml
Downloaded: 
https://repository.apache.org/content/repositories/snapshots/org/apache/logging/log4j/log4j-bom/maven-metadata.xml
 (793 B at 0.3 KB/sec)
Uploading: 
https://repository.apache.org/content/repositories/snapshots/org/apache/logging/log4j/log4j-bom/3.0.0-SNAPSHOT/maven-metadata.xml
Uploaded: 
https://repository.apache.org/content/repositories/snapshots/org/apache/logging/log4j/log4j-bom/3.0.0-SNAPSHOT/maven-metadata.xml
 (614 B at 0.3 KB/sec)
Uploading: 
https://repository.apache.org/content/repositories/snapshots/org/apache/logging/log4j/log4j-bom/maven-metadata.xml
Uploaded: 
https://repository.apache.org/content/repositories/snapshots/org/apache/logging/log4j/log4j-bom/maven-metadata.xml
 (793 B at 0.4 KB/sec)
[INFO] Deployment in 
https://repository.apache.org/content/repositories/snapshots 
(id=apache.snapshots.https,uniqueVersion=true)
Deploying the main artifact log4j-cassandra-3.0.0-SNAPSHOT.jar
Downloading: 
https://repository.apache.org/content/repositories/snapshots/org/apache/logging/log4j/log4j-cassandra/3.0.0-SNAPSHOT/maven-metadata.xml
Downloaded: 
https://repository.apache.org/content/repositories/snapshots/org/apache/logging/log4j/log4j-cassandra/3.0.0-SNAPSHOT/maven-metadata.xml
 (2 KB at 0.7 KB/sec)
Uploading: 
https://repository.apache.org/content/repositories/snapshots/org/apache/logging/log4j/log4j-cassandra/3.0.0-SNAPSHOT/log4j-cassandra-3.0.0-20180626.215246-106.jar
Uploaded: 
https://repository.apache.org/content/repositories/snapshots/org/apache/logging/log4j/log4j-cassandra/3.0.0-SNAPSHOT/log4j-cassandra-3.0.0-20180626.215246-106.jar
 (23 KB at 8.4 KB/sec)
Uploading: 
https://repository.apache.org/content/repositories/snapshots/org/apache/logging/log4j/log4j-cassandra/3.0.0-SNAPSHOT/log4j-cassandra-3.0.0-20180626.215246-106.pom
Uploaded: 
https://repository.apache.org/content/repositories/snapshots/org/apache/logging/log4j/log4j-cassandra/3.0.0-SNAPSHOT/log4j-cassandra-3.0.0-20180626.215246-106.pom
 (8 KB at 3.7 KB/sec)
Downloading: 
https://repository.apache.org/content/repositories/snapshots/org/apache/logging/log4j/log4j-cassandra/maven-metadata.xml
Downloaded: 
https://repository.apache.org/content/repositories/snapshots/org/apache/logging/log4j/log4j-cassandra/maven-metadata.xml
 (441 B at 0.6 KB/sec)
Uploading: 
https://repository.apache.org/content/repositories/snapshots/org/apache/logging/log4j/log4j-cassandra/3.0.0-SNAPSHOT/maven-metadata.xml
Uploaded: 
https://repository.apache.org/content/repositories/snapshots/org/apache/logging/log4j/log4j-cassandra/3.0.0-SNAPSHOT/maven-metadata.xml
 (2 KB at 0.8 KB/sec)
Uploading: 
https://repository.apache.org/content/repositories/snapshots/org/apache/logging/log4j/log4j-cassandra/maven-metadata.xml
Uploaded: 

[jira] [Commented] (LOG4J2-2358) Update Kafka client from 1.0.0 to 1.1.0.

2018-06-26 Thread ASF subversion and git services (JIRA)


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

ASF subversion and git services commented on LOG4J2-2358:
-

Commit 4bfefbb5bf8f5de2119b0e971537806118b74971 in logging-log4j2's branch 
refs/heads/master from [~garydgregory]
[ https://git-wip-us.apache.org/repos/asf?p=logging-log4j2.git;h=4bfefbb ]

[LOG4J2-2358] Update Kafka client from 1.0.0 to 1.1.0.

> Update Kafka client from 1.0.0 to 1.1.0.
> 
>
> Key: LOG4J2-2358
> URL: https://issues.apache.org/jira/browse/LOG4J2-2358
> Project: Log4j 2
>  Issue Type: Improvement
>  Components: Appenders
>Reporter: Gary Gregory
>Priority: Major
>
> Update Kafka client from 1.0.0 to 1.1.0.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (LOG4J2-2358) Update Kafka client from 1.0.0 to 1.1.0.

2018-06-26 Thread Gary Gregory (JIRA)
Gary Gregory created LOG4J2-2358:


 Summary: Update Kafka client from 1.0.0 to 1.1.0.
 Key: LOG4J2-2358
 URL: https://issues.apache.org/jira/browse/LOG4J2-2358
 Project: Log4j 2
  Issue Type: Improvement
  Components: Appenders
Reporter: Gary Gregory


Update Kafka client from 1.0.0 to 1.1.0.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


Jenkins build is still unstable: Log4j 2 3.x #101

2018-06-26 Thread Apache Jenkins Server
See 




Jenkins build is back to stable : Log4j 2 2.x #3503

2018-06-26 Thread Apache Jenkins Server
See 




Jenkins build became unstable: Log4j 2 3.x #100

2018-06-26 Thread Apache Jenkins Server
See 




Jenkins build is still unstable: Log4j 2 2.x #3502

2018-06-26 Thread Apache Jenkins Server
See 




[jira] [Closed] (LOG4J2-2357) Update Jackson from 2.9.5 to 2.9.6.

2018-06-26 Thread Gary Gregory (JIRA)


 [ 
https://issues.apache.org/jira/browse/LOG4J2-2357?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gary Gregory closed LOG4J2-2357.

   Resolution: Fixed
Fix Version/s: 2.11.1
   3.0.0

In git master.

> Update Jackson from 2.9.5 to 2.9.6.
> ---
>
> Key: LOG4J2-2357
> URL: https://issues.apache.org/jira/browse/LOG4J2-2357
> Project: Log4j 2
>  Issue Type: Improvement
>  Components: Core
>Reporter: Gary Gregory
>Assignee: Gary Gregory
>Priority: Major
> Fix For: 3.0.0, 2.11.1
>
>
> Update Jackson from 2.9.5 to 2.9.6.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


Jenkins build is back to stable : Log4j 2 3.x #99

2018-06-26 Thread Apache Jenkins Server
See 




Jenkins build became unstable: Log4j 2 2.x #3501

2018-06-26 Thread Apache Jenkins Server
See 




[jira] [Commented] (LOG4J2-2357) Update Jackson from 2.9.5 to 2.9.6.

2018-06-26 Thread ASF subversion and git services (JIRA)


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

ASF subversion and git services commented on LOG4J2-2357:
-

Commit 3fa56feb920967d6fe47ae8fb92142dc9a5ec56a in logging-log4j2's branch 
refs/heads/release-2.x from [~garydgregory]
[ https://git-wip-us.apache.org/repos/asf?p=logging-log4j2.git;h=3fa56fe ]

[LOG4J2-2357] Update Jackson from 2.9.5 to 2.9.6.

> Update Jackson from 2.9.5 to 2.9.6.
> ---
>
> Key: LOG4J2-2357
> URL: https://issues.apache.org/jira/browse/LOG4J2-2357
> Project: Log4j 2
>  Issue Type: Improvement
>  Components: Core
>Reporter: Gary Gregory
>Assignee: Gary Gregory
>Priority: Major
>
> Update Jackson from 2.9.5 to 2.9.6.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (LOG4J2-2357) Update Jackson from 2.9.5 to 2.9.6.

2018-06-26 Thread ASF subversion and git services (JIRA)


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

ASF subversion and git services commented on LOG4J2-2357:
-

Commit e741549928b2acbcb2d11ad285aa84ee88728e49 in logging-log4j2's branch 
refs/heads/master from [~garydgregory]
[ https://git-wip-us.apache.org/repos/asf?p=logging-log4j2.git;h=e741549 ]

[LOG4J2-2357] Update Jackson from 2.9.5 to 2.9.6.

> Update Jackson from 2.9.5 to 2.9.6.
> ---
>
> Key: LOG4J2-2357
> URL: https://issues.apache.org/jira/browse/LOG4J2-2357
> Project: Log4j 2
>  Issue Type: Improvement
>  Components: Core
>Reporter: Gary Gregory
>Assignee: Gary Gregory
>Priority: Major
>
> Update Jackson from 2.9.5 to 2.9.6.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (LOG4J2-2357) Update Jackson from 2.9.5 to 2.9.6.

2018-06-26 Thread Gary Gregory (JIRA)
Gary Gregory created LOG4J2-2357:


 Summary: Update Jackson from 2.9.5 to 2.9.6.
 Key: LOG4J2-2357
 URL: https://issues.apache.org/jira/browse/LOG4J2-2357
 Project: Log4j 2
  Issue Type: Improvement
  Components: Core
Reporter: Gary Gregory
Assignee: Gary Gregory


Update Jackson from 2.9.5 to 2.9.6.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (LOG4J2-2283) ParserConfigurationException when using Log4j with oracle.xml.jaxp.JXDocumentBuilderFactory

2018-06-26 Thread Roger Lee (JIRA)


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

Roger Lee commented on LOG4J2-2283:
---

I'm away from the client's machine where the error is occurring now. I 
implemented Log4j2 2.11.0 in IntelliJ on MacOS and Unit tests to test that the 
various log levels are called. Using a custom Appender I get the number of 
messages retrieved for each of the LEVELS when various levels are set So 6 for 
ALL (TRACE, DEBUG. INFO, WARN, ERROR, FATAL) 2 for WARN etc. All the unit tests 
with 2.11.0 on MacOS pass.

When pulled the code onto the Windows machine with 2.11 I am getting:

Error parsing 
C:\Users\rogerl\IdeaProjects\networkrail_screens_clone\screens-war\build\resources\main\log4j2.xml
javax.xml.parsers.ParserConfigurationException

I've tried with 2.11.1-SNAPSHOT and 3.0.0-SNAPSHOT in my Gradle build and the 
previously listed error above and all the Unit Tests still fail as the number 
of messages retrieved for each LEVEL is zero. With 
"ParserConfigurationException".

 

> ParserConfigurationException when using Log4j with 
> oracle.xml.jaxp.JXDocumentBuilderFactory
> ---
>
> Key: LOG4J2-2283
> URL: https://issues.apache.org/jira/browse/LOG4J2-2283
> Project: Log4j 2
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 2.10.0
>Reporter: Vishnu Priya Matha
>Priority: Major
> Fix For: 3.0.0, 2.11.1
>
>
> I am using Junit 4.10 and log4j 2.10 versions. When I run the junit test, I 
> am unable to get the logs and following is the error when I turn on the log4j 
> debugging:
> ERROR StatusLogger Error parsing /scratch/log4j.xml
>  javax.xml.parsers.ParserConfigurationException
>  at 
> oracle.xml.jaxp.JXDocumentBuilderFactory.setFeature(JXDocumentBuilderFactory.java:374)
>  at 
> org.apache.logging.log4j.core.config.xml.XmlConfiguration.setFeature(XmlConfiguration.java:213)
>  at 
> org.apache.logging.log4j.core.config.xml.XmlConfiguration.disableDtdProcessing(XmlConfiguration.java:205)
>  at 
> org.apache.logging.log4j.core.config.xml.XmlConfiguration.newDocumentBuilder(XmlConfiguration.java:194)
>  at 
> org.apache.logging.log4j.core.config.xml.XmlConfiguration.(XmlConfiguration.java:92)
>  at 
> org.apache.logging.log4j.core.config.xml.XmlConfigurationFactory.getConfiguration(XmlConfigurationFactory.java:46)
>  at 
> org.apache.logging.log4j.core.config.ConfigurationFactory.getConfiguration(ConfigurationFactory.java:239)
>  at 
> org.apache.logging.log4j.core.config.ConfigurationFactory$Factory.getConfiguration(ConfigurationFactory.java:369)
>  at 
> org.apache.logging.log4j.core.config.ConfigurationFactory.getConfiguration(ConfigurationFactory.java:260)
>  at 
> org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:613)
>  at 
> org.apache.logging.log4j.core.LoggerContext.setConfigLocation(LoggerContext.java:603)
>  at oracle.oki.service.SampleBaseTest.setUpClass(SampleBaseTest.java:113)
>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>  at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>  at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>  at java.lang.reflect.Method.invoke(Method.java:497)
>  at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
>  at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
>  at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
>  at 
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
>  at 
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)
>  at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
>  at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:39)
>  at 
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:422)
>  at 
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:931)
>  at 
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:785)
> Following is how I setup my logging configuration:
> LoggerContext context = (LoggerContext) LogManager.getContext(false);
>  File file = new File("/scratch/log4j.xml");
>  
>  // this will force a reconfiguration
>  context.setConfigLocation(file.toURI());
> And the log4j.xml has following contents:
> 
> 
>  
>  /scratch/CelsiusConverter.log
>  
>  
>  
>  System.err
>  
>  
>  
>  System.err
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
> 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (LOG4J2-2283) ParserConfigurationException when using Log4j with oracle.xml.jaxp.JXDocumentBuilderFactory

2018-06-26 Thread Gary Gregory (JIRA)


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

Gary Gregory commented on LOG4J2-2283:
--

The code currently catches and prints that exception, then continues 
processing. 

How can you tell the XML file is not being parsed? Do you see other errors?

> ParserConfigurationException when using Log4j with 
> oracle.xml.jaxp.JXDocumentBuilderFactory
> ---
>
> Key: LOG4J2-2283
> URL: https://issues.apache.org/jira/browse/LOG4J2-2283
> Project: Log4j 2
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 2.10.0
>Reporter: Vishnu Priya Matha
>Priority: Major
> Fix For: 3.0.0, 2.11.1
>
>
> I am using Junit 4.10 and log4j 2.10 versions. When I run the junit test, I 
> am unable to get the logs and following is the error when I turn on the log4j 
> debugging:
> ERROR StatusLogger Error parsing /scratch/log4j.xml
>  javax.xml.parsers.ParserConfigurationException
>  at 
> oracle.xml.jaxp.JXDocumentBuilderFactory.setFeature(JXDocumentBuilderFactory.java:374)
>  at 
> org.apache.logging.log4j.core.config.xml.XmlConfiguration.setFeature(XmlConfiguration.java:213)
>  at 
> org.apache.logging.log4j.core.config.xml.XmlConfiguration.disableDtdProcessing(XmlConfiguration.java:205)
>  at 
> org.apache.logging.log4j.core.config.xml.XmlConfiguration.newDocumentBuilder(XmlConfiguration.java:194)
>  at 
> org.apache.logging.log4j.core.config.xml.XmlConfiguration.(XmlConfiguration.java:92)
>  at 
> org.apache.logging.log4j.core.config.xml.XmlConfigurationFactory.getConfiguration(XmlConfigurationFactory.java:46)
>  at 
> org.apache.logging.log4j.core.config.ConfigurationFactory.getConfiguration(ConfigurationFactory.java:239)
>  at 
> org.apache.logging.log4j.core.config.ConfigurationFactory$Factory.getConfiguration(ConfigurationFactory.java:369)
>  at 
> org.apache.logging.log4j.core.config.ConfigurationFactory.getConfiguration(ConfigurationFactory.java:260)
>  at 
> org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:613)
>  at 
> org.apache.logging.log4j.core.LoggerContext.setConfigLocation(LoggerContext.java:603)
>  at oracle.oki.service.SampleBaseTest.setUpClass(SampleBaseTest.java:113)
>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>  at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>  at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>  at java.lang.reflect.Method.invoke(Method.java:497)
>  at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
>  at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
>  at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
>  at 
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
>  at 
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)
>  at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
>  at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:39)
>  at 
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:422)
>  at 
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:931)
>  at 
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:785)
> Following is how I setup my logging configuration:
> LoggerContext context = (LoggerContext) LogManager.getContext(false);
>  File file = new File("/scratch/log4j.xml");
>  
>  // this will force a reconfiguration
>  context.setConfigLocation(file.toURI());
> And the log4j.xml has following contents:
> 
> 
>  
>  /scratch/CelsiusConverter.log
>  
>  
>  
>  System.err
>  
>  
>  
>  System.err
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
> 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (LOG4J2-2283) ParserConfigurationException when using Log4j with oracle.xml.jaxp.JXDocumentBuilderFactory

2018-06-26 Thread Roger Lee (JIRA)


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

Roger Lee commented on LOG4J2-2283:
---

I still get this error with 2.11,  2.11.1-SNAPSHOT & 3.0.0-SNAPSHOT.

The only difference now is it catches the exception. Still won't parse the 
log4j2.xml:

ERROR StatusLogger Caught javax.xml.parsers.ParserConfigurationException 
setting feature http://xml.org/sax/features/external-general-entities to false 
on DocumentBuilderFactory oracle.xml.jaxp.JXDocumentBuilderFactory@13e73916: 
javax.xml.parsers.ParserConfigurationException
 javax.xml.parsers.ParserConfigurationException
 at 
oracle.xml.jaxp.JXDocumentBuilderFactory.setFeature(JXDocumentBuilderFactory.java:374)
 at 
org.apache.logging.log4j.core.config.xml.XmlConfiguration.setFeature(XmlConfiguration.java:212)
 at 
org.apache.logging.log4j.core.config.xml.XmlConfiguration.disableDtdProcessing(XmlConfiguration.java:205)
 at 
org.apache.logging.log4j.core.config.xml.XmlConfiguration.newDocumentBuilder(XmlConfiguration.java:194)
 at 
org.apache.logging.log4j.core.config.xml.XmlConfiguration.(XmlConfiguration.java:92)
 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:453)
 at 
org.apache.logging.log4j.core.config.ConfigurationFactory$Factory.getConfiguration(ConfigurationFactory.java:385)
 at 
org.apache.logging.log4j.core.config.ConfigurationFactory.getConfiguration(ConfigurationFactory.java:260)
 at 
org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:615)
 at 
org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:636)
 at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:231)
 at 
org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:243)
 at 
org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:45)
 at org.apache.logging.log4j.LogManager.getContext(LogManager.java:174)
 at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:648)
 at 
com.onespatial.networkrail.eai.log4j.Log4JLevelDEBUGTest.(Log4JLevelDEBUGTest.java:19)
 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
 at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
 at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
 at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
 at 
org.junit.platform.commons.util.ReflectionUtils.newInstance(ReflectionUtils.java:429)
 at 
org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:60)
 at 
org.junit.jupiter.engine.descriptor.ClassTestDescriptor.instantiateTestClass(ClassTestDescriptor.java:208)
 at 
org.junit.jupiter.engine.descriptor.ClassTestDescriptor.instantiateAndPostProcessTestInstance(ClassTestDescriptor.java:195)
 at 
org.junit.jupiter.engine.descriptor.ClassTestDescriptor.lambda$testInstanceProvider$0(ClassTestDescriptor.java:185)
 at 
org.junit.jupiter.engine.descriptor.ClassTestDescriptor.lambda$testInstanceProvider$1(ClassTestDescriptor.java:189)
 at java.util.Optional.orElseGet(Optional.java:267)
 at 
org.junit.jupiter.engine.descriptor.ClassTestDescriptor.lambda$testInstanceProvider$2(ClassTestDescriptor.java:188)
 at 
org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:81)
 at 
org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:58)
 at 
org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.prepare(HierarchicalTestExecutor.java:89)
 at 
org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.execute(HierarchicalTestExecutor.java:74)
 at 
org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.lambda$executeRecursively$2(HierarchicalTestExecutor.java:121)
 at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
 at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
 at java.util.Iterator.forEachRemaining(Iterator.java:116)
 at 
java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
 at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
 at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
 at 
java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
 at 
java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
 at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
 at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
 at