
Are you getting below exception while running Spring MVC Project in Eclipse?
Tomcat 7 is not starting when a web application(with a servlet) is attempted to run. The server works well when I only have a html page. But when I try to add a servlet and add it to tomcat.
Then the server does not start and gives an error saying “Tomcat 7 didn’t start in 45 seconds”.
I increased the timeout but nothing happened. Well – here is a quick tip to solve it.
SEVERE: A child container failed during start java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/CrunchifySpringMVC]] at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222) at java.util.concurrent.FutureTask.get(FutureTask.java:83) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123) at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:800) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) at java.lang.Thread.run(Thread.java:680)
Try coping commons-logging.jar
file to WEB-INF/lib
folder.

You can download it from here.
If you have Maven Project
then just add this to your pom.xml
file.
<dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> <version>1.2</version> </dependency>
Once adding jar file to WEB-INF/lib folder follow below steps:

Hi,
can someone help me? i’ve this error:
I added commons-logging-1.2 but it didn’t help me.
Hi there – this looks like an issue with your project
spring-mvc-demo
.Could you please try cleaning up your project?
Maven clean install
.Hi,
Currently I am lost in this issue. please help!
when running on tomcat server.Please help
Hi Riyama – seems like your Jar file is corrupted. Try running
maven clean install
again.I hope this tutorial will help: https://crunchify.com/cannot-be-read-or-is-not-a-valid-zip-file-how-to-fix-maven-build-path-error-with-corrupted-jar-file/
i have done the above process but still i’m getting same error
Hi Ravip – what error are you getting? Please make sure your jar files are not corrupted and you perform Eclipse clean project one more time.
Hi Praveen – can you try checking your code? Something related to your URL Patter and controler code.
Let me know what you find.
Thank you so much, you solved my problem 😉
You are welcome Andrea. Happy to help.
Hi, I’m still facing the same issue.
Hi there – I saw below error in log.
Caused by: java.lang.IllegalArgumentException: java.util.zip.ZipException: invalid LOC header (bad signature). Seems like one of your jar file is corrupted.
Try cleaning your project and exception may go away.
Hi Guys after adding the commons logging jar and switching the location in the tomcat server still getting the below issue:STACKTRACE::::
Hi Arko – would you be able to zip it and send me your project. I couldn’t found required information in above stack trace.
hi..it is correct solution .add jar commons-logging.
thank you.
Yup. Thanks for ack.
Hi..
after including common-loggings.jar file
Right click on server,then go to properties ,then go to general, and switch location
this might help you!!!!
This switch location did the wonder for me, Thanks Komal.What is this switch location actually does?
Hi All,
Someone please comment on this issue http://stackoverflow. com/questions/35523664/java-util-concurrent-executionexception-org-apache-catalina-lifecycleexception? It looks like issue is same, but this links suggestions did not worked…
Hi, I’m still facing the same issue although commons-logging-1.1.1.jar is present. Please guide me.
Regards,
Savani
Hi Savani – could you please share detailed exception stack trace? Would like to see internal errors – may be caused by some other environment issue.
hello I have the same error using eclipse neon, tomcat 9
Hi All,
I’m really frustrated in solving below error. Could anyone please guide me?
Hi There – it seems you are getting this error because of SHA1 digest error and OAEPEncoding. Are you getting any compile time error? If not – somehow your crypto package may have some dependency which is not resolvable at runtime.
Try cleaning your project and maven update if it’s maven based project. Hope that helps.
hi AppShah –
Can you tell me your email id, I am facing the similar kind off issue and m not able to debug it, ill mail you my project….can you please resolve me this issue
Hi Shrey – can you please fill out this form with your details? https://crunchify.com/contact/. Once I’ll reply you can attach your project to that.
Raul, this works, but I don’t know why.
Yeah. This worked without any issue. Thank you App.
If you add jars in tomcat’s lib folder you can see this error
i’m not sure if this is related but we shouldn’t touch tomcat’s lib folder and library 🙂
I had the same problem, can you please help regarding the following stack trace? my server says starting but never starts, I have waited 166 minutes for it (after increasing the timeout)
Jan 24, 2015 10:39:59 AM org.apache.catalina.core.AprLifecycleListener init
Hi Aritra – It seems some issue with servlets named [connect] and [zulu] are both mapped to the url-pattern [/connect] which is not permitted. It would be very hard to debug remotely but if you could export and send project via email then I would be able to take a look deeper.
Hi App Shah, I added all required jars to buildpath then also problem persists. see my stack trace..SEVERE: A child container failed during start
This did not fix it for me, I still get the same error! Any ideas?
Hi there, can you share your complete stack trace here?
Hi I got it answered on stack overflow. Turns out I was missing a PayPal jar and my JRE was not upto date. Thank you for your help though.
Thanks App Shah, this post has solved my problem.
Glad it worked for you Raul..
HI i have copied the jar in WEB-INF/lib but same the problem persists,
I am running a struts2-spring web application and just upgraded my tomcat from 6 to 7, it was running fine on 6 but giving the below exception on startup
Hi Ravi,
After adding Jars to Lib folder, you may need to add those jars as to build path. I’ve updated Post with Screenshot.