You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Filipp Gunbin (JIRA)" <ji...@apache.org> on 2019/06/26 00:27:00 UTC

[jira] [Created] (LOG4J2-2642) [doc] Mention first Tomcat versions supporting classpath: URLs

Filipp Gunbin created LOG4J2-2642:
-------------------------------------

             Summary: [doc] Mention first Tomcat versions supporting classpath: URLs
                 Key: LOG4J2-2642
                 URL: https://issues.apache.org/jira/browse/LOG4J2-2642
             Project: Log4j 2
          Issue Type: Bug
            Reporter: Filipp Gunbin


https://logging.apache.org/log4j/2.x/manual/webapp.html says that "classpath:" urls can be used in log4jConfiguration context-param, but such url gives error on old Tomcat (7.0.30):
{code}ERROR StatusLogger Invalid URL classpath:/my/path
 java.net.MalformedURLException: unknown protocol: classpath
        at java.net.URL.<init>(URL.java:600)
        at java.net.URL.<init>(URL.java:490)
        at java.net.URL.<init>(URL.java:439)
        at java.net.URI.toURL(URI.java:1089)
        at org.apache.logging.log4j.core.config.ConfigurationSource.fromUri(ConfigurationSource.java:248)
        at org.apache.logging.log4j.core.config.ConfigurationFactory.getConfiguration(ConfigurationFactory.java:238)
        at org.apache.logging.log4j.core.config.ConfigurationFactory$Factory.getConfiguration(ConfigurationFactory.java:370)
        at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:238)
        at org.apache.logging.log4j.core.config.Configurator.initialize(Configurator.java:158)
        at org.apache.logging.log4j.web.Log4jWebInitializerImpl.initializeNonJndi(Log4jWebInitializerImpl.java:174)
        at org.apache.logging.log4j.web.Log4jWebInitializerImpl.start(Log4jWebInitializerImpl.java:112)
        at org.apache.logging.log4j.web.Log4jServletContextListener.contextInitialized(Log4jServletContextListener.java:56)
{code}
The support is present in Tomcat 7 >= 7.0.66 and Tomcat 8.0 >= 8.0.28 (see
https://bz.apache.org/bugzilla/show_bug.cgi?id=56777), the doc could mention it.



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