2 my123spring my123spring 于 2013.06.14 18:46 提问

tomcat运行时session错误
2013-6-14 9:42:32 org.apache.catalina.core.ContainerBase backgroundProcess
警告: Exception processing manager org.apache.catalina.session.StandardManager@1402d5a background process
java.lang.NullPointerException
    at com.tiancom.pas.common.framework.context.SessionContainer.valueUnbound(SessionContainer.java:41)
    at org.apache.catalina.session.StandardSession.removeAttributeInternal(StandardSession.java:1654)
    at org.apache.catalina.session.StandardSession.expire(StandardSession.java:756)
    at org.apache.catalina.session.StandardSession.isValid(StandardSession.java:592)
    at org.apache.catalina.session.ManagerBase.processExpires(ManagerBase.java:680)
    at org.apache.catalina.session.ManagerBase.backgroundProcess(ManagerBase.java:665)
    at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1316)
    at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)
    at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
    at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
    at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590)
    at java.lang.Thread.run(Thread.java:619)

错误信息如上,个人猜测有可能与session登录超时有关,求指导。

1个回答

my123spring
my123spring   2013.06.14 19:07

参考了下这个帖子

发现我这的代码中HttpSessionBindingListener的子类代码如下:

public void valueUnbound(HttpSessionBindingEvent event) { 
    System.out.println("User:"+loginUser.getUserName()+" Being unbound...");
    this.setLoginUser( null ); //直接把loginuser对象赋值null
}

如果按帖子内容修改,如何修改?

my123spring
my123spring 突然明白,是把这个接口从HttpSessionBindingListener改成HttpSessionListener,然后实现sessionDestroyed();
4 年多之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!