Return-Path: Delivered-To: apmail-struts-dev-archive@www.apache.org Received: (qmail 33638 invoked from network); 21 Feb 2008 07:04:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 Feb 2008 07:04:11 -0000 Received: (qmail 8075 invoked by uid 500); 21 Feb 2008 07:03:59 -0000 Delivered-To: apmail-struts-dev-archive@struts.apache.org Received: (qmail 8019 invoked by uid 500); 21 Feb 2008 07:03:59 -0000 Mailing-List: contact dev-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Struts Developers List" Reply-To: "Struts Developers List" Delivered-To: mailing list dev@struts.apache.org Received: (qmail 8008 invoked by uid 99); 21 Feb 2008 07:03:59 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Feb 2008 23:03:59 -0800 X-ASF-Spam-Status: No, hits=3.2 required=10.0 tests=RCVD_IN_BL_SPAMCOP_NET,SPF_HELO_PASS,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [212.227.126.171] (HELO moutng.kundenserver.de) (212.227.126.171) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Feb 2008 07:03:13 +0000 Received: from AlsQ6600 ([217.171.129.76]) by mrelayeu.kundenserver.de (node=mrelayeu6) with ESMTP (Nemesis) id 0ML29c-1JS5Ss2HHe-0006hr; Thu, 21 Feb 2008 08:03:34 +0100 Message-ID: <23767564B0E44EB890A00AF9544A0FB0@AlsQ6600> From: "Al Sutton" To: "Struts Developers List" References: <7270d7cd0801200403s75914e43qf8c437ceead40447@mail.gmail.com> <7270d7cd0801230843m5fa6b82uec9a311983c27a16@mail.gmail.com> <7270d7cd0802191530h7c5b6b26t3eb4850bf9f27a43@mail.gmail.com> In-Reply-To: <7270d7cd0802191530h7c5b6b26t3eb4850bf9f27a43@mail.gmail.com> Subject: Re: [S2] - FilterDispatcher and ActionContextCleanup (WW-2240 FileUploadInterceptor causes null pointer exception) Date: Thu, 21 Feb 2008 07:03:24 -0000 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Windows Mail 6.0.6000.16480 X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6000.16545 X-Provags-ID: V01U2FsdGVkX18yoZJ/1jz7TTiovD4TDHc3AkOBtax5Tk/Xtgi G7ULAEFcoQX5fnNPIfVM5X79dwwLOo8sboOL9bbrM2+kYYVkVI hH7vdGSjfMJrJaku+9lsKLaPvlBbIs3hJBIfRsBIvI= X-Virus-Checked: Checked by ClamAV on apache.org Is this only a WebLogic issue (has anyone seen it in another container)?, if so is it purely a WL 10 issue?, is the problem fixed in WL 10.1? If it's only a WL issue I think that a temp patch is fine until BEA sort out whatever is causing it to occur. As a side note, rather than doing an isInfoEnabled check, wouldn't it be better to do the following before the loop; Locale loggingLocale; if( ActionContext.getContext() == null ) { loggingLocale = Locale.getDefault(); } else { loggingLocale = ActionContext.getContext().getLocale(); } and then in the loop do; LOG.info(getTextMessage("struts.messages.removing.file", new Object[]{inputValue, currentFile}, loggingLocale)); My reason for suggesting this is that with the current patch I would guess that info logging was enabled the NPE would still occurr, so we're basically saying that WL 10 users can't use info level logging or below, which seems a bit harsh. It also has the benefit of not having a conditional test in each loop iteration, which, as a bit of a performance freak, makes me happy. What do people think? Al. ----- Original Message ----- From: "Nils-Helge Garli Hegvik" To: "Struts Developers List" Sent: Tuesday, February 19, 2008 11:30 PM Subject: Re: [S2] - FilterDispatcher and ActionContextCleanup (WW-2240 FileUploadInterceptor causes null pointer exception) > Since we're getting close to a 2.1.1 release, I thought I should bring > this one up again. I'm still not sure what to do about this issue. I > committed a patch that is a temp work around, but the real issue has > not been resolved. > > https://issues.apache.org/struts/browse/WW-2240 > > Nils-H > > On Jan 23, 2008 5:43 PM, Nils-Helge Garli Hegvik wrote: >> I would really like a second opinion on this issue. Please let me know >> if something I wrote was unclear. >> >> Nils-H >> >> >> On Jan 20, 2008 1:03 PM, Nils-Helge Garli Hegvik >> wrote: >> > Hi! >> > >> > I've been debugging WW-2240 (had to install WebLogic 10 to reproduce >> > it) and have seen some strange behavior (at least I think so....) in >> > the ActionContext initialization and cleanup performed by the >> > FilterDispatcher. The problem is that the cleanup of the ActionContext >> > (ActionContext.setContext(null)) happens before the >> > FileUploadInterceptor is finished executing, so when a log statement >> > in the interceptor tries to access a value in the ActionContext, it >> > fails with an NPE. I think I've traced it down to this: >> > >> > In the FilterDispatcher a call to ActionContextCleanUp.cleanUp(req) is >> > invoked in the finally block. In ActionContextCleanup.cleanUp, the >> > request is checked for a COUNT request attribute to see if the context >> > should be cleaned up. And in this case, this attribute is always null, >> > since it's only set and incremented in ActionContextCleanUp.doFilter >> > (which in this case is not configured in web.xml). So it seems strange >> > to me that the FilterDispatcher tries to clean up the context when it >> > apparently does not keep track of if it should be cleaned or not >> > ("nested" invocation)? >> > >> > Is this an actual bug, or am I just overlooking something? >> > >> > I could only reproduce this in WebLogic 10. So it's apparently >> > container dependent how this is handled. >> > >> > Nils-H >> > >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org > For additional commands, e-mail: dev-help@struts.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org For additional commands, e-mail: dev-help@struts.apache.org