简体   繁体   中英

Quartz scheduler Not Working after exception [java.lang.IllegalStateException: HttpSession is invalid]

I am currently working with Quartz scheduler in my web application to schedule a task after running the server and then repeat it in regular interval.
The process running fine in my development server but when deployed to production, it is good but sometimes when some exception occurred it stops working. I don't know whether the exception occured because of this scheduling process or there is something else.
The exception always occurred just before 2-3 minutes when scheduling should start.

Here is the stack trace.

java.lang.IllegalStateException: HttpSession is invalid
    at weblogic.servlet.internal.session.SessionData.getInternalAttribute(SessionData.java:690)
    at weblogic.servlet.internal.session.SessionData.getInternalAttribute(SessionData.java:685)
    at weblogic.servlet.internal.session.JDBCSessionData.dbRefresh(JDBCSessionData.java:428)
    at weblogic.servlet.internal.session.JDBCSessionData.getFromDB(JDBCSessionData.java:102)
    at weblogic.servlet.internal.session.JDBCSessionContext.getSessionDataFromDB(JDBCSessionContext.java:240)
    at weblogic.servlet.internal.session.JDBCSessionContext.getSessionInternal(JDBCSessionContext.java:220)
    at weblogic.servlet.internal.session.SessionContext$SessionInvalidator.cleanupExpiredSessions(SessionContext.java:938)
    at weblogic.servlet.internal.session.SessionContext$SessionInvalidator$1.run(SessionContext.java:894)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
    at weblogic.servlet.internal.session.SessionContext$SessionInvalidator.timerExpired(SessionContext.java:888)
    at weblogic.timers.internal.TimerImpl.run(TimerImpl.java:273)
    at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)

anyway I am using WebLogic application server on both development and production.

之所以会发生这种情况,是因为您尝试从会话中读取内容时会话无效。您可以在这里做的一件事是检查配置文件中的会话超时条目,很可能您需要增加会话超时值。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM