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

Ralph Goers commented on LOG4J2-2058:
-------------------------------------

I have created a test but no matter what I do I cannot duplicate this behavior. 
I am pretty sure I know how to fix this issue but until I can figure out how to 
create a test that fails I have no way to validate it.

> 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