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

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

Commit 59a3e0285d11e6a44e5dd8f89349826af3cedffb in logging-log4j2's branch 
refs/heads/master from Ralph Goers
[ https://gitbox.apache.org/repos/asf?p=logging-log4j2.git;h=59a3e02 ]

LOG4J2-2058 - Prevent recursive calls to getLogger


> java.locale.providers set to HOST causes Log4j2 to crash in Java 9
> ------------------------------------------------------------------
>
>                 Key: LOG4J2-2058
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-2058
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: JUL adapter, Pattern Converters
>    Affects Versions: 2.9.0, 2.9.1
>         Environment: Windows 10, Java 9
>            Reporter: Dean Wookey
>            Priority: Blocker
>
> When using the JUL log manager, setting the java.locale.providers property to 
> "HOST" causes log4j2 to crash when you next log something. 
> {code:java}
> import java.util.logging.Level;
> import java.util.logging.Logger;
> public class LocalePropertyTest {
>     /**
>      * @param args the command line arguments
>      */
>     public static void main(String[] args) {
>         System.setProperty("java.locale.providers", "HOST,JRE,SPI");
>         System.setProperty("java.util.logging.manager", 
> "org.apache.logging.log4j.jul.LogManager");
>         
> Logger.getLogger(LocalePropertyTest.class.getName()).log(Level.WARNING, "this 
> is a test");
>     }
> }
> {code}
> Used the following libraries:
> log4j-jul-2.9.1.jar
> log4j-core-2.9.1.jar
> log4j-api-2.9.1.jar
> The error is very long. Here are the first few lines:
> ERROR StatusLogger Error creating converter for d
>  java.lang.reflect.InvocationTargetException
>       at jdk.internal.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
>       at 
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>       at java.base/java.lang.reflect.Method.invoke(Method.java:564)
>       at 
> org.apache.logging.log4j.core.pattern.PatternParser.createConverter(PatternParser.java:582)
>       at 
> org.apache.logging.log4j.core.pattern.PatternParser.finalizeConverter(PatternParser.java:638)
>       at 
> org.apache.logging.log4j.core.pattern.PatternParser.parse(PatternParser.java:414)
>       at 
> org.apache.logging.log4j.core.pattern.PatternParser.parse(PatternParser.java:177)
>       at 
> org.apache.logging.log4j.core.layout.PatternLayout$SerializerBuilder.build(PatternLayout.java:376)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to