Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Struts 2 »

Is anything related to time?

liukaipeng

2006-12-17


I construct a web app using struts2 and spring (struts2-core-2.0.2-SNAPSHOT-20061216.jar and
struts2-spring-plugin-2.0.2-SNAPSHOT-20061216.jar). When I switch page quickly by following
links pointed to struts actions, I get the following error:

========
ERROR - ClosingUIBean.start(62) | Could not open template
java.lang.NullPointerException
at org.apache.struts2.components.Form.evaluateExtraParamsServletRequest (Form.java:270)
at org.apache.struts2.components.Form.populateComponentHtmlId (Form.java:224)
at org.apache.struts2.components.UIBean.evaluateParams (UIBean.java:737)
at org.apache.struts2.components.ClosingUIBean.start (ClosingUIBean.java:58)
at org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag (ComponentTagSupport.java:54)
at org.apache.jsp.login_jsp._jspx_meth_s_form_0(login_jsp.java:260)
at org.apache.jsp.login_jsp._jspx_meth_s_if_0(login_jsp.java:206)
at org.apache.jsp.login_jsp._jspService(login_jsp.java:105)
at org.apache.jasper.runtime.HttpJspBase.service (HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service (HttpServlet.java:802)  
....
========

But if I pause a minute after coming to a page, then click the link, it works fine.

I followed into the code, it seems that in the method "evaluateExtraParamsServletRequest"
of the form class, with the following code:
  try {
    Class clazz = ObjectFactory.getObjectFactory().getClassInstance(actionConfig.getClassName());
    addParameter("actionClass", clazz);
  }
 ...
that ObjectFactory.getObjectFactory() returns a null reference.

I'm quite confused by this. Anyone can give me a hint?





liukaipeng
2006-12-17


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.