This issue is seeing in Tomcat 5.5.23 after startup the following exception is seeing: java.io.FileNotFoundException: <path removed for privacy>/tldCache.ser (No such file or directory) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.<init>(FileOutputStream.java:179) at java.io.FileOutputStream.<init>(FileOutputStream.java:131) at org.apache.catalina.startup.TldConfig.execute(TldConfig.java:317) at org.apache.catalina.core.StandardContext.processTlds(StandardContext.java:4307) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4144) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760) at org.apache.catalina.core.ContainerBase.access$000(ContainerBase.java:122) at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:144) at java.security.AccessController.doPrivileged(Native Method) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:738) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120) Note that JSPs are not being used. This exception doesn't happen when setting processTlds="false" in conf/context.xml but still occurs when setting it in a <context> defined in conf/server.xml, it won't work. The processTlds attribute should work in the <Context> in conf/server.xml also as seen here http://tomcat.apache.org/tomcat-5.5-doc/config/context.html (though not recommended)
5.5.x tries to write the TLD cache to the work directory. This gets created if ti doesn't exist. At a guess, I'd say the Tomcat process doesn't have the necessary permissions to create the work directory structure. Please follow up on the users list of you need more assistance.
There is a minor issue there: This exception in TldConfig.execute(), and also one in TldConfig.processCache(), are processed with ex.printStackTrace(); Something like log.warn("Failed to write tldCache.ser file", ex); would provide a better context for this message. This applies only to 5.5. In 6.0 the same code is also present, but it is never called (as tldCache is always null there), and thus can be removed instead of trying to fix it.
Created attachment 24918 [details] patch for TC 5.5 Patch for TC 5.5 that - logs TLD cache reading and writing errors - if reading a TLD cache fails continues TLD scanning, instead of quiting
Created attachment 24919 [details] patch for TC 6 Patch for TC 6.0 that removes code responsible for reading and writing the TLD cache file, because it is never called. (tldCache is always null)
Proposed the patches for 5.5 and 6.0.
This has been fixed in 6.0.x and will be included in 6.0.25 onwards.
This has been fixed in 5.5 in r948296 and will be in 5.5.30 onwards.