You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Simone Tripodi <si...@apache.org> on 2012/08/07 10:46:36 UTC
[2.X] Null object returned for root
Hi all mates!
Congrats first for the 2.0 release - even if alpha, this is something
we all ASF friends were waiting for! :)
I am now trying to migrate a small app from slf4j+logback to log4j2
and I should have not understood well how new stuff work because I
obtain the error as in the subject.
This is my new log4j2.xml[1] file and then I just use the APIs.
When the app starts, I get the following stacktrace:
Null object returned for root
Exception in thread "main" java.lang.NullPointerException
at org.apache.logging.log4j.core.config.BaseConfiguration.createPluginObject(BaseConfiguration.java:589)
at org.apache.logging.log4j.core.config.BaseConfiguration.createConfiguration(BaseConfiguration.java:452)
at org.apache.logging.log4j.core.config.BaseConfiguration.doConfigure(BaseConfiguration.java:148)
at org.apache.logging.log4j.core.config.BaseConfiguration.start(BaseConfiguration.java:108)
at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:202)
at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:218)
at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:109)
at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:81)
at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:30)
at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:129)
What did I miss?
Many thanks in advance, all the best!
-Simo
[1] https://gist.github.com/3283384
http://people.apache.org/~simonetripodi/
http://simonetripodi.livejournal.com/
http://twitter.com/simonetripodi
http://www.99soft.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
Re: [2.X] Null object returned for root
Posted by Ralph Goers <ra...@dslextreme.com>.
Absolutely. Error handling in general probably needs attention.
Ralph
On Aug 7, 2012, at 9:04 AM, Scott Deboy wrote:
> Would be good to catch this and provide a more descriptive error in cases
> like this as well.
>
> On Tue, Aug 7, 2012 at 8:33 AM, Ralph Goers <ra...@dslextreme.com>wrote:
>
>> The configuration should work provided log.level is actually defined as a
>> system property. If you set the status directly to debug I suspect you
>> might see a bit more output. I am going to have to create a unit test with
>> this configuration and test it and I will get back to you asap.
>>
>> Ralph
>>
>>
>> On Aug 7, 2012, at 7:06 AM, Simone Tripodi wrote:
>>
>>> Hi Ralph!
>>>
>>> as mentioned in previous message, configuration file is on gist[1]
>>>
>>> many thanks in advance, all the best!!!
>>> -Simo
>>>
>>> [1] https://gist.github.com/3283384
>>>
>>> http://people.apache.org/~simonetripodi/
>>> http://simonetripodi.livejournal.com/
>>> http://twitter.com/simonetripodi
>>> http://www.99soft.org/
>>>
>>>
>>> On Tue, Aug 7, 2012 at 3:39 PM, Ralph Goers <rg...@apache.org> wrote:
>>>> Can you post your logging configuration file? This error usually means
>> it can't find a plugin for the object. That would be very odd for the root
>> logger.
>>>>
>>>> Ralph
>>>>
>>>> Sent from my iPad
>>>>
>>>> On Aug 7, 2012, at 1:46 AM, Simone Tripodi <si...@apache.org>
>> wrote:
>>>>
>>>>> Hi all mates!
>>>>>
>>>>> Congrats first for the 2.0 release - even if alpha, this is something
>>>>> we all ASF friends were waiting for! :)
>>>>>
>>>>> I am now trying to migrate a small app from slf4j+logback to log4j2
>>>>> and I should have not understood well how new stuff work because I
>>>>> obtain the error as in the subject.
>>>>>
>>>>> This is my new log4j2.xml[1] file and then I just use the APIs.
>>>>>
>>>>> When the app starts, I get the following stacktrace:
>>>>>
>>>>> Null object returned for root
>>>>> Exception in thread "main" java.lang.NullPointerException
>>>>> at
>> org.apache.logging.log4j.core.config.BaseConfiguration.createPluginObject(BaseConfiguration.java:589)
>>>>> at
>> org.apache.logging.log4j.core.config.BaseConfiguration.createConfiguration(BaseConfiguration.java:452)
>>>>> at
>> org.apache.logging.log4j.core.config.BaseConfiguration.doConfigure(BaseConfiguration.java:148)
>>>>> at
>> org.apache.logging.log4j.core.config.BaseConfiguration.start(BaseConfiguration.java:108)
>>>>> at
>> org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:202)
>>>>> at
>> org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:218)
>>>>> at
>> org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:109)
>>>>> at
>> org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:81)
>>>>> at
>> org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:30)
>>>>> at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:129)
>>>>>
>>>>> What did I miss?
>>>>>
>>>>> Many thanks in advance, all the best!
>>>>> -Simo
>>>>>
>>>>> [1] https://gist.github.com/3283384
>>>>>
>>>>> http://people.apache.org/~simonetripodi/
>>>>> http://simonetripodi.livejournal.com/
>>>>> http://twitter.com/simonetripodi
>>>>> http://www.99soft.org/
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>>>>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>>>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>>
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
Re: [2.X] Null object returned for root
Posted by Scott Deboy <sc...@gmail.com>.
Would be good to catch this and provide a more descriptive error in cases
like this as well.
On Tue, Aug 7, 2012 at 8:33 AM, Ralph Goers <ra...@dslextreme.com>wrote:
> The configuration should work provided log.level is actually defined as a
> system property. If you set the status directly to debug I suspect you
> might see a bit more output. I am going to have to create a unit test with
> this configuration and test it and I will get back to you asap.
>
> Ralph
>
>
> On Aug 7, 2012, at 7:06 AM, Simone Tripodi wrote:
>
> > Hi Ralph!
> >
> > as mentioned in previous message, configuration file is on gist[1]
> >
> > many thanks in advance, all the best!!!
> > -Simo
> >
> > [1] https://gist.github.com/3283384
> >
> > http://people.apache.org/~simonetripodi/
> > http://simonetripodi.livejournal.com/
> > http://twitter.com/simonetripodi
> > http://www.99soft.org/
> >
> >
> > On Tue, Aug 7, 2012 at 3:39 PM, Ralph Goers <rg...@apache.org> wrote:
> >> Can you post your logging configuration file? This error usually means
> it can't find a plugin for the object. That would be very odd for the root
> logger.
> >>
> >> Ralph
> >>
> >> Sent from my iPad
> >>
> >> On Aug 7, 2012, at 1:46 AM, Simone Tripodi <si...@apache.org>
> wrote:
> >>
> >>> Hi all mates!
> >>>
> >>> Congrats first for the 2.0 release - even if alpha, this is something
> >>> we all ASF friends were waiting for! :)
> >>>
> >>> I am now trying to migrate a small app from slf4j+logback to log4j2
> >>> and I should have not understood well how new stuff work because I
> >>> obtain the error as in the subject.
> >>>
> >>> This is my new log4j2.xml[1] file and then I just use the APIs.
> >>>
> >>> When the app starts, I get the following stacktrace:
> >>>
> >>> Null object returned for root
> >>> Exception in thread "main" java.lang.NullPointerException
> >>> at
> org.apache.logging.log4j.core.config.BaseConfiguration.createPluginObject(BaseConfiguration.java:589)
> >>> at
> org.apache.logging.log4j.core.config.BaseConfiguration.createConfiguration(BaseConfiguration.java:452)
> >>> at
> org.apache.logging.log4j.core.config.BaseConfiguration.doConfigure(BaseConfiguration.java:148)
> >>> at
> org.apache.logging.log4j.core.config.BaseConfiguration.start(BaseConfiguration.java:108)
> >>> at
> org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:202)
> >>> at
> org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:218)
> >>> at
> org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:109)
> >>> at
> org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:81)
> >>> at
> org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:30)
> >>> at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:129)
> >>>
> >>> What did I miss?
> >>>
> >>> Many thanks in advance, all the best!
> >>> -Simo
> >>>
> >>> [1] https://gist.github.com/3283384
> >>>
> >>> http://people.apache.org/~simonetripodi/
> >>> http://simonetripodi.livejournal.com/
> >>> http://twitter.com/simonetripodi
> >>> http://www.99soft.org/
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> >>> For additional commands, e-mail: log4j-user-help@logging.apache.org
> >>>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> >> For additional commands, e-mail: log4j-user-help@logging.apache.org
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>
Re: [2.X] Null object returned for root
Posted by Ralph Goers <ra...@dslextreme.com>.
The configuration should work provided log.level is actually defined as a system property. If you set the status directly to debug I suspect you might see a bit more output. I am going to have to create a unit test with this configuration and test it and I will get back to you asap.
Ralph
On Aug 7, 2012, at 7:06 AM, Simone Tripodi wrote:
> Hi Ralph!
>
> as mentioned in previous message, configuration file is on gist[1]
>
> many thanks in advance, all the best!!!
> -Simo
>
> [1] https://gist.github.com/3283384
>
> http://people.apache.org/~simonetripodi/
> http://simonetripodi.livejournal.com/
> http://twitter.com/simonetripodi
> http://www.99soft.org/
>
>
> On Tue, Aug 7, 2012 at 3:39 PM, Ralph Goers <rg...@apache.org> wrote:
>> Can you post your logging configuration file? This error usually means it can't find a plugin for the object. That would be very odd for the root logger.
>>
>> Ralph
>>
>> Sent from my iPad
>>
>> On Aug 7, 2012, at 1:46 AM, Simone Tripodi <si...@apache.org> wrote:
>>
>>> Hi all mates!
>>>
>>> Congrats first for the 2.0 release - even if alpha, this is something
>>> we all ASF friends were waiting for! :)
>>>
>>> I am now trying to migrate a small app from slf4j+logback to log4j2
>>> and I should have not understood well how new stuff work because I
>>> obtain the error as in the subject.
>>>
>>> This is my new log4j2.xml[1] file and then I just use the APIs.
>>>
>>> When the app starts, I get the following stacktrace:
>>>
>>> Null object returned for root
>>> Exception in thread "main" java.lang.NullPointerException
>>> at org.apache.logging.log4j.core.config.BaseConfiguration.createPluginObject(BaseConfiguration.java:589)
>>> at org.apache.logging.log4j.core.config.BaseConfiguration.createConfiguration(BaseConfiguration.java:452)
>>> at org.apache.logging.log4j.core.config.BaseConfiguration.doConfigure(BaseConfiguration.java:148)
>>> at org.apache.logging.log4j.core.config.BaseConfiguration.start(BaseConfiguration.java:108)
>>> at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:202)
>>> at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:218)
>>> at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:109)
>>> at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:81)
>>> at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:30)
>>> at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:129)
>>>
>>> What did I miss?
>>>
>>> Many thanks in advance, all the best!
>>> -Simo
>>>
>>> [1] https://gist.github.com/3283384
>>>
>>> http://people.apache.org/~simonetripodi/
>>> http://simonetripodi.livejournal.com/
>>> http://twitter.com/simonetripodi
>>> http://www.99soft.org/
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
Re: [2.X] Null object returned for root
Posted by Simone Tripodi <si...@apache.org>.
Hi Ralph!
as mentioned in previous message, configuration file is on gist[1]
many thanks in advance, all the best!!!
-Simo
[1] https://gist.github.com/3283384
http://people.apache.org/~simonetripodi/
http://simonetripodi.livejournal.com/
http://twitter.com/simonetripodi
http://www.99soft.org/
On Tue, Aug 7, 2012 at 3:39 PM, Ralph Goers <rg...@apache.org> wrote:
> Can you post your logging configuration file? This error usually means it can't find a plugin for the object. That would be very odd for the root logger.
>
> Ralph
>
> Sent from my iPad
>
> On Aug 7, 2012, at 1:46 AM, Simone Tripodi <si...@apache.org> wrote:
>
>> Hi all mates!
>>
>> Congrats first for the 2.0 release - even if alpha, this is something
>> we all ASF friends were waiting for! :)
>>
>> I am now trying to migrate a small app from slf4j+logback to log4j2
>> and I should have not understood well how new stuff work because I
>> obtain the error as in the subject.
>>
>> This is my new log4j2.xml[1] file and then I just use the APIs.
>>
>> When the app starts, I get the following stacktrace:
>>
>> Null object returned for root
>> Exception in thread "main" java.lang.NullPointerException
>> at org.apache.logging.log4j.core.config.BaseConfiguration.createPluginObject(BaseConfiguration.java:589)
>> at org.apache.logging.log4j.core.config.BaseConfiguration.createConfiguration(BaseConfiguration.java:452)
>> at org.apache.logging.log4j.core.config.BaseConfiguration.doConfigure(BaseConfiguration.java:148)
>> at org.apache.logging.log4j.core.config.BaseConfiguration.start(BaseConfiguration.java:108)
>> at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:202)
>> at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:218)
>> at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:109)
>> at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:81)
>> at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:30)
>> at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:129)
>>
>> What did I miss?
>>
>> Many thanks in advance, all the best!
>> -Simo
>>
>> [1] https://gist.github.com/3283384
>>
>> http://people.apache.org/~simonetripodi/
>> http://simonetripodi.livejournal.com/
>> http://twitter.com/simonetripodi
>> http://www.99soft.org/
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
Re: [2.X] Null object returned for root
Posted by Ralph Goers <rg...@apache.org>.
Can you post your logging configuration file? This error usually means it can't find a plugin for the object. That would be very odd for the root logger.
Ralph
Sent from my iPad
On Aug 7, 2012, at 1:46 AM, Simone Tripodi <si...@apache.org> wrote:
> Hi all mates!
>
> Congrats first for the 2.0 release - even if alpha, this is something
> we all ASF friends were waiting for! :)
>
> I am now trying to migrate a small app from slf4j+logback to log4j2
> and I should have not understood well how new stuff work because I
> obtain the error as in the subject.
>
> This is my new log4j2.xml[1] file and then I just use the APIs.
>
> When the app starts, I get the following stacktrace:
>
> Null object returned for root
> Exception in thread "main" java.lang.NullPointerException
> at org.apache.logging.log4j.core.config.BaseConfiguration.createPluginObject(BaseConfiguration.java:589)
> at org.apache.logging.log4j.core.config.BaseConfiguration.createConfiguration(BaseConfiguration.java:452)
> at org.apache.logging.log4j.core.config.BaseConfiguration.doConfigure(BaseConfiguration.java:148)
> at org.apache.logging.log4j.core.config.BaseConfiguration.start(BaseConfiguration.java:108)
> at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:202)
> at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:218)
> at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:109)
> at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:81)
> at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:30)
> at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:129)
>
> What did I miss?
>
> Many thanks in advance, all the best!
> -Simo
>
> [1] https://gist.github.com/3283384
>
> http://people.apache.org/~simonetripodi/
> http://simonetripodi.livejournal.com/
> http://twitter.com/simonetripodi
> http://www.99soft.org/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
Re: [2.X] Null object returned for root
Posted by Simone Tripodi <si...@apache.org>.
Cool, thanks to you Ralph!
I am going to rebuilt it locally and have a test session.
Have a nice day, all the best!
-Simo
http://people.apache.org/~simonetripodi/
http://simonetripodi.livejournal.com/
http://twitter.com/simonetripodi
http://www.99soft.org/
On Wed, Aug 8, 2012 at 6:31 AM, Ralph Goers <ra...@dslextreme.com> wrote:
> Thanks, Simone. I was able to reproduce the problem with the configuration you provided and I have committed a fix. I opened LOG4J2-65 in Jira for this. Please close the issue after you are able to verify the fix.
>
> Ralph
>
> On Aug 7, 2012, at 1:46 AM, Simone Tripodi wrote:
>
>> Hi all mates!
>>
>> Congrats first for the 2.0 release - even if alpha, this is something
>> we all ASF friends were waiting for! :)
>>
>> I am now trying to migrate a small app from slf4j+logback to log4j2
>> and I should have not understood well how new stuff work because I
>> obtain the error as in the subject.
>>
>> This is my new log4j2.xml[1] file and then I just use the APIs.
>>
>> When the app starts, I get the following stacktrace:
>>
>> Null object returned for root
>> Exception in thread "main" java.lang.NullPointerException
>> at org.apache.logging.log4j.core.config.BaseConfiguration.createPluginObject(BaseConfiguration.java:589)
>> at org.apache.logging.log4j.core.config.BaseConfiguration.createConfiguration(BaseConfiguration.java:452)
>> at org.apache.logging.log4j.core.config.BaseConfiguration.doConfigure(BaseConfiguration.java:148)
>> at org.apache.logging.log4j.core.config.BaseConfiguration.start(BaseConfiguration.java:108)
>> at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:202)
>> at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:218)
>> at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:109)
>> at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:81)
>> at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:30)
>> at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:129)
>>
>> What did I miss?
>>
>> Many thanks in advance, all the best!
>> -Simo
>>
>> [1] https://gist.github.com/3283384
>>
>> http://people.apache.org/~simonetripodi/
>> http://simonetripodi.livejournal.com/
>> http://twitter.com/simonetripodi
>> http://www.99soft.org/
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
Re: [2.X] Null object returned for root
Posted by Ralph Goers <ra...@dslextreme.com>.
Thanks, Simone. I was able to reproduce the problem with the configuration you provided and I have committed a fix. I opened LOG4J2-65 in Jira for this. Please close the issue after you are able to verify the fix.
Ralph
On Aug 7, 2012, at 1:46 AM, Simone Tripodi wrote:
> Hi all mates!
>
> Congrats first for the 2.0 release - even if alpha, this is something
> we all ASF friends were waiting for! :)
>
> I am now trying to migrate a small app from slf4j+logback to log4j2
> and I should have not understood well how new stuff work because I
> obtain the error as in the subject.
>
> This is my new log4j2.xml[1] file and then I just use the APIs.
>
> When the app starts, I get the following stacktrace:
>
> Null object returned for root
> Exception in thread "main" java.lang.NullPointerException
> at org.apache.logging.log4j.core.config.BaseConfiguration.createPluginObject(BaseConfiguration.java:589)
> at org.apache.logging.log4j.core.config.BaseConfiguration.createConfiguration(BaseConfiguration.java:452)
> at org.apache.logging.log4j.core.config.BaseConfiguration.doConfigure(BaseConfiguration.java:148)
> at org.apache.logging.log4j.core.config.BaseConfiguration.start(BaseConfiguration.java:108)
> at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:202)
> at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:218)
> at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:109)
> at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:81)
> at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:30)
> at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:129)
>
> What did I miss?
>
> Many thanks in advance, all the best!
> -Simo
>
> [1] https://gist.github.com/3283384
>
> http://people.apache.org/~simonetripodi/
> http://simonetripodi.livejournal.com/
> http://twitter.com/simonetripodi
> http://www.99soft.org/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org