Return-Path: Delivered-To: apmail-incubator-beehive-dev-archive@www.apache.org Received: (qmail 22347 invoked from network); 21 Jun 2005 23:22:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 21 Jun 2005 23:22:21 -0000 Received: (qmail 59796 invoked by uid 500); 21 Jun 2005 23:22:20 -0000 Delivered-To: apmail-incubator-beehive-dev-archive@incubator.apache.org Received: (qmail 59438 invoked by uid 500); 21 Jun 2005 23:22:19 -0000 Mailing-List: contact beehive-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Beehive Developers" Delivered-To: mailing list beehive-dev@incubator.apache.org Received: (qmail 59421 invoked by uid 99); 21 Jun 2005 23:22:18 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= 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; Tue, 21 Jun 2005 16:22:18 -0700 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id B69A916 for ; Wed, 22 Jun 2005 01:22:17 +0200 (CEST) Message-ID: <1556444443.1119396137746.JavaMail.jira@ajax.apache.org> Date: Wed, 22 Jun 2005 01:22:17 +0200 (CEST) From: "Xibin Zeng (JIRA)" To: beehive-dev@incubator.apache.org Subject: [jira] Created: (BEEHIVE-830) NullPointerException when calling PageFlowUtils.getCurrentActionResolver(request) Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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 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