jQuery in Action, 2nd edition*
The moose likes Ant, Maven and Other Build Tools and the fly likes Ant could not deploy the web application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Ant could not deploy the web application" Watch "Ant could not deploy the web application" New topic
Author

Ant could not deploy the web application

Uma Bandaru
Ranch Hand

Joined: Jul 30, 2009
Posts: 31
I wrote a build file to create and deploy an application on Apache. I ran the build file and it copied all the required files into the webapps directory of Apache home, but when I ran the command: "ant list", I cannot see my application. All the other applications are running fine.Can any one please help?

The directory structure of my application in webapps is as follows:

Apache
webapps
springapp
web-inf
classes, lib, springapp-servlet.xml, web.xml

lib folder contains: commons-logging.jar, junit4.4.jar, spring.jar, spring-webmvc.jar






Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61436
    
  67

When you say "Apache" do you mean Apache (which cannot serve Servlet applications) or Tomcat (which can)?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Uma Bandaru
Ranch Hand

Joined: Jul 30, 2009
Posts: 31
Sorry, I meant Tomcat
Misha Ver
Ranch Hand

Joined: Mar 03, 2008
Posts: 470
What does "ant list" suppose to do? Check Tomcat log files after deployment.
Uma Bandaru
Ranch Hand

Joined: Jul 30, 2009
Posts: 31
"ant list" lists all the deployed applications on Tomcat. Basically I meant to say that my application is not deployed and I am not able to view the HTML or JSP pages. I was following the online SPRING tutorial (http://static.springsource.org/docs/Spring-MVC-step-by-step/part1.html) to develop a SPRING MVC application, but got stuck at the very beginning stage.
Misha Ver
Ranch Hand

Joined: Mar 03, 2008
Posts: 470
Did you checked Tomcat logs?
Uma Bandaru
Ranch Hand

Joined: Jul 30, 2009
Posts: 31
Yes. And I found this whole tirade of exceptions:

StandardHost[localhost]: ContainerBase.addChild: start:
LifecycleException: Context startup failed due to previous errors
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3701)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:777)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:760)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:538)
at org.apache.catalina.core.StandardHostDeployer.addChild(StandardHostDeployer.java:667)
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:597)
at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:216)
at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:217)
at org.apache.commons.digester.Rule.end(Rule.java:253)
at org.apache.commons.digester.Digester.endElement(Digester.java:1222)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:601)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1782)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2938)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
at org.apache.commons.digester.Digester.parse(Digester.java:1765)
at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:343)
at org.apache.catalina.core.StandardHost.install(StandardHost.java:762)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:443)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:377)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:808)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:335)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1156)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:697)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1148)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:311)
at org.apache.catalina.core.StandardService.start(StandardService.java:450)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:2213)
at org.apache.catalina.startup.Catalina.start(Catalina.java:484)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:371)
at org.apache.catalina.startup.Catalina.process(Catalina.java:134)
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:597)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:151)

2010-04-28 11:48:54 StandardHost[localhost]: Error deploying application at context path null
java.lang.IllegalStateException: ContainerBase.addChild: start: LifecycleException: Context startup failed due to previous errors
at org.apache.commons.digester.Digester.createSAXException(Digester.java:3181)
at org.apache.commons.digester.Digester.createSAXException(Digester.java:3207)
at org.apache.commons.digester.Digester.endElement(Digester.java:1225)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:601)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1782)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2938)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
at org.apache.commons.digester.Digester.parse(Digester.java:1765)
at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:343)
at org.apache.catalina.core.StandardHost.install(StandardHost.java:762)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:443)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:377)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:808)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:335)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1156)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:697)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1148)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:311)
at org.apache.catalina.core.StandardService.start(StandardService.java:450)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:2213)
at org.apache.catalina.startup.Catalina.start(Catalina.java:484)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:371)
at org.apache.catalina.startup.Catalina.process(Catalina.java:134)
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:597)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:151)
Caused by: java.lang.IllegalStateException: ContainerBase.addChild: start: LifecycleException: Context startup failed due to previous errors
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:781)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:760)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:538)
at org.apache.catalina.core.StandardHostDeployer.addChild(StandardHostDeployer.java:667)
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:597)
at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:216)
at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:217)
at org.apache.commons.digester.Rule.end(Rule.java:253)
at org.apache.commons.digester.Digester.endElement(Digester.java:1222)
... 32 more

2010-04-28 11:48:54 HostConfig[localhost] Error deploying configuration descriptor admin.xml
java.io.IOException: java.lang.IllegalStateException: ContainerBase.addChild: start: LifecycleException: Context startup failed due to previous errors
at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:349)
at org.apache.catalina.core.StandardHost.install(StandardHost.java:762)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:443)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:377)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:808)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:335)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1156)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:697)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1148)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:311)
at org.apache.catalina.core.StandardService.start(StandardService.java:450)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:2213)
at org.apache.catalina.startup.Catalina.start(Catalina.java:484)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:371)
at org.apache.catalina.startup.Catalina.process(Catalina.java:134)
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:597)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:151)

2010-04-28 11:48:54 HostConfig[localhost]: Deploying configuration descriptor manager.xml
2010-04-28 11:48:54 WebappLoader[/manager]: Deploying class repositories to work directory E:\Uma\apache\work\Standalone\localhost\manager
2010-04-28 11:48:54 ContextConfig[/manager]: Configured an authenticator for method BASIC
2010-04-28 11:48:54 StandardManager[/manager]: Seeding random number generator class java.security.SecureRandom
2010-04-28 11:48:54 StandardManager[/manager]: Seeding of random number generator has been completed
2010-04-28 11:48:54 StandardWrapper[/manager:default]: Loading container servlet default
2010-04-28 11:48:54 StandardWrapper[/manager:invoker]: Loading container servlet invoker
2010-04-28 11:48:55 HostConfig[localhost]: Expanding web application archive springapp.war
2010-04-28 11:48:55 StandardHost[localhost]: Installing web application at context path /springapp from URL file:E:/Uma/apache/bin/../webapps/springapp
2010-04-28 11:48:55 WebappLoader[/springapp]: Deploying class repositories to work directory E:\Uma\apache\work\Standalone\localhost\springapp
2010-04-28 11:48:55 WebappLoader[/springapp]: Deploy class files /WEB-INF/classes to E:\Uma\apache\bin\..\webapps\springapp\WEB-INF\classes
2010-04-28 11:48:55 WebappLoader[/springapp]: Deploy JAR /WEB-INF/lib/commons-logging.jar to E:\Uma\apache\bin\..\webapps\springapp\WEB-INF\lib\commons-logging.jar
2010-04-28 11:48:55 WebappLoader[/springapp]: Deploy JAR /WEB-INF/lib/junit-4.4.jar to E:\Uma\apache\bin\..\webapps\springapp\WEB-INF\lib\junit-4.4.jar
2010-04-28 11:48:55 WebappLoader[/springapp]: Deploy JAR /WEB-INF/lib/spring-webmvc.jar to E:\Uma\apache\bin\..\webapps\springapp\WEB-INF\lib\spring-webmvc.jar
2010-04-28 11:48:55 WebappLoader[/springapp]: Deploy JAR /WEB-INF/lib/spring.jar to E:\Uma\apache\bin\..\webapps\springapp\WEB-INF\lib\spring.jar
2010-04-28 11:48:55 ContextConfig[/springapp] Required temporary directory $CATALINA_BASE/temp is missing
javax.servlet.ServletException: Required temporary directory $CATALINA_BASE/temp is missing
at org.apache.catalina.startup.ContextConfig.tldScanJar(ContextConfig.java:890)
at org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.java:827)
at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:605)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:184)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3644)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:777)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:760)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:538)
at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:265)
at org.apache.catalina.core.StandardHost.install(StandardHost.java:731)
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:582)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:378)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:808)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:335)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1156)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:697)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1148)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:311)
at org.apache.catalina.core.StandardService.start(StandardService.java:450)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:2213)
at org.apache.catalina.startup.Catalina.start(Catalina.java:484)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:371)
at org.apache.catalina.startup.Catalina.process(Catalina.java:134)
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:597)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:151)
----- Root Cause -----
java.io.IOException: The system cannot find the path specified
at java.io.WinNTFileSystem.createFileExclusively(Native Method)
at java.io.File.checkAndCreate(File.java:1704)
at java.io.File.createTempFile(File.java:1792)
at java.io.File.createTempFile(File.java:1828)
at sun.net.www.protocol.jar.URLJarFile$1.run(URLJarFile.java:204)
at java.security.AccessController.doPrivileged(Native Method)
at sun.net.www.protocol.jar.URLJarFile.retrieve(URLJarFile.java:198)
at sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:50)
at sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:80)
at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:104)
at sun.net.www.protocol.jar.JarURLConnection.getJarFile(JarURLConnection.java:71)
at org.apache.catalina.startup.ContextConfig.tldScanJar(ContextConfig.java:865)
at org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.java:827)
at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:605)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:184)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3644)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:777)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:760)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:538)
at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:265)
at org.apache.catalina.core.StandardHost.install(StandardHost.java:731)
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:582)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:378)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:808)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:335)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1156)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:697)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1148)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:311)
at org.apache.catalina.core.StandardService.start(StandardService.java:450)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:2213)
at org.apache.catalina.startup.Catalina.start(Catalina.java:484)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:371)
at org.apache.catalina.startup.Catalina.process(Catalina.java:134)
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:597)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:151)

2010-04-28 11:48:55 ContextConfig[/springapp]: Marking this application unavailable due to previous error(s)
2010-04-28 11:48:55 StandardManager[/springapp]: Seeding random number generator class java.security.SecureRandom
2010-04-28 11:48:55 StandardManager[/springapp]: Seeding of random number generator has been completed
2010-04-28 11:48:55 StandardContext[/springapp]: Context startup failed due to previous errors
2010-04-28 11:48:55 StandardHost[localhost]: ContainerBase.addChild: start:
LifecycleException: Context startup failed due to previous errors
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3701)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:777)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:760)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:538)
at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:265)
at org.apache.catalina.core.StandardHost.install(StandardHost.java:731)
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:582)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:378)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:808)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:335)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1156)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:697)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1148)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:311)
at org.apache.catalina.core.StandardService.start(StandardService.java:450)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:2213)
at org.apache.catalina.startup.Catalina.start(Catalina.java:484)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:371)
at org.apache.catalina.startup.Catalina.process(Catalina.java:134)
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:597)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:151)

2010-04-28 11:48:55 StandardHost[localhost]: Error deploying application at context path /springapp
java.lang.IllegalStateException: ContainerBase.addChild: start: LifecycleException: Context startup failed due to previous errors
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:781)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:760)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:538)
at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:265)
at org.apache.catalina.core.StandardHost.install(StandardHost.java:731)
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:582)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:378)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:808)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:335)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1156)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:697)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1148)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:311)
at org.apache.catalina.core.StandardService.start(StandardService.java:450)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:2213)
at org.apache.catalina.startup.Catalina.start(Catalina.java:484)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:371)
at org.apache.catalina.startup.Catalina.process(Catalina.java:134)
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:597)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:151)

2010-04-28 11:48:55 HostConfig[localhost] Exception while expanding web application archive springapp.war
java.io.IOException: java.lang.IllegalStateException: ContainerBase.addChild: start: LifecycleException: Context startup failed due to previous errors
at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:270)
at org.apache.catalina.core.StandardHost.install(StandardHost.java:731)
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:582)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:378)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:808)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:335)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1156)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:697)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1148)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:311)
at org.apache.catalina.core.StandardService.start(StandardService.java:450)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:2213)
at org.apache.catalina.startup.Catalina.start(Catalina.java:484)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:371)
at org.apache.catalina.startup.Catalina.process(Catalina.java:134)
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:597)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:151)

2010-04-28 11:48:55 HostConfig[localhost]: Deploying web application directory Beerv1
2010-04-28 11:48:55 StandardHost[localhost]: Installing web application at context path /Beerv1 from URL file:E:\Uma\apache\webapps\Beerv1
2010-04-28 11:48:55 WebappLoader[/Beerv1]: Deploying class repositories to work directory E:\Uma\apache\work\Standalone\localhost\Beerv1
2010-04-28 11:48:55 WebappLoader[/Beerv1]: Deploy class files /WEB-INF/classes to E:\Uma\apache\webapps\Beerv1\WEB-INF\classes
2010-04-28 11:48:55 StandardManager[/Beerv1]: Seeding random number generator class java.security.SecureRandom
2010-04-28 11:48:55 StandardManager[/Beerv1]: Seeding of random number generator has been completed
2010-04-28 11:48:55 StandardWrapper[/Beerv1:default]: Loading container servlet default
2010-04-28 11:48:55 StandardWrapper[/Beerv1:invoker]: Loading container servlet invoker
2010-04-28 11:48:55 HostConfig[localhost]: Deploying web application directory myclinic
2010-04-28 11:48:55 StandardHost[localhost]: Installing web application at context path /myclinic from URL file:E:\Uma\apache\webapps\myclinic
2010-04-28 11:48:55 WebappLoader[/myclinic]: Deploying class repositories to work directory E:\Uma\apache\work\Standalone\localhost\myclinic
2010-04-28 11:48:55 WebappLoader[/myclinic]: Deploy class files /WEB-INF/classes to E:\Uma\apache\webapps\myclinic\WEB-INF\classes
2010-04-28 11:48:55 StandardManager[/myclinic]: Seeding random number generator class java.security.SecureRandom
2010-04-28 11:48:55 StandardManager[/myclinic]: Seeding of random number generator has been completed
2010-04-28 11:48:55 StandardWrapper[/myclinic:default]: Loading container servlet default
2010-04-28 11:48:55 StandardWrapper[/myclinic:invoker]: Loading container servlet invoker
2010-04-28 11:48:55 HostConfig[localhost]: Deploying web application directory springapp
2010-04-28 11:48:55 StandardHost[localhost]: Installing web application at context path /springapp from URL file:E:\Uma\apache\webapps\springapp
2010-04-28 11:48:55 WebappLoader[/springapp]: Deploying class repositories to work directory E:\Uma\apache\work\Standalone\localhost\springapp
2010-04-28 11:48:55 WebappLoader[/springapp]: Deploy class files /WEB-INF/classes to E:\Uma\apache\webapps\springapp\WEB-INF\classes
2010-04-28 11:48:55 WebappLoader[/springapp]: Deploy JAR /WEB-INF/lib/commons-logging.jar to E:\Uma\apache\webapps\springapp\WEB-INF\lib\commons-logging.jar
2010-04-28 11:48:55 WebappLoader[/springapp]: Deploy JAR /WEB-INF/lib/junit-4.4.jar to E:\Uma\apache\webapps\springapp\WEB-INF\lib\junit-4.4.jar
2010-04-28 11:48:55 WebappLoader[/springapp]: Deploy JAR /WEB-INF/lib/spring-webmvc.jar to E:\Uma\apache\webapps\springapp\WEB-INF\lib\spring-webmvc.jar
2010-04-28 11:48:55 WebappLoader[/springapp]: Deploy JAR /WEB-INF/lib/spring.jar to E:\Uma\apache\webapps\springapp\WEB-INF\lib\spring.jar
2010-04-28 11:48:55 ContextConfig[/springapp] Required temporary directory $CATALINA_BASE/temp is missing
javax.servlet.ServletException: Required temporary directory $CATALINA_BASE/temp is missing
at org.apache.catalina.startup.ContextConfig.tldScanJar(ContextConfig.java:890)
at org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.java:827)
at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:605)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:184)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3644)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:777)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:760)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:538)
at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:265)
at org.apache.catalina.core.StandardHost.install(StandardHost.java:731)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:649)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:379)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:808)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:335)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1156)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:697)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1148)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:311)
at org.apache.catalina.core.StandardService.start(StandardService.java:450)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:2213)
at org.apache.catalina.startup.Catalina.start(Catalina.java:484)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:371)
at org.apache.catalina.startup.Catalina.process(Catalina.java:134)
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:597)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:151)
----- Root Cause -----
java.io.IOException: The system cannot find the path specified
at java.io.WinNTFileSystem.createFileExclusively(Native Method)
at java.io.File.checkAndCreate(File.java:1704)
at java.io.File.createTempFile(File.java:1792)
at java.io.File.createTempFile(File.java:1828)
at sun.net.www.protocol.jar.URLJarFile$1.run(URLJarFile.java:204)
at java.security.AccessController.doPrivileged(Native Method)
at sun.net.www.protocol.jar.URLJarFile.retrieve(URLJarFile.java:198)
at sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:50)
at sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:80)
at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:104)
at sun.net.www.protocol.jar.JarURLConnection.getJarFile(JarURLConnection.java:71)
at org.apache.catalina.startup.ContextConfig.tldScanJar(ContextConfig.java:865)
at org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.java:827)
at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:605)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:184)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3644)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:777)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:760)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:538)
at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:265)
at org.apache.catalina.core.StandardHost.install(StandardHost.java:731)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:649)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:379)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:808)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:335)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1156)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:697)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1148)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:311)
at org.apache.catalina.core.StandardService.start(StandardService.java:450)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:2213)
at org.apache.catalina.startup.Catalina.start(Catalina.java:484)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:371)
at org.apache.catalina.startup.Catalina.process(Catalina.java:134)
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:597)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:151)

2010-04-28 11:48:55 ContextConfig[/springapp]: Marking this application unavailable due to previous error(s)
2010-04-28 11:48:55 StandardManager[/springapp]: Seeding random number generator class java.security.SecureRandom
2010-04-28 11:48:55 StandardManager[/springapp]: Seeding of random number generator has been completed
2010-04-28 11:48:55 StandardContext[/springapp]: Context startup failed due to previous errors
2010-04-28 11:48:55 StandardHost[localhost]: ContainerBase.addChild: start:
LifecycleException: Context startup failed due to previous errors
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3701)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:777)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:760)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:538)
at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:265)
at org.apache.catalina.core.StandardHost.install(StandardHost.java:731)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:649)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:379)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:808)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:335)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1156)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:697)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1148)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:311)
at org.apache.catalina.core.StandardService.start(StandardService.java:450)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:2213)
at org.apache.catalina.startup.Catalina.start(Catalina.java:484)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:371)
at org.apache.catalina.startup.Catalina.process(Catalina.java:134)
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:597)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:151)

2010-04-28 11:48:55 StandardHost[localhost]: Error deploying application at context path /springapp
java.lang.IllegalStateException: ContainerBase.addChild: start: LifecycleException: Context startup failed due to previous errors
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:781)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:760)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:538)
at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:265)
at org.apache.catalina.core.StandardHost.install(StandardHost.java:731)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:649)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:379)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:808)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:335)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1156)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:697)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1148)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:311)
at org.apache.catalina.core.StandardService.start(StandardService.java:450)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:2213)
at org.apache.catalina.startup.Catalina.start(Catalina.java:484)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:371)
at org.apache.catalina.startup.Catalina.process(Catalina.java:134)
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:597)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:151)

2010-04-28 11:48:55 HostConfig[localhost] Error deploying web application directory springapp
java.io.IOException: java.lang.IllegalStateException: ContainerBase.addChild: start: LifecycleException: Context startup failed due to previous errors
at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:270)
at org.apache.catalina.core.StandardHost.install(StandardHost.java:731)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:649)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:379)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:808)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:335)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1156)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:697)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1148)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:311)
at org.apache.catalina.core.StandardService.start(StandardService.java:450)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:2213)
at org.apache.catalina.startup.Catalina.start(Catalina.java:484)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:371)
at org.apache.catalina.startup.Catalina.process(Catalina.java:134)
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:597)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:151)

2010-04-28 11:48:55 HostConfig[localhost]: Deploying web application directory tomcat-docs
2010-04-28 11:48:55 StandardHost[localhost]: Installing web application at context path /tomcat-docs from URL file:E:\Uma\apache\webapps\tomcat-docs
2010-04-28 11:48:55 WebappLoader[/tomcat-docs]: Deploying class repositories to work directory E:\Uma\apache\work\Standalone\localhost\tomcat-docs
2010-04-28 11:48:55 StandardManager[/tomcat-docs]: Seeding random number generator class java.security.SecureRandom
2010-04-28 11:48:55 StandardManager[/tomcat-docs]: Seeding of random number generator has been completed
2010-04-28 11:48:55 StandardWrapper[/tomcat-docs:default]: Loading container servlet default
2010-04-28 11:48:55 StandardWrapper[/tomcat-docs:invoker]: Loading container servlet invoker
2010-04-28 11:48:55 HostConfig[localhost]: Deploying web application directory webdav
2010-04-28 11:48:55 StandardHost[localhost]: Installing web application at context path /webdav from URL file:E:\Uma\apache\webapps\webdav
2010-04-28 11:48:55 WebappLoader[/webdav]: Deploying class repositories to work directory E:\Uma\apache\work\Standalone\localhost\webdav
2010-04-28 11:48:55 StandardManager[/webdav]: Seeding random number generator class java.security.SecureRandom
2010-04-28 11:48:55 StandardManager[/webdav]: Seeding of random number generator has been completed
2010-04-28 11:48:55 StandardWrapper[/webdav:default]: Loading container servlet default
2010-04-28 11:48:55 StandardWrapper[/webdav:invoker]: Loading container servlet invoker
2010-04-28 11:50:18 StandardWrapper[/manager:Manager]: Loading container servlet Manager
2010-04-28 11:50:18 Manager: init: Associated with Deployer 'localhost'
2010-04-28 11:50:18 Manager: init: Global resources are available
2010-04-28 11:50:18 Manager: restart: Reloading web application at '/springapp'
2010-04-28 11:50:23 Manager: list: Listing contexts for virtual host 'localhost'
Misha Ver
Ranch Hand

Joined: Mar 03, 2008
Posts: 470
Please use code tags in the future. As for your application, you know the errors and it is time to troubleshoot. I'm not sure what is your exact goal - learning ANT, Tomcat, just deploying an application. In any case simplify your deployment - uninstall unnecessary applications, make a simple app, deploy it without ANT and then gradually increase complexity.
Uma Bandaru
Ranch Hand

Joined: Jul 30, 2009
Posts: 31
Problem is solved. I created a "temp" directory inside my $APACHE_HOME directory and it solved the problem. Thanks a lot for your helpful advice.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Ant could not deploy the web application