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 "Casazza, Robert" <Ro...@transamerica.com> on 2014/03/21 02:01:02 UTC

Race Condition for ${web:contextPath} ?

Hi,

I'm having problems narrowing it down, but there seems to be a race condition of some sort while using ${web:

More often than not, it appears that the LoggerContext lc getExternalContext() is null in the WebLookup getServletContext() method.

Running on tomcat 7.0.52, decided to initialize log4j2 in the web.xml while debugging. I haven't narrowed down the cause nor a workaround.

Strangely, every so often the Lookup resolves correctly.

Is there a workaround? Have you seen this behavior?

Thanks,
Bob


________________________________

CONFIDENTIALITY NOTICE
This transmission is intended for the sole use of the individual and/or entity to whom it is addressed, and may contain information and/or attachments that are privileged, confidential and exempt from disclosure under applicable law. If the reader of this transmission is not the intended recipient, you are hereby notified that any disclosure, dissemination, distribution, duplication or the taking of any action in reliance on the contents of this transmission by someone other than the intended addressee or its designated agent is strictly prohibited. If your receipt of this transmission is in error, please notify the sender by replying immediately to this transmission and destroying the transmission. For your protection, do not include Social Security numbers, passwords or other non-public and personal information in your email. Thank you.

RE: Race Condition for ${web:contextPath} ?

Posted by "Casazza, Robert" <Ro...@transamerica.com>.
Hi Ralph,

I did see the Jira about that particular bug / fix. Unfortunately I am using 2.0-rc1 and am having this problem.

I'm trying to narrow down, come up with a small example if I can.



-----Original Message-----
From: ralph.goers @dslextreme.com [mailto:ralph.goers@dslextreme.com] On Behalf Of Ralph Goers
Sent: Thursday, March 20, 2014 10:45 PM
To: Log4J Users List
Subject: Re: Race Condition for ${web:contextPath} ?

Are you using 2.0-rc1?  I fixed a bug that might be the same problem.

Ralph

> On Mar 20, 2014, at 6:01 PM, "Casazza, Robert" <Ro...@transamerica.com> wrote:
>
>
> Hi,
>
> I'm having problems narrowing it down, but there seems to be a race condition of some sort while using ${web:
>
> More often than not, it appears that the LoggerContext lc getExternalContext() is null in the WebLookup getServletContext() method.
>
> Running on tomcat 7.0.52, decided to initialize log4j2 in the web.xml while debugging. I haven't narrowed down the cause nor a workaround.
>
> Strangely, every so often the Lookup resolves correctly.
>
> Is there a workaround? Have you seen this behavior?
>
> Thanks,
> Bob
>
>
> ________________________________
>
> CONFIDENTIALITY NOTICE
> This transmission is intended for the sole use of the individual and/or entity to whom it is addressed, and may contain information and/or attachments that are privileged, confidential and exempt from disclosure under applicable law. If the reader of this transmission is not the intended recipient, you are hereby notified that any disclosure, dissemination, distribution, duplication or the taking of any action in reliance on the contents of this transmission by someone other than the intended addressee or its designated agent is strictly prohibited. If your receipt of this transmission is in error, please notify the sender by replying immediately to this transmission and destroying the transmission. For your protection, do not include Social Security numbers, passwords or other non-public and personal information in your email. Thank you.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org



________________________________

CONFIDENTIALITY NOTICE
This transmission is intended for the sole use of the individual and/or entity to whom it is addressed, and may contain information and/or attachments that are privileged, confidential and exempt from disclosure under applicable law. If the reader of this transmission is not the intended recipient, you are hereby notified that any disclosure, dissemination, distribution, duplication or the taking of any action in reliance on the contents of this transmission by someone other than the intended addressee or its designated agent is strictly prohibited. If your receipt of this transmission is in error, please notify the sender by replying immediately to this transmission and destroying the transmission. For your protection, do not include Social Security numbers, passwords or other non-public and personal information in your email. Thank you.



---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: Race Condition for ${web:contextPath} ?

Posted by Ralph Goers <rg...@apache.org>.
Are you using 2.0-rc1?  I fixed a bug that might be the same problem.

Ralph

> On Mar 20, 2014, at 6:01 PM, "Casazza, Robert" <Ro...@transamerica.com> wrote:
> 
> 
> Hi,
> 
> I'm having problems narrowing it down, but there seems to be a race condition of some sort while using ${web:
> 
> More often than not, it appears that the LoggerContext lc getExternalContext() is null in the WebLookup getServletContext() method.
> 
> Running on tomcat 7.0.52, decided to initialize log4j2 in the web.xml while debugging. I haven't narrowed down the cause nor a workaround.
> 
> Strangely, every so often the Lookup resolves correctly.
> 
> Is there a workaround? Have you seen this behavior?
> 
> Thanks,
> Bob
> 
> 
> ________________________________
> 
> CONFIDENTIALITY NOTICE
> This transmission is intended for the sole use of the individual and/or entity to whom it is addressed, and may contain information and/or attachments that are privileged, confidential and exempt from disclosure under applicable law. If the reader of this transmission is not the intended recipient, you are hereby notified that any disclosure, dissemination, distribution, duplication or the taking of any action in reliance on the contents of this transmission by someone other than the intended addressee or its designated agent is strictly prohibited. If your receipt of this transmission is in error, please notify the sender by replying immediately to this transmission and destroying the transmission. For your protection, do not include Social Security numbers, passwords or other non-public and personal information in your email. Thank you.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org