Robert Hipwell created LOG4J2-118:
-------------------------------------
Summary: Exception in thread "main"
java.lang.ExceptionInInitializerError
Key: LOG4J2-118
URL: https://issues.apache.org/jira/browse/LOG4J2-118
Project: Log4j 2
Issue Type: Bug
Components: Core
Affects Versions: 2.0-beta2
Reporter: Robert Hipwell
I am checking out log4j2 via the overview documentation and I am getting the
following exception when trying to setup the log4j2 logger:
Exception in thread "main" java.lang.ExceptionInInitializerError
Caused by: java.lang.NullPointerException
at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:129)
at HelloWorld.<clinit>(HelloWorld.java:5)
My test program is taken from the overview site:
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
public class HelloWorld {
private static Logger logger = LogManager.getLogger("HelloWorld");
public static void main(String[] args) {
logger.info("Hello, World!");
}
}
To reproduce: download the binary distribution from the download page. Add all
jar files to an eclipse project and run the test program.
To fix: Remove log4j-core-2.0-beta2-sources from the build path.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]