Re: Question about undeploying application
Hello, Problem solved by changing Quartz scheduler version to 1.8.3. Thanks for the help. On Fri, Aug 13, 2010 at 9:24 PM, Christopher Schultz ch...@christopherschultz.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ivan, On 8/13/2010 6:45 AM, Ivan Mladenović wrote: I define ServletContextListener (create my implementation of this listener and define this listener in web.xml). In method contextDestroyed I try to shutdown all of the schedulers in following way: ApplicationContext context = (ApplicationContext) sce.getServletContext().getAttribute(WebApplicationContext.* ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE*); I don't recognize the above, but I suppose you know what you are doing. scheduler = (StdScheduler) context.getBean(scheduler); cbcInterfaceScheduler.shutdown(*true*); Are these the same object? It looks like you are not shutting-down the object you got from the context. Boolean parameter means: wait for jobs to complete. I follow the logs, destroy method is called and all schedulers are shutdown. Sounds good. When I try to deploy same WAR file again, following error appears in catalina log file: Aug 13, 2010 12:22:54 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads SEVERE: The web application [] appears to have started a thread named [scheduler_Worker-8] but has failed to stop it. This is very likely to create a memory leak. Could that be the old version of the webapp? Try a completely clean deployment, then re-deploy and see what happens. Aug 13, 2010 12:22:54 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads SEVERE: The web application [] appears to have started a thread named [Thread-32] but has failed to stop it. This is very likely to create a memory leak. This is likely to be some /other/ thread - not scheduling related - that your webapp created (note that it has a generic name). This is confusing for me because this is shown in log file when I try to deploy application. Maybe ask the people who wrote the scheduler? You may have to attach a profiler to the server and observe where these threads are actually being created, and what actually happens when you call the shutdown() method on your scheduler. Hope that helps, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkxlm9kACgkQ9CaO5/Lv0PD31gCdGjtqde4FC7a3SWbsDWiggGpo SLEAn1EwbJlLaTS17VIVmourUd35/QUJ =bgTF -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Question about undeploying application
Hi, Thanks for the quick answer. I try this, but something strange is happening when I try to deploy application (without the Tomcat restart). I define ServletContextListener (create my implementation of this listener and define this listener in web.xml). In method contextDestroyed I try to shutdown all of the schedulers in following way: ApplicationContext context = (ApplicationContext) sce.getServletContext().getAttribute(WebApplicationContext.* ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE*); scheduler = (StdScheduler) context.getBean(scheduler); cbcInterfaceScheduler.shutdown(*true*); Boolean parameter means: wait for jobs to complete. I follow the logs, destroy method is called and all schedulers are shutdown. When I try to deploy same WAR file again, following error appears in catalina log file: Aug 13, 2010 12:22:54 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads SEVERE: The web application [] appears to have started a thread named [scheduler_Worker-8] but has failed to stop it. This is very likely to create a memory leak. Aug 13, 2010 12:22:54 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads SEVERE: The web application [] appears to have started a thread named [Thread-32] but has failed to stop it. This is very likely to create a memory leak. I also try to pause all jobs for scheduler and remove all jobs from scheduler before I shutdown the scheduler, but I get the same error. This is confusing for me because this is shown in log file when I try to deploy application. Could you give me some advice of how I can solve this? Thanks in advance. 2010/8/12 Caldarale, Charles R chuck.caldar...@unisys.com From: Ivan Mladenović [mailto:pif...@gmail.com] Subject: Question about undeploying application Deployed application have some threads that are running in background. Then deployed application must stop those threads as part of its shutdown procedure. Tomcat can't do it for you. You should be using a ServletContextListener in your webapp, so it can properly manage the threads when its contextDestroyed() method is invoked. Can I configure Tomcat to kill all treads when application is undeployed? No, that's the webapp's job. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Question about undeploying application
Hello, I’m using Tomcat 6.0.29. Tomcat manager application is enabled. Version of installed Java is 1.6 update 18. Operating systems used to test this are Windows 7 and Ubuntu 9.1. There is one Spring web application that is deployed on Tomcat. Deployed application have some threads that are running in background. Then try to un-deploy application by using Tomcat Manager. Application WAR file and folder where WAR file is unpacked are removed, but I get this error in logs: *Aug 12, 2010 2:35:23 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads SEVERE: The web application [] appears to have started a thread named [scheduler_Worker-6] but has failed to stop it. This is very likely to create a memory leak.* When I try to deploy new version of application (also by using Tomcat Manager) I get the “Out of memory” exception. I try to change definition of following listener: *Listener className=org.apache.catalina.core.JreMemoryLeakPreventionListener gcDaemonProtection=false /* And I also try to add following parameters in context.xml: * Context antiJARLocking=true antiResourceLocking=true * Can I configure Tomcat to kill all treads when application is undeployed? Thanks in advance. Ivan
How can I increase maximum upload size?
Hi, I am using the Tomcat 6.0.26 and I try to upload file that is larger than 1 bytes from JSP. I try to increase the maximum upload size (for post request). I change the Connector element: Connector port=8081 protocol=HTTP/1.1 connectionTimeout=2 redirectPort=8444 maxPostSize=50 maxSavePostSize=50 / But, maximum upload size is 1. How can I increase maximum upload size? Thanks in advance. Best Regards, Ivan
Re: How can I increase maximum upload size?
Hi, I solve the problem by defining following bean: bean id=*multipartResolver* class=* org.springframework.web.multipart.commons.CommonsMultipartResolver* p:maxUploadSize=*-1* / If -1 is set for maximum upload size, then size of file will not be checked. Best Regards, Ivan Mladenovic 2010/6/3 Ivan Mladenović pif...@gmail.com Hi, I am using the Tomcat 6.0.26 and I try to upload file that is larger than 1 bytes from JSP. I try to increase the maximum upload size (for post request). I change the Connector element: Connector port=8081 protocol=HTTP/1.1 connectionTimeout=2 redirectPort=8444 maxPostSize=50 maxSavePostSize=50 / But, maximum upload size is 1. How can I increase maximum upload size? Thanks in advance. Best Regards, Ivan
Can I deploy war file to the running Tomcat, by using my web application?
Hi, I am using Tomcat 6.0.26. Manager user is enabled in my tomcat-users.xml file. Can I deploy war file to the running Tomcat, by using my web application? Could I get some examples about this? Thanks in advance. Best Regards, Ivan Mladenovic
Re: Can I deploy war file to the running Tomcat, by using my web application?
Hi, Thank you for the replay. I solve the problem by using HTTP client. Best Regards, Ivan Mladenovic On Wed, Jun 2, 2010 at 1:06 PM, Pid p...@pidster.com wrote: On 02/06/2010 09:30, Ivan Mladenović wrote: Hi, I am using Tomcat 6.0.26. Manager user is enabled in my tomcat-users.xml file. Can I deploy war file to the running Tomcat, by using my web application? Using the manager application you can deploy applications. Could I get some examples about this? http://tomcat.apache.org/tomcat-6.0-doc/manager-howto.html or: http://tomcat.apache.org/tomcat-6.0-doc/deployer-howto.html p Thanks in advance. Best Regards, Ivan Mladenovic