beehive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xibin Zeng (JIRA)" <beehive-...@incubator.apache.org>
Subject [jira] Created: (BEEHIVE-830) NullPointerException when calling PageFlowUtils.getCurrentActionResolver(request)
Date Tue, 21 Jun 2005 23:22:17 GMT
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


Mime
View raw message