org.apache.catalina.LifecycleException:Failed to start component [Standardengine[catalina]. Standard

Source: Internet
Author: User

    1. caused By:java.lang.NoSuchMethodError:javax.servlet.ServletContext.getVirtualServerName () ljava/lang/string;

    2. ContainerBase.addChild:start:
      org.apache.catalina.LifecycleException:Failed to start component [Standardengine[catalina]. Standardhost[localhost]. Standardcontext[]]

Problems with the Tomcat jar package when MAVEN is packaged
Springboot has its own tomcat bag

Set as follows:

<Dependency>    <groupId>Org.springframework.boot</groupId>    <Artifactid>Spring-boot-starter-tomcat</Artifactid>    <Scope>Provided</Scope></Dependency>

Phenomenon: I am using Spring-boot 1.3.3.RELEASE version, with Tomcat is 8.x, do not set scope=provide directly packaged, run under TOMCAT8 is no problem, but run under TOMCAT7 will report the above error.

Resolution process: I repeatedly compared to the spring-boot-starter-tomcat and did not pack the Lib difference, found in Tomcat7, There are Tomcat-jdbc-8.0.32.jar and Tomcat-juli-8.0.32.jar that can run, if there are more than Tomcat and the like, there will be a conflict, so that Tomcat can not run successfully, the problem becomes as long as the dependency of the Tomcat to remove the extra jar package on the line , with these two jar packages you can guarantee the normal dependency of some springboot other packages. But it took almost 4 hours to solve this simple problem, shame ...

Special Note: If the last item that needs to be packaged is dependent on several other projects, and the dependency of Tomcat is on other projects, it is best to clean the entire project first, then build the other jars separately, and finally package the war package, otherwise it will not be effective to package the final project directly.

Painful summary: This is a tool using habits caused by the simple problem of complex problems, very simple problem, the results of all methods have been tried, and finally found that not many methods are useless, but their own use of the problem caused by the use of habits.

Just like the eyes are covered with black cloth, thinking that they are blind, the results to eat all kinds of panacea, the result is still a dark eye, in fact, as long as take off the black cloth on it, but hard to do so much of the work of the useless.

In fact, as long as you modify the dependency needs to build the jar package of the project, must first clean, then generate in turn, even if this method is not successfully resolved, and then test other methods, you must remember clean and install

Org.apache.catalina.LifecycleException:Failed to start component [Standardengine[catalina]. Standard

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.