TomcatExpert

Apache Tomcat fails to start with HTTP 404 error

posted by SpringSource on October 28, 2009 12:10 PM

The cause for an HTTP 404 error in Tomcat.

Tomcat fails to start and return a 404 error. Java stack trace shows:

2005-03-06 13:09:16 WebappLoader[/examples]: Deploying class repositories to work directory /opt/covalent/ers2.4/servers/production/work/Standalone/localhost/examples
2005-03-06 13:09:16 WebappLoader[/examples]: Deploy JAR /WEB-INF/lib/sample.jar to /opt/production/web/app/WEB-INF/lib/sample.jar
2005-03-06 13:09:16 ContextConfig[/examples] Exception processing JAR at resource path /WEB-INF/lib/sample.jar javax.servlet.ServletException:
Exception processing JAR at resource path /WEB-INF/lib/sample.jar
at org.apache.catalina.startup.ContextConfig.tldScanJar(ContextConfig.java: 930) at
org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.java: 868) at
org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:647)  at
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:243) at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)  at
org.apache.catalina.core.StandardContext.start(StandardContext.java: 3568) at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)  at
org.apache.catalina.core.StandardHost.start(StandardHost.java:738)  at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)  at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347)  at
org.apache.catalina.core.StandardService.start(StandardService.java: 497) at
org.apache.catalina.core.StandardServer.start(StandardServer.java:2190)
at org.apache.catalina.startup.Catalina.start(Catalina.java:512)  at
org.apache.catalina.startup.Catalina.execute(Catalina.java:400)  at
org.apache.catalina.startup.Catalina.process(Catalina.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)  at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
----- Root Cause ----- java.io.IOException: Permission denied
at java.io.UnixFileSystem.createFileExclusively(Native Method)
at java.io.File.checkAndCreate(File.java:1314)
at java.io.File.createTempFile(File.java:1402)
at java.io.File.createTempFile(File.java:1439)
at sun.net.www.protocol.jar.URLJarFile$1.run(URLJarFile.java:169)
at java.security.AccessController.doPrivileged(Native Method)
at sun.net.www.protocol.jar.URLJarFile.retrieve(URLJarFile.java:164)
....

The failure happens in creating temporary file. Check the ownership and permissions on the temporary directory to ensure it has proper permission for Tomcat to create temporary files.

For more than 10 years, SpringSource employees have been supporting Apache technologies, with unparalleled experience and commitment to the Apache Software Foundation. More than 400 of the Fortune 500 count on SpringSource to support their mission-critical business applications. Leaders of the Apache Software Foundation, including Board Members, work at SpringSource and dedicate a significant amount of time further developing the Apache Tomcat open source project. Over the last 2 years, 95% of the issues fixed in the Apache Tomcat project were fixed by SpringSource engineers. For more information on how SpringSource can help your enterprise, see the SpringSource website, or call 800/444-1935.

Comments

Post new comment

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.