beehive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alejandro Ramirez (JIRA)" <...@beehive.apache.org>
Subject [jira] Closed: (BEEHIVE-830) NullPointerException when calling PageFlowUtils.getCurrentActionResolver(request)
Date Wed, 24 Aug 2005 16:37:09 GMT
     [ 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


Mime
View raw message