Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9080865
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T20:10:29+00:00 2026-06-16T20:10:29+00:00

I’m having an issue with tomcat not stopping when requested from time to time

  • 0

I’m having an issue with tomcat not stopping when requested from time to time and I have to kill the process manually.. I’m using a standard spring stack (JPA, MVC). This does not always happen, just about 70% of the time.. I have seen this on both Windows, OSX & Linux platforms…

Any thoughts why this may be happening.. In the below log, you will see 2 SERVERE log entries but from this question: To prevent a memory leak, the JDBC Driver has been forcibly unregistered seems to say that is not an issue with Tomcat so it leaves the soft reference..

Any thoughts why this could stop tomcat shutting down?

EDIT: On further Advice & Analysis – it looks like the apache HTTP client is using the DateUtils class, which in turns creates a ThreadLocal instance.. Our code uses the HTTP Client to class an external service… Surely this should be a very common problem if it resides in Apache HTTP Client as using this to call an external HTTP Endpoint isn’t uncommon??

Threaddump below log output

Thanks,

Ian.

-2013-01-04 09:18:33,189 DEBUG [http-bio-9999-exec-8] view.InternalResourceView (InternalResourceView.java:236) - Forwarding to resource [/WEB-INF/views/auth/login.jsp] in InternalResourceView 'auth/login'
2013-01-04 09:18:33,191 DEBUG [http-bio-9999-exec-8] servlet.FrameworkServlet (FrameworkServlet.java:913) - Successfully completed request
Jan 04, 2013 9:18:33 AM org.apache.catalina.core.StandardServer await
INFO: A valid shutdown command was received via the shutdown port. Stopping the Server instance.
Jan 04, 2013 9:18:33 AM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["http-bio-9999"]
Jan 04, 2013 9:18:33 AM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["ajp-bio-8009"]
Jan 04, 2013 9:18:33 AM org.apache.catalina.core.StandardService stopInternal
INFO: Stopping service Catalina
2013-01-04 09:18:33,409 INFO  [localhost-startStop-2] support.AbstractApplicationContext (AbstractApplicationContext.java:1025) - Closing WebApplicationContext for namespace 'test-servlet': startup date [Thu Jan 03 17:56:22 GMT 2013]; parent: Root WebApplicationContext
2013-01-04 09:18:33,409 DEBUG [localhost-startStop-2] support.AbstractBeanFactory (AbstractBeanFactory.java:245) - Returning cached instance of singleton bean 'org.springframework.context.annotation.internalScheduledAnnotationProcessor'
2013-01-04 09:18:33,410 DEBUG [localhost-startStop-2] support.AbstractBeanFactory (AbstractBeanFactory.java:245) - Returning cached instance of singleton bean 'lifecycleProcessor'
2013-01-04 09:18:33,410 INFO  [localhost-startStop-2] support.DefaultSingletonBeanRegistry (DefaultSingletonBeanRegistry.java:433) - Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@37f293d3: defining beans []; parent: org.springframework.beans.factory.support.DefaultListableBeanFactory@2f701b4e
log4j:WARN No appenders could be found for logger (org.springframework.web.context.support.AnnotationConfigWebApplicationContext).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Jan 04, 2013 9:18:33 AM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: The web application [] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
Jan 04, 2013 9:18:33 AM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [] created a ThreadLocal with key of type [org.apache.http.impl.cookie.DateUtils$DateFormatHolder$1] (value [org.apache.http.impl.cookie.DateUtils$DateFormatHolder$1@3f94bcde]) and a value of type [java.lang.ref.SoftReference] (value [java.lang.ref.SoftReference@3dfbb36e]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
Jan 04, 2013 9:18:33 AM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["http-bio-9999"]
Jan 04, 2013 9:18:33 AM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["ajp-bio-8009"]
Jan 04, 2013 9:18:33 AM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["http-bio-9999"]
Jan 04, 2013 9:18:33 AM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["ajp-bio-8009"]

–Thread Dump——-

at
org.apache.http.impl.cookie.DateUtils$DateFormatHolder$1.initialValue(DateUtils.java:220)
at
org.apache.http.impl.cookie.DateUtils$DateFormatHolder$1.initialValue(DateUtils.java:219)
at java.lang.ThreadLocal.setInitialValue(ThreadLocal.java:160)
at java.lang.ThreadLocal.get(ThreadLocal.java:150) at
org.apache.http.impl.cookie.DateUtils$DateFormatHolder.formatFor(DateUtils.java:239)
at
org.apache.http.impl.cookie.DateUtils.parseDate(DateUtils.java:156)
at org.apache.http.impl.cookie.DateUtils.parseDate(DateUtils.java:114)
at
org.apache.http.impl.cookie.BasicExpiresHandler.parse(BasicExpiresHandler.java:61)
at
org.apache.http.impl.cookie.CookieSpecBase.parse(CookieSpecBase.java:93)
at
org.apache.http.impl.cookie.BestMatchSpec.parse(BestMatchSpec.java:135)
at
org.apache.http.client.protocol.ResponseProcessCookies.processCookies(ResponseProcessCookies.java:114)
at
org.apache.http.client.protocol.ResponseProcessCookies.process(ResponseProcessCookies.java:95)
at
org.apache.http.protocol.ImmutableHttpProcessor.process(ImmutableHttpProcessor.java:116)
at
org.apache.http.protocol.HttpRequestExecutor.postProcess(HttpRequestExecutor.java:342)
at
org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:462)
at
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
at
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:754)
at
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:732)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T20:10:30+00:00Added an answer on June 16, 2026 at 8:10 pm

    It seems that your code uses
    [org.apache.http.impl.cookie.DateUtils$DateFormatHolder$] at some point.
    This old question tells that HttpClient may be issueing the reference.

    So you need to look for code, that is using HttpClient – and be sure to cleanup any Thread or HttpClient related resources on contextDestroy.

    Look at threads in your application, that use HttpClient, you should verify that these threads get stopped properly on shutdown.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have thousands of HTML files to process using Groovy/Java and I need to
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to find ID3V2 tags from MP3 file using jid3lib in Java.
We're building an app, our first using Rails 3, and we're having to build
I have a text area in my form which accepts all possible characters from
I have a view passing on information from a database: def serve_article(request, id): served_article
I have a bunch of posts stored in text files formatted in yaml/textile (from
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am using jsonparser to parse data and images obtained from json response. When
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.