Return-Path: Delivered-To: apmail-beehive-dev-archive@www.apache.org Received: (qmail 36532 invoked from network); 24 Aug 2005 16:37:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 24 Aug 2005 16:37:11 -0000 Received: (qmail 42079 invoked by uid 500); 24 Aug 2005 16:37:11 -0000 Delivered-To: apmail-beehive-dev-archive@beehive.apache.org Received: (qmail 42057 invoked by uid 500); 24 Aug 2005 16:37:10 -0000 Mailing-List: contact dev-help@beehive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Beehive Developers" Delivered-To: mailing list dev@beehive.apache.org Received: (qmail 42037 invoked by uid 99); 24 Aug 2005 16:37:10 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=SPF_FAIL X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Aug 2005 09:37:10 -0700 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id 22FC1127 for ; Wed, 24 Aug 2005 18:37:09 +0200 (CEST) Message-ID: <1817086235.1124901429141.JavaMail.jira@ajax.apache.org> Date: Wed, 24 Aug 2005 18:37:09 +0200 (CEST) From: "Alejandro Ramirez (JIRA)" To: dev@beehive.apache.org Subject: [jira] Closed: (BEEHIVE-830) NullPointerException when calling PageFlowUtils.getCurrentActionResolver(request) Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/BEEHIVE-830?page=all ] Alejandro Ramirez closed BEEHIVE-830: ------------------------------------- Verified fixed with beehive distribution synced to SVN Revision: 233368 Executed repro steps and the user no longer gets the null pointer exception. Furthermore, the jsp code snipplet works and the user sees: ActionResolver is Controller@1d18084 > NullPointerException when calling PageFlowUtils.getCurrentActionResolver(request) > --------------------------------------------------------------------------------- > > Key: BEEHIVE-830 > URL: http://issues.apache.org/jira/browse/BEEHIVE-830 > Project: Beehive > Type: Bug > Components: NetUI > Versions: v1m1 > Environment: Windows > Reporter: Xibin Zeng > Assignee: Alejandro Ramirez > Fix For: V1 > > Calling the following code snippet from a jsp: > <% > request.getSession().invalidate(); > Object o = org.apache.beehive.netui.pageflow.PageFlowUtils.getCurrentActionResolver(request); > System.out.println ("ActionResolver is " + o); > %> > Yield the following result: > HTTP Status 500 - > type Exception report > message > description The server encountered an internal error () that prevented it from fulfilling this request. > exception > org.apache.jasper.JasperException > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:372) > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) > javax.servlet.http.HttpServlet.service(HttpServlet.java:802) > root cause > java.lang.NullPointerException > org.apache.beehive.netui.pageflow.handler.Handlers.get(Handlers.java:61) > org.apache.beehive.netui.pageflow.PageFlowUtils.getCurrentActionResolver(PageFlowUtils.java:251) > org.apache.jsp.hello.hello_jsp._jspService(hello_jsp.java:99) > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) > javax.servlet.http.HttpServlet.service(HttpServlet.java:802) > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324) > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) > javax.servlet.http.HttpServlet.service(HttpServlet.java:802) > note The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs. > This is due to internally how Beehive obtain ServletContext through a HttpServletRequest. The solution seems to be to let calling code supply the ServletContext object rather than trying to manage it in the Beehive code. Client should call the version that takes a ServletContext whenever possible. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira