I am trying to deploy a web app as the ROOT application for Tomcat 7.0.35, 
running on Ubuntu 12 with Amazon EC2.

1) When I use auto-deploy using the Tomcat Deployer 'deploy' ant task (just 
downloaded the most recent version of the TCD libs) to a non-ROOT context name, 
such as /360Site, everything works as expected - war file is uploaded, 
decompressed to directory, and is immediately available.

2) When I use the manager HTML interface to upload the ROOT.war file by 
clicking the 'Select WAR file to upload' and then clicking 'deploy', everything 
works as expected.

However, 3) When I do exactly the same thing as #1 (tomcat auto deploy) but 
just change the 'path' variable from /360Store to /ROOT, here is what happens:
* WAR file appears in the webapps directory, but does not get expanded.
* The webapp is not running (I get a blank page when I go to the URL in the 
browser)
* I can go into the HTML manager page and click the 'start' button, and the 
webapp does successfully start (tested the URL in the browser), but the WAR 
file still does not get unpacked into a directory.
* I see these entries in the catalina.<date>.log

> Dec 26, 2013 7:22:49 PM org.apache.catalina.startup.HostConfig deployWAR
> INFO: Deploying web application archive /var/lib/tomcat7/webapps/ROOT.war
> Dec 26, 2013 7:22:49 PM org.apache.catalina.startup.ContextConfig init
> SEVERE: Exception fixing docBase for context []
> java.util.zip.ZipException: error in opening zip file
>         at java.util.zip.ZipFile.open(Native Method)
>         at java.util.zip.ZipFile.<init>(ZipFile.java:214)
>         at java.util.zip.ZipFile.<init>(ZipFile.java:144)
>         at java.util.jar.JarFile.<init>(JarFile.java:153)
>         at java.util.jar.JarFile.<init>(JarFile.java:90)
>         at sun.net.www.protocol.jar.URLJarFile.<init>(URLJarFile.java:93)
>         at sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:69)
>         at sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:88)
>         at 
> sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:122)
>         at 
> sun.net.www.protocol.jar.JarURLConnection.getJarFile(JarURLConnection.java:89)
>         at org.apache.catalina.startup.ExpandWar.expand(ExpandWar.java:113)
>         at 
> org.apache.catalina.startup.ContextConfig.fixDocBase(ContextConfig.java:720)
>         at 
> org.apache.catalina.startup.ContextConfig.init(ContextConfig.java:843)
>         at 
> org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:387)
>         at 
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
>         at 
> org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
>         at 
> org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:402)
>         at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:110)
>         at 
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139)
>         at 
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
>         at 
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
>         at 
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
>         at 
> org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:977)
>         at 
> org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1655)
>         at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
>         at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:166)
>         at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>         at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>         at java.lang.Thread.run(Thread.java:722)
> 
> Dec 26, 2013 7:22:49 PM org.apache.catalina.core.StandardContext 
> resourcesStart
> SEVERE: Error starting static Resources
> java.lang.IllegalArgumentException: Invalid or unreadable WAR file : error in 
> opening zip file
>         at 
> org.apache.naming.resources.WARDirContext.setDocBase(WARDirContext.java:138)
>         at 
> org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4912)
>         at 
> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5092)
>         at 
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>         at 
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
>         at 
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
>         at 
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
>         at 
> org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:977)
>         at 
> org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1655)
>         at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
>         at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:166)
>         at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>         at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>         at java.lang.Thread.run(Thread.java:722)
> 
> Dec 26, 2013 7:22:49 PM org.apache.catalina.core.StandardContext startInternal
> SEVERE: Error in resourceStart()
> Dec 26, 2013 7:22:49 PM org.apache.catalina.core.StandardContext startInternal
> SEVERE: Error getConfigured
> Dec 26, 2013 7:22:49 PM org.apache.catalina.core.StandardContext startInternal
> SEVERE: Context [] startup failed due to previous errors
> Dec 26, 2013 7:22:59 PM org.apache.catalina.startup.HostConfig 
> deleteRedeployResources
> INFO: Undeploying context []
> Dec 26, 2013 7:22:59 PM org.apache.catalina.startup.HostConfig deployWAR
> INFO: Deploying web application archive /var/lib/tomcat7/webapps/ROOT.war
> Dec 26, 2013 7:22:59 PM org.apache.catalina.startup.ContextConfig init
> SEVERE: Exception fixing docBase for context []
> java.util.zip.ZipException: error in opening zip file
>         at java.util.zip.ZipFile.open(Native Method)
>         at java.util.zip.ZipFile.<init>(ZipFile.java:214)
>         at java.util.zip.ZipFile.<init>(ZipFile.java:144)
>         at java.util.jar.JarFile.<init>(JarFile.java:153)
>         at java.util.jar.JarFile.<init>(JarFile.java:90)
>         at sun.net.www.protocol.jar.URLJarFile.<init>(URLJarFile.java:93)
>         at sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:69)
>         at sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:88)
>         at 
> sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:122)
>         at 
> sun.net.www.protocol.jar.JarURLConnection.getJarFile(JarURLConnection.java:89)
>         at org.apache.catalina.startup.ExpandWar.expand(ExpandWar.java:113)
>         at 
> org.apache.catalina.startup.ContextConfig.fixDocBase(ContextConfig.java:720)
>         at 
> org.apache.catalina.startup.ContextConfig.init(ContextConfig.java:843)
>         at 
> org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:387)
>         at 
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
>         at 
> org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
>         at 
> org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:402)
>         at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:110)
>         at 
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139)
>         at 
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
>         at 
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
>         at 
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
>         at 
> org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:977)
>         at 
> org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1655)
>         at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
>         at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:166)
>         at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>         at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>         at java.lang.Thread.run(Thread.java:722)
> 
> Dec 26, 2013 7:22:59 PM org.apache.catalina.core.StandardContext 
> resourcesStart
> SEVERE: Error starting static Resources
> java.lang.IllegalArgumentException: Invalid or unreadable WAR file : error in 
> opening zip file
>         at 
> org.apache.naming.resources.WARDirContext.setDocBase(WARDirContext.java:138)
>         at 
> org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4912)
>         at 
> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5092)
>         at 
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>         at 
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
>         at 
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
>         at 
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
>         at 
> org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:977)
>         at 
> org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1655)
>         at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
>         at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:166)
>         at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>         at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>         at java.lang.Thread.run(Thread.java:722)
> 
> Dec 26, 2013 7:22:59 PM org.apache.catalina.core.StandardContext startInternal
> SEVERE: Error in resourceStart()
> Dec 26, 2013 7:22:59 PM org.apache.catalina.core.StandardContext startInternal
> SEVERE: Error getConfigured
> Dec 26, 2013 7:22:59 PM org.apache.catalina.core.StandardContext startInternal
> SEVERE: Context [] startup failed due to previous errors
> Dec 26, 2013 7:23:02 PM org.apache.catalina.startup.HostConfig deployWAR
> INFO: Deploying web application archive /var/lib/tomcat7/webapps/ROOT.war
> Dec 26, 2013 7:23:02 PM org.apache.catalina.startup.HostConfig deployWAR
> SEVERE: Error deploying web application archive 
> /var/lib/tomcat7/webapps/ROOT.war
> java.lang.IllegalArgumentException: addChild:  Child name '' is not unique
>         at 
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:887)
>         at 
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
>         at 
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
>         at 
> org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:977)
>         at 
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:542)
>         at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1462)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:601)
>         at 
> org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
>         at 
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
>         at 
> com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:792)
>         at 
> org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1445)
>         at 
> org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:677)
>         at 
> org.apache.catalina.manager.ManagerServlet.doPut(ManagerServlet.java:435)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
>         at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
>         at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>         at 
> org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
>         at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
>         at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>         at 
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
>         at 
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
>         at 
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:581)
>         at 
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
>         at 
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
>         at 
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
>         at 
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
>         at 
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
>         at 
> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
>         at 
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
>         at 
> org.apache.tomcat.util.net.AprEndpoint$SocketWithOptionsProcessor.run(AprEndpoint.java:1780)
>         at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>         at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>         at java.lang.Thread.run(Thread.java:722)
> 


Doing the exact same thing to a different server running Tomcat 6.0.24 works 
correctly as expected.

Any ideas here? Here is what I've ruled out so far:
* I don't think it's a file permission issue (webapps directory has permissions 
777, and everything works fine when run through the manager HTML interface).
* The "Child name '' is not unique" sounded promising, but I could not find any 
duplicate ROOT webapps - there is no ROOT.war file or directory in the webapps 
directory prior to running the auto-deploy; there is no ROOT.xml file in the 
conf/Catalina/localhost directory, nor are there any context elements defined 
in the server.xml file.
* I don't think that the .war file is corrupt - I can manually unzip the .war 
file in the webapps from the command line using the 'unzip' command, and as I 
pointed out in #2 above, everything works fine when it is uploaded using the 
manager HTML interface.


--Jesse Barnum, President, 360Works
http://www.360works.com
Product updates and news on http://facebook.com/360Works
(770) 234-9293
== Don't lose your data! http://360works.com/safetynet/ for FileMaker Server ==

Reply via email to