Trying to upgrade to the new version of tomcat 9.0.8 and usign embedded tomcat. A call to invalidate session throws the below error May 18, 2018 1:13:12 PM org.apache.catalina.session.PersistentManagerBase removeSession SEVERE: Exception removing session Unable to delete file [/home/XXXXXXX/work/Tomcat/localhost/./CD38458F0A1E23F44031D95AF3CFA7BB.session] which is no longer required java.io.IOException: Unable to delete file [/home/XXXXXXX/work/Tomcat/localhost/./CD38458F0A1E23F44031D95AF3CFA7BB.session] which is no longer required at org.apache.catalina.session.FileStore.remove(FileStore.java:269) at org.apache.catalina.session.PersistentManagerBase.removeSession(PersistentManagerBase.java:598) at org.apache.catalina.session.PersistentManagerBase.remove(PersistentManagerBase.java:576) at org.apache.catalina.session.StandardSession.expire(StandardSession.java:827) at org.apache.catalina.session.StandardSession.expire(StandardSession.java:743) at org.apache.catalina.session.StandardSession.invalidate(StandardSession.java:1229) at org.apache.catalina.session.StandardSessionFacade.invalidate(StandardSessionFacade.java:171) This happens every time session.invalidate() is called . is there any workaround for this issue?
I have noticed that this issue is occurring only when a FileStore is configured for the PersistentManager. I could easily replicate the issue just by adding a FileStore.
This works without any Exceptions for me with a clean build from trunk. There have been no relevant changes in this area since the 9.0.8 tag. It looks like a permissions issue. The users list is the place to obtain further help with that.
Ah. I take that back. It is a timing issue. If the session is invalidated before it is persisted then you'll see the Exception.
Fixed in trunk for 9.0.9 onwards.
Thanks for the quick update. When can we expect the latest version 9.0.9 to be released?
9.0.x is on a roughly monthly release cycle with releases generally happening in the second week of the month.