Bug 32694 - java.io.FileNotFoundException on startup when antiResourceLocking="true" on default context
java.io.FileNotFoundException on startup when antiResourceLocking="true" on d...
Status: RESOLVED FIXED
Product: Tomcat 5
Classification: Unclassified
Component: Catalina
5.5.6
PC Windows 2000
: P2 normal (vote)
: ---
Assigned To: Tomcat Developers Mailing List
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2004-12-14 14:22 UTC by Dominik Drzewiecki
Modified: 2004-12-14 06:14 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dominik Drzewiecki 2004-12-14 14:22:41 UTC
After setting antiResourceLocking="true" in default conf/context.xml I get the
following on Tomcat startup (and each subsequent deployment).

2004-12-14 14:12:18 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
2004-12-14 14:12:18 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1704 ms
2004-12-14 14:12:18 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
2004-12-14 14:12:18 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.6
2004-12-14 14:12:18 org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
2004-12-14 14:12:19 org.apache.catalina.core.ApplicationContext log
INFO: org.apache.webapp.balancer.BalancerFilter: init(): ruleChain:
[org.apache.webapp.balancer.RuleChain:
[org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News /
Redirect URL: http://www.cnn.com],
[org.apache.webapp.balancer.rules.RequestParameterRule: Target param name:
paramName / Target param value: paramValue / Redirect URL:
http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule:
Redirect URL: http://jakarta.apache.org]]
java.io.FileNotFoundException: webapps\jsp-examples (System nie może odnaleźć
określonej ścieżki)
	at java.io.FileInputStream.open(Native Method)
	at java.io.FileInputStream.<init>(Unknown Source)
	at org.apache.catalina.startup.ExpandWar.copyInternal(ExpandWar.java:226)
	at org.apache.catalina.startup.ExpandWar.copy(ExpandWar.java:192)
	at org.apache.catalina.startup.ContextConfig.antiLocking(ContextConfig.java:878)
	at org.apache.catalina.startup.ContextConfig.beforeStart(ContextConfig.java:915)
	at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:251)
	at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:3871)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:907)
	at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:870)
	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1104)
	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
	at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1019)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1011)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:437)
	at org.apache.catalina.core.StandardService.start(StandardService.java:450)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:2010)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:537)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)
2004-12-14 14:12:20 org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
2004-12-14 14:12:20 org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
java.io.FileNotFoundException: webapps\ROOT (System nie mo&#380;e odnale&#378;&#263; okre&#347;lonej
&#347;cie&#380;ki)
	at java.io.FileInputStream.open(Native Method)
	at java.io.FileInputStream.<init>(Unknown Source)
	at org.apache.catalina.startup.ExpandWar.copyInternal(ExpandWar.java:226)
	at org.apache.catalina.startup.ExpandWar.copy(ExpandWar.java:192)
	at org.apache.catalina.startup.ContextConfig.antiLocking(ContextConfig.java:878)
	at org.apache.catalina.startup.ContextConfig.beforeStart(ContextConfig.java:915)
	at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:251)
	at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:3871)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:907)
	at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:870)
	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1104)
	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
	at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1019)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1011)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:437)
	at org.apache.catalina.core.StandardService.start(StandardService.java:450)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:2010)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:537)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)
java.io.FileNotFoundException: webapps\servlets-examples (System nie mo&#380;e
odnale&#378;&#263; okre&#347;lonej &#347;cie&#380;ki)
	at java.io.FileInputStream.open(Native Method)
	at java.io.FileInputStream.<init>(Unknown Source)
	at org.apache.catalina.startup.ExpandWar.copyInternal(ExpandWar.java:226)
	at org.apache.catalina.startup.ExpandWar.copy(ExpandWar.java:192)
	at org.apache.catalina.startup.ContextConfig.antiLocking(ContextConfig.java:878)
	at org.apache.catalina.startup.ContextConfig.beforeStart(ContextConfig.java:915)
	at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:251)
	at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:3871)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:907)
	at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:870)
	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1104)
	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
	at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1019)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1011)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:437)
	at org.apache.catalina.core.StandardService.start(StandardService.java:450)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:2010)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:537)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)
2004-12-14 14:12:20 org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
2004-12-14 14:12:20 org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
java.io.FileNotFoundException: webapps\tomcat-docs (System nie mo&#380;e odnale&#378;&#263;
okre&#347;lonej &#347;cie&#380;ki)
	at java.io.FileInputStream.open(Native Method)
	at java.io.FileInputStream.<init>(Unknown Source)
	at org.apache.catalina.startup.ExpandWar.copyInternal(ExpandWar.java:226)
	at org.apache.catalina.startup.ExpandWar.copy(ExpandWar.java:192)
	at org.apache.catalina.startup.ContextConfig.antiLocking(ContextConfig.java:878)
	at org.apache.catalina.startup.ContextConfig.beforeStart(ContextConfig.java:915)
	at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:251)
	at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:3871)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:907)
	at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:870)
	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1104)
	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
	at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1019)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1011)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:437)
	at org.apache.catalina.core.StandardService.start(StandardService.java:450)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:2010)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:537)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)
java.io.FileNotFoundException: webapps\webdav (System nie mo&#380;e odnale&#378;&#263;
okre&#347;lonej &#347;cie&#380;ki)
	at java.io.FileInputStream.open(Native Method)
	at java.io.FileInputStream.<init>(Unknown Source)
	at org.apache.catalina.startup.ExpandWar.copyInternal(ExpandWar.java:226)
	at org.apache.catalina.startup.ExpandWar.copy(ExpandWar.java:192)
	at org.apache.catalina.startup.ContextConfig.antiLocking(ContextConfig.java:878)
	at org.apache.catalina.startup.ContextConfig.beforeStart(ContextConfig.java:915)
	at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:251)
	at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:3871)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:907)
	at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:870)
	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1104)
	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
	at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1019)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1011)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:437)
	at org.apache.catalina.core.StandardService.start(StandardService.java:450)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:2010)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:537)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)
2004-12-14 14:12:21 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
2004-12-14 14:12:21 org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /0.0.0.0:8009
2004-12-14 14:12:21 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/47  config=null
2004-12-14 14:12:21 org.apache.catalina.startup.Catalina start
INFO: Server startup in 3531 ms

Besides, the antiResourceLocking has *NO* (Yes, I tried harder, Remy :P)
influence on deployed applications, apart from the exception being thrown.
Comment 1 Remy Maucherat 2004-12-14 14:58:54 UTC
There's a defect in the code which makes the path absolute in the antiLocking
method, which eventually causes the exception. You don't seem to like running
the VM from Tomcat's CATALINA_BASE path. But, it's cool, by doing unusual
things, you run into more issues.
Comment 2 Dominik Drzewiecki 2004-12-14 15:14:23 UTC
In this particular case Tomcat was run as an NT service by means provided by
Windoze installer. I have not applied any changes to what the installer had
placed on my FS. Nothing unusual IMHO.