I get a stacktrace now and then. See below. 9-nov-2004 21:28:15 org.apache.catalina.core.StandardContext backgroundProcess WARNING: Unable to perform background process on manager java.lang.NullPointerException at org.apache.catalina.session.FileStore.keys(FileStore.java:217) at org.apache.catalina.session.StoreBase.processExpires(StoreBase.java: 207) at org.apache.catalina.session.PersistentManagerBase. backgroundProcess(PersistentManagerBase.java:227) at org.apache.catalina.core.StandardContext. backgroundProcess(StandardContext.java:4647) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor. processChildren(ContainerBase.java:1619) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor. processChildren(ContainerBase.java:1628) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor. processChildren(ContainerBase.java:1628) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor. run(ContainerBase.java:1608) at java.lang.Thread.run(Thread.java:534)
I think the problem was, that I emptied my tomcat\work directory. The method FileStore.directory() does not check if the directory still exists when returning a (cached) File object to it.
If you delete a directory that Tomcat created, you're responsible for re- creating it. If we add a check for this we'd have to do the same for every directory. Change your script or actions to remove work/*, not work itself. The keys method already checks for a null directory. I added a check for a null or empty file list in that directory. That should cover us. (Done for 5.0.30)
Done for 5.5.5 as well. Thanks for bringing this to our attention.