Choose unique values for the ' Webapprootkey ' Context-param in your web. XML files!

Source: Internet
Author: User

Configure two context in Tomcat's server.xml, one of which fails to start properly, the Exchange configuration order, and the other does not start normally, that is, only the second configuration can start. If you deploy separately, there is no problem. The error is roughly as follows:

Appears to had started a thread named [com.mchange.v2.async.threadpoolasynchronousrunner$poolthread-#0] but had failed t o Stop it. This was very likely to create a memory leak.

Initially thought to be insufficient memory allocation, but increased the content configuration problem remains.

The following error message is then found in Localhost.log:

Severity: Exception sending context initialized event to listener instance of class Org.springframework.web.util.Log4jConfigLis Tener
Java.lang.IllegalStateException:Web App root system property already set to different value: ' Webapp.root ' = [/home/web/g rows/] instead of [/home/web/mall/]-Choose unique values for the ' Webapprootkey ' Context-param in your web. XML files!


The main idea is that Log4jconfiglistener is replaced by the value of the latter context when it gets the Webapp.root value, so configure the different Webapprootkey values in Web. XML for each project, and then add them in one of the Web. xml:

<context-param>
<param-name>webAppRootKey</param-name>
<param-value>web.sample.root</param-value>
</context-param>


Restart Tomcat for problem resolution.

Choose unique values for the ' Webapprootkey ' Context-param in your web. XML files!

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.