[
https://issues.apache.org/jira/browse/LOG4J2-118?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ralph Goers resolved LOG4J2-118.
--------------------------------
Resolution: Cannot Reproduce
I created a project in Eclipse using 2.0-beta3 and included all the jars. The
application ran fine. I also tried to create a project in IntelliJ but noticed
that it automatically splits the jars into the runtime, sources and javadocs
so that this problem can't be reproduced there.
The fact that the problem went away simply by removing the sources from the
path would seem to also indicate that this isn't really an error in Log4j.
> 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]