Return-Path: Delivered-To: apmail-myfaces-users-archive@www.apache.org Received: (qmail 81648 invoked from network); 4 Apr 2011 06:57:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 4 Apr 2011 06:57:53 -0000 Received: (qmail 60772 invoked by uid 500); 4 Apr 2011 06:57:52 -0000 Delivered-To: apmail-myfaces-users-archive@myfaces.apache.org Received: (qmail 60740 invoked by uid 500); 4 Apr 2011 06:57:51 -0000 Mailing-List: contact users-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Discussion" Delivered-To: mailing list users@myfaces.apache.org Received: (qmail 60731 invoked by uid 99); 4 Apr 2011 06:57:49 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Apr 2011 06:57:49 +0000 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests=FREEMAIL_FROM,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of lists@nabble.com designates 216.139.236.26 as permitted sender) Received: from [216.139.236.26] (HELO sam.nabble.com) (216.139.236.26) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Apr 2011 06:57:41 +0000 Received: from isper.nabble.com ([192.168.236.156]) by sam.nabble.com with esmtp (Exim 4.69) (envelope-from ) id 1Q6diy-00012L-Gk for users@myfaces.apache.org; Sun, 03 Apr 2011 23:57:20 -0700 Message-ID: <31311811.post@talk.nabble.com> Date: Sun, 3 Apr 2011 23:57:20 -0700 (PDT) From: Jhoanna To: users@myfaces.apache.org Subject: [Trinidad] NullPointerException when calling returnFromDialog MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: Jhoanna.Lao@osr.nsw.gov.au X-Virus-Checked: Checked by ClamAV on apache.org Hi, I have a window that opens another window which then opens another window (Window 3). When I'm trying to call returnFromDialog from Window 3, it sometimes throws a NullPointerException on this line: java.lang.NullPointerException at org.apache.myfaces.trinidadinternal.context.PageFlowScopeMap.discard(PageFlowScopeMap.java:341) at org.apache.myfaces.trinidadinternal.context.PageFlowScopeProviderImpl.popPageFlowScope(PageFlowScopeProviderImpl.java:106) at org.apache.myfaces.trinidadinternal.context.RequestContextImpl.returnFromDialog(RequestContextImpl.java:125) The NullPointerException is being thrown from this line: _sharedData._parent._sharedData._children.removeOldEntry(childToken, storeMap); because the children attribute is null. I tried to debug the code and whenever I have my breakpoint on this line, I am able to replicate this exception. What I have found so far is that the returnFromDialog creates a new request to close the window. This new request is setting the children attribute to null in the getToken() method. Whenever the children attribute is nulled before the removeOldEntry is called from the discard() method, I get the NullPointerException. Is this a JSF bug or is there something I'm doing wrong with the dialogs? I am currently using Trinidad 1.2.7. Regards, Jhoanna -- View this message in context: http://old.nabble.com/-Trinidad--NullPointerException-when-calling-returnFromDialog-tp31311811p31311811.html Sent from the MyFaces - Users mailing list archive at Nabble.com.