File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes Tomcat - application started thread [AWT-Windows] but has failed to stop it and Timer - memory leak Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat - application started thread [AWT-Windows] but has failed to stop it and Timer - memory leak" Watch "Tomcat - application started thread [AWT-Windows] but has failed to stop it and Timer - memory leak" New topic
Author

Tomcat - application started thread [AWT-Windows] but has failed to stop it and Timer - memory leak

amir taghvayi
Ranch Hand

Joined: Sep 16, 2011
Posts: 54
hi

i used tomcat7 . my web application has caused a memory leak on stop .
the error is :


i not used timer and AWT in project .

please help me !!!

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16228
    
  21

Just because you didn't use these resources directly doesn't mean that you aren't using them indirectly. Although without more knowledge it would be difficult to determine who the offending intermediary is.

If you have graphing capabilities in your webapp, it may be responsible for the AWT-Windows thread. Even if you aren't graphing, if you're using a report generator, the report generator may be pulling in graphing.


Customer surveys are for companies who didn't pay proper attention to begin with.
amir taghvayi
Ranch Hand

Joined: Sep 16, 2011
Posts: 54
hi tim .

i used only java.awt.color and java.awt.bufferedimage .
please see:
http://stackoverflow.com/questions/4327832/tomcat-webapp-error-application-started-thread-awt-windows-but-has-failed-to

What are your impressions ?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16228
    
  21

SO can be a very useful resource for "quick answers". They explicitly discourage discussing philosophy these days. For that, the JavaRanch is probably the best place around (we don't flame people for making "stupid" suggestions/observations!).

However, when you cross-post a question to both SO and JR, it can lead to confusion, just as it does when you ask the same question multiple times within JR. You might want to check our FAQs on the best way to handle this.

I gave most of my answer on SO, since that's where you put your details. It's the first time I've posted there in ages! One thing that occurred to me after I hit the "Submit" button, though. Since you've finally confessed to using graphics, make sure that you properly close out the graphics subsystem before exiting the webapp.
amir taghvayi
Ranch Hand

Joined: Sep 16, 2011
Posts: 54
thank tim .
i used only one bar of Graphics2D , my code is :


when remove my code . the awt memory leak Is removed !!!

i used g.dispose(); but Occurs awt memory leak .
please help me!
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16228
    
  21

Did you do an "os.close()"?
amir taghvayi
Ranch Hand

Joined: Sep 16, 2011
Posts: 54
very very thank tim . the awt memory leak Is removed !!!

What about is timer memory leak :


i not used java.util.Timer.

please help me!!

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16228
    
  21

This one I am not so certain of. There appears to be an RMI timeout timer, but all of that is part of Tomcat, so it should not be a leak.
amir taghvayi
Ranch Hand

Joined: Sep 16, 2011
Posts: 54

thanks tim
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tomcat - application started thread [AWT-Windows] but has failed to stop it and Timer - memory leak