找不到Liferay 7会话

时间:2019-12-11 12:45:51

标签: liferay liferay-7

我使用了liferay-session-overrid.js,当用户不活跃时,我会AuthenticatedSessionManagerUtil.logout (httpRequest, httpResponse) 但是有时会出现这样的错误,即找不到会话 我可以解决这个问题吗?
很少这样做,但仍然是一个问题。
当我尝试对过滤器request.getSession()

进行操作时,出现错误
    2019-12-11 20:29:32.704 INFO  [default task-7][PreLogoutAction:19] PreLogoutAction was executed!
    2019-12-11 20:29:32.705 INFO  [default task-7][PreLogoutAction:20] User is empty
    2019-12-11 20:29:32.773 INFO  [default task-23][PreLogoutAction:19] PreLogoutAction was executed!
    2019-12-11 20:29:32.779 INFO  [default task-23][PreLogoutAction:20] User is empty
    2019-12-11 20:29:32.840 ERROR [default task-14][VirtualHostFilter:375] javax.servlet.ServletException: Unable to execute request
    javax.servlet.ServletException: Unable to execute request
            at com.liferay.portal.monitoring.internal.servlet.filter.MonitoringFilter.processFilter(MonitoringFilter.java:204)
 2019-12-11 20:29:32.844 ERROR [default task-14][RestoringCartFilter:62] java.lang.IllegalStateException: UT000010: Session not found ojlT9glxtyQEXskve3QxttVXcsVbrkI86VojtnBc
    java.lang.IllegalStateException: UT000010: Session not found ojlT9glxtyQEXskve3QxttVXcsVbrkI86VojtnBc
            at io.undertow.server.session.InMemorySessionManager$SessionImpl.getAttribute(InMem

1 个答案:

答案 0 :(得分:1)

您无法控制。始终有可能服务器上不存在会话。可能是因为您的脚本太迟,或者是因为您以未检测到的其他方式删除了会话。您必须考虑到这种可能性,并处理前端方面的错误。