File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
amir taghvayi
Ranch Hand
Posts: 54
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 17616
39
Android Eclipse IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
amir taghvayi
Ranch Hand
Posts: 54
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 17616
39
Android Eclipse IDE Linux
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 54
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 17616
39
Android Eclipse IDE Linux
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you do an "os.close()"?
 
amir taghvayi
Ranch Hand
Posts: 54
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 17616
39
Android Eclipse IDE Linux
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 54
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

thanks tim
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic