'Error while deploying application in tomcat 7
Hi I am getting the following error while deplying application in tomcat:
Jul 25, 2013 5:04:43 PM org.apache.catalina.deploy.NamingResources cleanUp
WARNING: Failed to retrieve JNDI naming context for container [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/oms-inter-web]] so no cleanup was performed for that container
javax.naming.NameNotFoundException: Name [comp/env] is not bound in this Context. Unable to find [comp].
at org.apache.naming.NamingContext.lookup(NamingContext.java:820)
at org.apache.naming.NamingContext.lookup(NamingContext.java:168)
at org.apache.catalina.deploy.NamingResources.cleanUp(NamingResources.java:988)
at org.apache.catalina.deploy.NamingResources.stopInternal(NamingResources.java:970)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5494)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:160)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1595)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1585)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Any help will be appreciated.
Solution 1:[1]
it may be because of previous applications are not properly undeployed from tomcat container.
Stop the tomcat, and then
go to the tomcat conf directory /<Tomcat root>/conf/Catalina/localhost
and clean the xml files in that directory. and restart the tomcat
Note: 1. make a backup of those xml files before deleting, so that if this not works then you can restore it.
To do the same in Netbeans IDE
In Netbeans menu go to Window->Services , In the listed Services expand Servers->->web applications-> right click on each application and choose Undeploy
Note: the tomcat need to be in running condition for this
Solution 2:[2]
I had exact the same problem and because Eclipse Tomcat was using the same working directory as Tomcat standalone I cannot started the standalone Tomcat properly. The solution was to change the Eclipse-Tomcat Config - Arguments - Working directory to something different than Tomcat/webapps.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | |
Solution 2 |