You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@beehive.apache.org by "Alejandro Ramirez (JIRA)" <de...@beehive.apache.org> on 2005/08/24 18:06:11 UTC

[jira] Assigned: (BEEHIVE-830) NullPointerException when calling PageFlowUtils.getCurrentActionResolver(request)

     [ http://issues.apache.org/jira/browse/BEEHIVE-830?page=all ]

Alejandro Ramirez reassigned BEEHIVE-830:
-----------------------------------------

    Assign To: Alejandro Ramirez

> 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