2014-8-14 13:43:43 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet [action] in context with path [] threw exception [java.lang.NullPointerException] with root cause
java.lang.NullPointerException
at org.quickupstart.struts.action.LoginValidateAction.execute(LoginValidateAction.java:33)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.quickupstart.common.EncodingFileter.doFilter(EncodingFileter.java:43)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
应用在本地跑没有一点问题,部署到服务器,一触发功能后台就抛这个异常,但是前台也没有报HTTP 500错误,功能运行正常。
异常里说的33行报红指针,代码如下:
HttpSession session = request.getSession(false); String validate_code = session.getAttribute("code").toString();//这个是33行
用log4j也可以输出值。已经晕了!抓狂中........................
HUH函数
跃然一笑
BIG阳
慕标琳琳
相关分类