5

Every time I start debugging my WebApp (Netbeans 7.0 + spring 3 + jsp) the debugger breaks a couple of times in ThreadPoolExecutor.java after Tomcat raises this exception:

"Stopping thread http-bio-8080-exec-3 to avoid potential memory leaks after a context was stopped."

screenshot showing ThreadPoolExecutor.java

I am unable to identify why this is happening. Is it due to a problem in my code? If so, how can I locate the problem? If this is "normal", then how can I prevent the IDE from bothering me with it every time?

Any clues would be greatly appreciated.

Steve
  • 1,769
  • 2
  • 22
  • 33
  • I'm getting the exact error only in Eclipse running Spring MVC. Were you able to solve this? – Bostone Feb 21 '12 at 15:53
  • 2
    I never got to the bottom of this. However, I discovered how to ignore the issue by unchecking the "Stop on uncaught exceptions" option in Tools|Miscellaneous|Java Debugger|General (Netbeans). Now Netbeans never bothers me about it. Interesting that you are using Spring too. Are you using any Listeners? – Steve Feb 21 '12 at 16:42
  • Not yet. It's Ext-JS front backed by Spring MVC in very early stages – Bostone Feb 21 '12 at 18:05
  • Also seeing this problem with plain Eclipse Java EE IDE for Web Developers. Version: Kepler Service Release 1 Build id: 20130919-0819. While running: Server version: Apache Tomcat/7.0.47 Server built: Oct 18 2013 01:07:38 Server number: 7.0.47.0 OS Name: Mac OS X OS Version: 10.9 Architecture: x86_64 JVM Version: 1.7.0_45-b18 JVM Vendor: Oracle Corporation – Bryan Nov 19 '13 at 05:48
  • Just for the record, I eventually discovered a resource leak (a database connection) which I plugged and the above exception no longer occurs. So the bug was in my code and not in Netbeans. – Steve Sep 20 '14 at 17:37

1 Answers1

0

This looks like it could be part of Bug 49159 - Improve ThreadLocal memory leak clean-up that was fixed in 7.0.6, but it is part of the MemoryLeakProtection mechanism in Tomcat 7+

There is another answer posted here Is this very likely to create a memory leak in Tomcat? that explains this in further detail.

As you already noted in your comments, you can disable the debugger in NetBeans using Tools|Miscellaneous|Java|Java Debugger|General (Netbeans) , and de-selecting the stop on uncaught exceptions checkbox.

Community
  • 1
  • 1
John Yeary
  • 1,112
  • 22
  • 45
  • Just FYI, Bug 49159 was marked resolved with Tomcat 7.0.6 yet I get this problem running: Server version: Apache Tomcat/7.0.47 Server built: Oct 18 2013 01:07:38 Server number: 7.0.47.0 OS Name: Mac OS X OS Version: 10.9 Architecture: x86_64 JVM Version: 1.7.0_45-b18 JVM Vendor: Oracle Corporation. But only in Eclipse Java EE IDE for Web Developers. Version: Kepler Service Release 1 Build id: 20130919-0819. – Bryan Nov 19 '13 at 05:53