Caused by: java.io.NotSerializableException: org.mortbay.jetty.servlet.HashSessionManager
异常的原因:
public class ViewReportPage extends IasrsWebPage {
private HttpSession session;
private static final String pattern="yyyy-MM-dd";
public ViewReportPage() {
session = getWebRequestCycle().getWebRequest().getHttpServletRequest().getSession();
}
}
这样就会发生上面的异常。先private HttpSession session;在方法的外部定义,然后在构造方法里面再赋值,就出现异常。
应该改成
public class ViewReportPage extends IasrsWebPage {
//private HttpSession session;
private static final String pattern="yyyy-MM-dd";
public ViewReportPage() {
HttpSession session = getWebRequestCycle().getWebRequest().getHttpServletRequest().getSession();
}
}
这样就搞定啦!!