Home > Uncategorized > Tomcat 6.0.26 shutdown reports “A web application created a ThreadLocal …. ThreadLocal has been forcibly removed”

Tomcat 6.0.26 shutdown reports “A web application created a ThreadLocal …. ThreadLocal has been forcibly removed”

This problem happened with an JSF , Hibernate and rich faces application which was running on tomcat 6.0.14 version and Jdk1.6.0 . When upgraded to Tomcat 6.0.26 and JDK 1.6.0-19, it started behaving strangely.

The jsf messages were displayed as html  and looked as the servver was not parsing them.

for eg {userbean.errorMessage} started showing on pages.

After much analysis it was found that this problem is because of tomcat upgrade.  Why is this problem ?

From the documentation

For the #{} expressions to be recognized in Tomcat 6, your web application must adhere to the Servlet 2.5 specification. Make sure, that version and xsi:schemaLocation attributes of element in your WEB-INF/web.xml file have the correct values. You can look into conf/web.xml or into the examples application for an example.
In the versions 6.0.24 and earlier the deferred expressions were processed regardless of the specification version specified in web.xml. That was changed/fixed in 6.0.26.

Below is solution


<?xml version=’1.0′ encoding=’UTF-8’?>
“-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN”



<?xml version=”1.0″ encoding=”UTF-8″?>
xsi:schemaLocation=”http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd”


remove these if they exist in your web.xml





If this was helpful , please add comment below

Categories: Uncategorized Tags:
  1. Diadem
    July 11th, 2013 at 03:49 | #1

    Thank you for this! It worked well. The error is gone.

  2. Mohan
    July 23rd, 2012 at 14:31 | #2

    Wow, it worked for me for a problem which wrecked my weekend. Thanks.

  3. Madhuri
    February 9th, 2012 at 07:57 | #3

    Thanks a lot for this solution. I have spent almost more than a week to resolve this issue. And since it does not generate any error even searching on Google was not helping me solve this problem. Finally, your solution helped. Thanks a lot !!!

  1. October 15th, 2010 at 12:44 | #1