[
https://issues.apache.org/jira/browse/LOG4J2-704?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14058548#comment-14058548
]
Remko Popma edited comment on LOG4J2-704 at 7/11/14 8:41 AM:
-------------------------------------------------------------
I was worried that my changes for LOG4J2-539 caused this issue but when looking
closely I don't think that is the case.
Also, if the file "conf/log4j2.xml" exists and is readable, this error should
not happen. Either a file relative to the current location in the file system
or (as Ralph mentioned) putting conf/log4j2.xml in the classpath should work.
Do you see any other WARN or ERROR messages before this error occurs? If not,
can you add system property {{-Dlog4j2.StatusLogger.level=TRACE}} and let us
know if you see any configuration-related error messages?
was (Author: [email protected]):
I was worried that my changes for LOG4J2-539 caused this issue but when looking
closely I don't think that is the case.
Also, if the file "conf/log4j2.xml" exists and is readable, this error should
not happen.
Do you see any other WARN or ERROR messages before this error occurs?
> -Dlog4j.configurationFile no longer accepts relative paths
> ----------------------------------------------------------
>
> Key: LOG4J2-704
> URL: https://issues.apache.org/jira/browse/LOG4J2-704
> Project: Log4j 2
> Issue Type: Bug
> Components: Configurators
> Affects Versions: 2.0-rc2
> Environment: Ubuntu. Oracle Java 1.7.
> Reporter: Andy Grove
> Assignee: Remko Popma
> Priority: Minor
>
> I just upgraded from beta9 to rc2 and my command line applications now fail
> on startup.
> I am passing -Dlog4j.configurationFile=conf/log4j2.xml
> The documentation does not state that relative paths are no longer supported
> but the error indicates that only absolute paths can now be used.
> [java] ERROR StatusLogger Unable to access conf/log4j2.xml
> java.lang.IllegalArgumentException: URI is not absolute
> [java] at java.net.URI.toURL(URI.java:1095)
> [java] at
> org.apache.logging.log4j.core.config.ConfigurationFactory.getInputFromUri(ConfigurationFactory.java:265)
> [java] at
> org.apache.logging.log4j.core.config.ConfigurationFactory$Factory.getConfiguration(ConfigurationFactory.java:382)
> [java] at
> org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:415)
> [java] at
> org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:146)
> [java] at
> org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:75)
> [java] at
> org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:37)
> [java] at
> org.apache.logging.log4j.LogManager.getContext(LogManager.java:268)
> [java] at
> org.apache.logging.slf4j.Log4jLoggerFactory$PrivateManager.getContext(Log4jLoggerFactory.java:98)
> [java] at
> org.apache.logging.slf4j.Log4jLoggerFactory.getContext(Log4jLoggerFactory.java:84)
> [java] at
> org.apache.logging.slf4j.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:44)
> [java] at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:270)
> [java] at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:281)
--
This message was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]