AW: NoClassDefFoundError: HttpServlet
The sample servlets work. You say that the problem must be in my webapp. But what could that be? Laci -Ursprüngliche Nachricht- Von: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] Gesendet: Montag, 2. Februar 2009 20:47 An: Tomcat Users List Betreff: RE: NoClassDefFoundError: HttpServlet From: Ladislav Gaspar [mailto:ladislav.gas...@it-vision.com] Subject: AW: NoClassDefFoundError: HttpServlet Sorry for the misinformation. The the servlet-api.jar is in $catalina_home/lib. The %CLASSPATH% is not adjusted The symptoms are still identical with those that appear when servlet-api.jar is in WEB-INF/lib or otherwise appears in multiple places in a given branch of the classloader tree. Note that the conflicting servlet classes might also be hidden inside a jar of a different name, such as j2ee.jar. Do the sample servlet and JSP apps that come with Tomcat work? If so, the problem is inside your webapp; if not, then there's another copy of the servlet classes lurking somewhere visible to Tomcat, perhaps in the endorsed directory. - 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 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Able to access URL without port
I had a doubt of something I had heard with regard to the access of URL possible without port number if apache is used in the environment. We have our application running with JBOSS as the AS and tomcat as the web server. My question is that is the URL, http://application-URL:10080 assuming tomcat is running on port 10080 can be accessed like http://application-URL without the port number if apache is also installed. I hope, my question is clear. Please, help in solving the doubt. regards - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat only query localhost database
Sorry, but you're providing too few informations. - please post the file /etc/tomcat6/Catalina/localhost/webappName.xml (masquerade the user-id / password!) - please post the piece of code where the said webapp tries to create the database-connection. should looke similar to code try { Context env = (Context) new InitialContext() .lookup(java:comp/env); dbDS = (DataSource) env.lookup(dataSourceName); if (dbDS == null) { logger.error(seems that ' + dataSourceName + ' is an unknown DataSource); throw new ServletException(' + dataSourceName + ' is an unknown DataSource); } } catch (NamingException e) { logger.error(Exception caught:, e); throw new ServletException(e); } /code My guess is, that within the app's code, the connection to the database is not established to the said datasource but that somewhere localhost is hardcoded *sic* So have a chat with the webapp-developer and let us have a look at the code. Rgds Gregor -- just because your paranoid, doesn't mean they're not after you... gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2 gpgp-key available @ http://pgpkeys.pca.dfn.de:11371 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Able to access URL without port
You should configure mod_proxy in Apache for that. You basically proxy no port (is actually port 80) to your port 10080. The docs for mod_proxy can be found here: http://httpd.apache.org/docs/2.2/mod/mod_proxy.html Cheers, Kees de Kooter http://www.boplicity.net On Tue, Feb 3, 2009 at 09:57, randhir.si...@elitecore.com wrote: I had a doubt of something I had heard with regard to the access of URL possible without port number if apache is used in the environment. We have our application running with JBOSS as the AS and tomcat as the web server. My question is that is the URL, http://application-URL:10080 assuming tomcat is running on port 10080 can be accessed like http://application-URL without the port number if apache is also installed. I hope, my question is clear. Please, help in solving the doubt. regards - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: help Comet Tomcat
hi, thanks for information, i download this folder whit subversion but when i open this proyect whit eclipse , the proyect give me 3 error, can you explain me how to do operate the project? please i will continue to try make it work Filip Hanik - Dev Lists wrote: If you simply are looking for an example to use the CometProcessor interface, there is a module that is built around it https://svn.apache.org/repos/asf/tomcat/trunk/modules/bayeux/ Filip sam wrote: I am new to COMET in Tomcat, someone could show me one example on using COMET in Tomcat I have already changed the connector. i try example of http://tomcat.apache.org/tomcat-6.0-doc/aio.html and various example of this web I have managed to operate comet in Glassfish using Dojo, but Tomcat does not get anything sorry for my english any help will be good, thanx, thanx i using Tomcat 6.0.18 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://www.nabble.com/help-Comet-Tomcat-tp21788916p21806519.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Request queue menagement Tomcat 5.5 + Axis
Hi Mark, It's Sergio again about request queues on Tomcat + Axis. Could you please tell me if it's possible to set the number of dedicated threads and queue lenght? Is there a maximum for these two parameters?? Thank you very much! Sergio Mark Thomas ha scritto: Sergio Arrighi wrote: Hello to everyone, I've developed a webApp on tomcat 5.5. This webapp consists of a bunch of webservices that i've created using axis. Is there someone who could help me to understand how tomcat or axis handle the request queue?? Tomcat will assign a new requests to a free processing thread as the requests are received. Those threads are then scheduled by the JVM. When the request completes the thread is returned to the pool. If no thread is free the request is queued until a free thread is available. If the queue is full the request is dropped. Mark Thank you very much Sergio Arrighi - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- *I.M.I.N. Holding s.r.l.* Sergio Arrighi sergio.arri...@iminholding.com mailto:sergio.arri...@iminholding.com Cell. 3455805121 Vicolo Molino, 2 21052 Busto Arsizio Varese Tel. +39 0331324679 Fax. +39 0331324678 www.iminholding.com - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Able to access URL without port
By default browsers route all http requests to port 80, so if you have Apache http in front of TC then this will be true. -Sameer http://in.groups.yahoo.com/group/indiaenergy/join --- On Tue, 2/3/09, randhir.si...@elitecore.com randhir.si...@elitecore.com wrote: From: randhir.si...@elitecore.com randhir.si...@elitecore.com Subject: Able to access URL without port To: users@tomcat.apache.org Date: Tuesday, February 3, 2009, 2:27 PM I had a doubt of something I had heard with regard to the access of URL possible without port number if apache is used in the environment. We have our application running with JBOSS as the AS and tomcat as the web server. My question is that is the URL, http://application-URL:10080 assuming tomcat is running on port 10080 can be accessed like http://application-URL without the port number if apache is also installed. I hope, my question is clear. Please, help in solving the doubt. regards - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Documentation on the working of tomcat and architecture
I need some good documentation on the working and architecture of TOMCAT. Actually, I have copied tomcat from our old server which has to be migrated to a new server but, the tomcat is not starting. So, I want some good documentation on tomcat. I hope, my question is clear. Please, help in solving the doubt. regards - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
No workers.properties file in $TOMCAT_HOME/conf
I downloaded tomcat, intalled it but there is no file workers.properties in $TOMCAT_HOME/conf. I tried 2 downloads, the tomcat 4.1 and 5.5 series. The TOMCAT JAVA home needs to be set in workers.properties files. I hope, my question is clear. Please, help in solving the doubt. regards - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Copy Apache
I have a requirement to migrate our application to a better configuration server. For this, can I copy apache from the present server to the new server? So, my question is whether we can just copy the apache folder to the new server or does it have to be installed? For tomcat, I had copied from the source to the destination as it is perfectly fine to copy tomcat. I hope, my question is clear. Please, help in solving the doubt. regards - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
mod_jk vs mod_proxy
Hi guys! Wich is the recommend module and what are the differences? Thanks a lot
Re: Copy Apache
I'm sorry, but the whole question is rediculous and needs a rephrasing at least. - What does the OP want to copy? The whole of Apache? HTML only? To me it seems as if the OP doesn't have *any* clue when it comes to Apache / Tomcat (please also refer to his previous posts). I may appear rude, however, I believe that before asking questions in a list, ppl first should at least *try* to refer to the - in this case - excellent docs. If there are still open questions left, everybody is very welcome to ask their questions here, and I believe the list-members are more than willing to help. However, most members of this list are helping during their spare time, free of charge, just because they like Tomcat and maybe believe in the principles of Open Source. On the other hand, most members of this list are also earning their pennies with software-development / administration / whatsoever. Still, this does not mean that the members of this list are helping some offshore-wannabies to fullfill their client's (!) requirements, thus cutting off the branch they're sitting on. Ever wondered how some offshore-companies can come up with their prices? Have a look at some posts, and you'll know... I don't have any problem with a fair competition and sharing information, however, postings like the one of the OP often make throw up my breakfast. Rgds Gregor -- just because your paranoid, doesn't mean they're not after you... gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2 gpgp-key available @ http://pgpkeys.pca.dfn.de:11371 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: mod_jk vs mod_proxy
Hi Andrew, we've just been duscussing this topic a few days ago. You'll might want to read the whole thread @ http://www.nabble.com/AJP-vs-HTTP-connectors--td21797851.html Rgds Gregor -- just because your paranoid, doesn't mean they're not after you... gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2 gpgp-key available @ http://pgpkeys.pca.dfn.de:11371 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: No workers.properties file in $TOMCAT_HOME/conf
On Tue, Feb 3, 2009 at 11:00 AM, randhir.si...@elitecore.com wrote: I downloaded tomcat, intalled it but there is no file workers.properties correct in $TOMCAT_HOME/conf. I tried 2 downloads, the tomcat 4.1 and 5.5 series. try it with at least 5.5 or, better, with the latest 6.x-version dump the outdated version 4.1 The TOMCAT JAVA home needs to be set in workers.properties files. wrong I hope, my question is clear. unfortunately not Please, help in solving the doubt. before asking this list for help, I suggest you read the excellent documentation first. You'll find it at the link I've provided in one of my prevous posts. you might also want to take a look at the following url: http://tomcat.apache.org/connectors-doc/generic_howto/quick.html rgds gregor -- just because your paranoid, doesn't mean they're not after you... gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2 gpgp-key available @ http://pgpkeys.pca.dfn.de:11371 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Apache Tomcat 6.0 loads blank page
Did you try the synaptic package manager in Ubuntu ? I dont know which version of Ubuntu you have but mine did not have Tomcat or Apache HTTP on it when I installed, but might be I had dome somethings different. -Sameer --- On Mon, 2/2/09, zia mohades zia.si...@gmail.com wrote: From: zia mohades zia.si...@gmail.com Subject: Re: Apache Tomcat 6.0 loads blank page To: Tomcat Users List users@tomcat.apache.org Date: Monday, February 2, 2009, 9:54 PM Hello guys, Thank you again for your help chuck! 1) I just looked at the CGI servlet help that you sent. Actually I just have to uncomment the CGI servlet part in the web.xml and now at least i don't get an error, it's just a blank( which is probably the address problem, i.e a file pointing to a wrong directory) 2) I think you're right, just installing the fresh version from the website is better. How do i completely uninstall the apache( remove all the files) on ubuntu. I just started using ubuntu and not sure how it works. Thank you again for the help! Regards zia On Mon, Feb 2, 2009 at 10:51 AM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: zia mohades [mailto:zia.si...@gmail.com] Subject: Re: Apache Tomcat 6.0 loads blank page 3) however now i have a new problem: for some reason my html page doesn't communicate with the cgi file. Did you follow the instructions here, in particular enabling the CGI servlet? http://tomcat.apache.org/tomcat-6.0-doc/cgi-howto.html Again, if you're using a 3rd-party repackaged Tomcat, it's quite possible what you're doing simply won't work with that installation. I strongly recommend you download and install a real Tomcat, rather than wasting time with what appears to be a damaged one. - 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
Re: Error in building mod_jk for Apache 2.2.x and Tomcat 4.x
Maybe something went wrong during the configure step. Could you take a look at the config.log file and check whether there are any errors being logged. On Tue, 2009-02-03 at 17:59 +0530, Shweta Parakh -X (shparakh - Infosys at Cisco) wrote: Hi, I am trying to build mod_jk for Apache 2.2.11 and Tomcat 4.1.39 on Solaris platform 1. Downloaded mod_jk (version 1.2.27) source from http://tomcat.apache.org/download-connectors.cgi and is kept in /opt/mod_jk-1.2.27 directory 2. Installed apache2 in /opt/apache-2.2.11 directory. 3. I am able to configure mod_jk using below command to generate Makefile ./configure --with-apxs2=/opt/apache-2.2.11/usr/local/apache2/bin/apxs --with-java-home=/opt/support/java/Java1.6.0_05/bin/java --with-apache=/opt/apache 2.2.11/usr/local/apache2 4. I could see 3 Makefiles are generated (Makefile, Makefile.in, Makefile.am) in /opt/mod_jk-1.2.27/native But I am getting below error while running make : make[1]: *** [lib_jk.la] Error 1 make[1]: Leaving directory `/opt/mod_jk-1.2.27/native/apache-2.0' make: *** [all-recursive] Error 1 5. libtool is being given below mentioned arguments : ./libtool --mode=link gcc -o lib_jk.la -static -rpath /opt/apache-2.2.11/usr/local/apache2/modules/jk mod_jk.lo ../common/jk_ajp12_worker.lo ../common/jk_connect.lo ../common/jk_msg_buff.lo ../common/jk_util.lo ../common/jk_ajp13.lo ../common/jk_pool.lo ../common/jk_worker.lo ../common/jk_ajp13_worker.lo ../common/jk_lb_worker.lo ../common/jk_sockbuf.lo ../common/jk_map.lo ../common/jk_uri_worker_map.lo ../common/jk_ajp14.lo ../common/jk_ajp14_worker.lo ../common/jk_md5.lo ../common/jk_shm.lo ../common/jk_ajp_common.lo ../common/jk_context.lo ../common/jk_url.lo ../common/jk_status.lo false cru .libs/lib_jk.a mod_jk.o ../common/jk_ajp12_worker.o ../common/jk_connect.o ../common/jk_msg_buff.o ../common/jk_util.o ../common/jk_ajp13.o ../common/jk_pool.o ../common/jk_worker.o ../common/jk_ajp13_worker.o ../common/jk_lb_worker.o ../common/jk_sockbuf.o ../common/jk_map.o ../common/jk_uri_worker_map.o ../common/jk_ajp14.o ../common/jk_ajp14_worker.o ../common/jk_md5.o ../common/jk_shm.o ../common/jk_ajp_common.o ../common/jk_context.o ../common/jk_url.o ../common/jk_status.o 6. When I run libtool script independently in bash mode, I could see below error : ... + libtool_args='gcc -o lib_jk.la -static -rpath /opt/apache-2.2.11/usr/local/apache2/modules/jk mod_jk.lo' + test -n '' + prevarg=mod_jk.lo + case $arg in + test -z '' + echo 'libtool: link: `mod_jk.lo'\'' is not a valid libtool object' libtool: link: `mod_jk.lo' is not a valid libtool object + exit 1 Could someone please let me know what can be done to resolve this issue? Thank you. Regards, Shweta -- Pieter Temmerman email: ptemmerman@sadiel.es skype: ptemmerman.sadiel SADIEL TECNOLOGÍAS DE LA INFORMACIÓN, S.A. http://www.sadiel.es. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Copy Apache
What is the operating system? 2009/2/3 randhir.singh randhir.si...@elitecore.com: I have a requirement to migrate our application to a better configuration server. For this, can I copy apache from the present server to the new server? So, my question is whether we can just copy the apache folder to the new server or does it have to be installed? For tomcat, I had copied from the source to the destination as it is perfectly fine to copy tomcat. I hope, my question is clear. Please, help in solving the doubt. regards - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Error in building mod_jk for Apache 2.2.x and Tomcat 4.x
Hi, I am trying to build mod_jk for Apache 2.2.11 and Tomcat 4.1.39 on Solaris platform 1. Downloaded mod_jk (version 1.2.27) source from http://tomcat.apache.org/download-connectors.cgi and is kept in /opt/mod_jk-1.2.27 directory 2. Installed apache2 in /opt/apache-2.2.11 directory. 3. I am able to configure mod_jk using below command to generate Makefile ./configure --with-apxs2=/opt/apache-2.2.11/usr/local/apache2/bin/apxs --with-java-home=/opt/support/java/Java1.6.0_05/bin/java --with-apache=/opt/apache 2.2.11/usr/local/apache2 4. I could see 3 Makefiles are generated (Makefile, Makefile.in, Makefile.am) in /opt/mod_jk-1.2.27/native But I am getting below error while running make : make[1]: *** [lib_jk.la] Error 1 make[1]: Leaving directory `/opt/mod_jk-1.2.27/native/apache-2.0' make: *** [all-recursive] Error 1 5. libtool is being given below mentioned arguments : ./libtool --mode=link gcc -o lib_jk.la -static -rpath /opt/apache-2.2.11/usr/local/apache2/modules/jk mod_jk.lo ../common/jk_ajp12_worker.lo ../common/jk_connect.lo ../common/jk_msg_buff.lo ../common/jk_util.lo ../common/jk_ajp13.lo ../common/jk_pool.lo ../common/jk_worker.lo ../common/jk_ajp13_worker.lo ../common/jk_lb_worker.lo ../common/jk_sockbuf.lo ../common/jk_map.lo ../common/jk_uri_worker_map.lo ../common/jk_ajp14.lo ../common/jk_ajp14_worker.lo ../common/jk_md5.lo ../common/jk_shm.lo ../common/jk_ajp_common.lo ../common/jk_context.lo ../common/jk_url.lo ../common/jk_status.lo false cru .libs/lib_jk.a mod_jk.o ../common/jk_ajp12_worker.o ../common/jk_connect.o ../common/jk_msg_buff.o ../common/jk_util.o ../common/jk_ajp13.o ../common/jk_pool.o ../common/jk_worker.o ../common/jk_ajp13_worker.o ../common/jk_lb_worker.o ../common/jk_sockbuf.o ../common/jk_map.o ../common/jk_uri_worker_map.o ../common/jk_ajp14.o ../common/jk_ajp14_worker.o ../common/jk_md5.o ../common/jk_shm.o ../common/jk_ajp_common.o ../common/jk_context.o ../common/jk_url.o ../common/jk_status.o 6. When I run libtool script independently in bash mode, I could see below error : ... + libtool_args='gcc -o lib_jk.la -static -rpath /opt/apache-2.2.11/usr/local/apache2/modules/jk mod_jk.lo' + test -n '' + prevarg=mod_jk.lo + case $arg in + test -z '' + echo 'libtool: link: `mod_jk.lo'\'' is not a valid libtool object' libtool: link: `mod_jk.lo' is not a valid libtool object + exit 1 Could someone please let me know what can be done to resolve this issue? Thank you. Regards, Shweta
Deleting web application specific log files
Hello I am using tomcat6 to deploy my web applications. For logging the messages which come through httpServletRequest.getSession().getServletContext().log(Some message); calls. I have created a logging.properties file, which contains this: handlers = org.apache.juli.FileHandler # Handler specific properties. # Describes specific configuration info for Handlers. org.apache.juli.FileHandler.level = FINE org.apache.juli.FileHandler.directory = ${catalina.base}/logs/myapp org.apache.juli.FileHandler.prefix = myapp_log. org.apache.juli.FileHandler.suffix = .txt and have placed this file in tomcat\webapps\myapp\WEB-INF\classes directory. This works perfectly to rotate the log files nightly. But I want to delete the log files after some time (say, set a property so that log files older than 5 days are deleted). Is there some way of doing this? java.util.logging.FileHandler has two properties to specify the maximum log file count and maximum file size : java.util.logging.FileHandler.limit=102400 java.util.logging.FileHandler.count=5 but, when I try to use java.util.logging.FileHandler in place of org.apache.juli.FileHandler, no messages get logged through getServletContext().log(Some message); calls. It seems that tomcat does not support java.util.logging. Is there a workaround for this? I know I can use Log4J for logging my web application's logs, but that would require a lot of changes in the existing web application (I would have to replace all getServletContext().log() calls from log4J specific statements). Any help would be greatly appreciated. Thanks. Regards Ashish
Error, source unknown
from catalina.out log. Feb 3, 2009 12:14:23 PM org.apache.coyote.http11.Http11Protocol init SEVERE: Error initializing endpoint java.net.BindException: Address already in usenull:8080 I'm not sure what the 'null' part of this message is telling me. Any suggestions please? Then later (may/may not be associated) Feb 3, 2009 12:14:23 PM org.apache.tomcat.util.digester.Digester fatalError SEVERE: Parse Fatal Error at line 8 column 1: Content is not allowed in trailing section. org.xml.sax.SAXParseException: Content is not allowed in trailing section. at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195) TIA -- Dave Pawson XSLT XSL-FO FAQ. Docbook FAQ. http://www.dpawson.co.uk - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Error, source unknown
Dave, On Tue, Feb 3, 2009 at 2:24 PM, Dave Pawson dave.paw...@gmail.com wrote: from catalina.out log. Feb 3, 2009 12:14:23 PM org.apache.coyote.http11.Http11Protocol init SEVERE: Error initializing endpoint java.net.BindException: Address already in usenull:8080 that means that some process is using port 8080. Since a port can only be bound to one process, the attempt to bin it to a second one fails. Is it possible that Tomcat is already running? In case you#re on Linux / Unix, what gives netstat -lnp | grep 8080 ? I'm not sure what the 'null' part of this message is telling me. Well, that means that the exception thrown doesn't return a proper error-message. I would put that behind for the time being. Then later (may/may not be associated) Feb 3, 2009 12:14:23 PM org.apache.tomcat.util.digester.Digester fatalError SEVERE: Parse Fatal Error at line 8 column 1: Content is not allowed in trailing section. org.xml.sax.SAXParseException: Content is not allowed in trailing section. at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195) the XML-parser used is not able to parse an XML-file. Would be interesting to kniw, which XML-file we#re talking about here, though. My best guess is, that you either might have a problem with CTR/LF at the linde-ends of said XML-file or a problem with the encoding. Did you transfer any data from Windows to Linux / Unix / alike? Rgds Gregor -- just because your paranoid, doesn't mean they're not after you... gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2 gpgp-key available @ http://pgpkeys.pca.dfn.de:11371 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Error, source unknown
Apparently you already have something running that is using port 8080. The Digester error means that an xml file that is being loaded contains characters after the closing root tag. Cheers, Kees de Kooter http://www.boplicity.net 2009/2/3 Dave Pawson dave.paw...@gmail.com: from catalina.out log. Feb 3, 2009 12:14:23 PM org.apache.coyote.http11.Http11Protocol init SEVERE: Error initializing endpoint java.net.BindException: Address already in usenull:8080 I'm not sure what the 'null' part of this message is telling me. Any suggestions please? Then later (may/may not be associated) Feb 3, 2009 12:14:23 PM org.apache.tomcat.util.digester.Digester fatalError SEVERE: Parse Fatal Error at line 8 column 1: Content is not allowed in trailing section. org.xml.sax.SAXParseException: Content is not allowed in trailing section. at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195) TIA -- Dave Pawson XSLT XSL-FO FAQ. Docbook FAQ. http://www.dpawson.co.uk - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Error, source unknown
HI Gregor. 2009/2/3 Gregor Schneider rc4...@googlemail.com: Feb 3, 2009 12:14:23 PM org.apache.coyote.http11.Http11Protocol init SEVERE: Error initializing endpoint java.net.BindException: Address already in usenull:8080 that means that some process is using port 8080. Since a port can only be bound to one process, the attempt to bin it to a second one fails. Is it possible that Tomcat is already running? In case you#re on Linux / Unix, what gives netstat -lnp | grep 8080 ? [r...@marge apps]# netstat -lnp | grep 8080 tcp0 0 :::8080 :::* LISTEN 4014/java (Not very informative ?) Then later (may/may not be associated) Feb 3, 2009 12:14:23 PM org.apache.tomcat.util.digester.Digester fatalError SEVERE: Parse Fatal Error at line 8 column 1: Content is not allowed in trailing section. org.xml.sax.SAXParseException: Content is not allowed in trailing section. at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195) the XML-parser used is not able to parse an XML-file. Would be interesting to kniw, which XML-file we#re talking about here, though. My best guess is, that you either might have a problem with CTR/LF at the linde-ends of said XML-file or a problem with the encoding. Found that one. The user list (tomcat-users.xml) had a trailing character. Bad tomcat for not naming the file in error :-) regards -- Dave Pawson XSLT XSL-FO FAQ. Docbook FAQ. http://www.dpawson.co.uk - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat resets the connection during load
Barak Yaish wrote: How can I determine that? I haven't seen any exception in catalina.out Monitor the current thread usage (eg with LambdaProbe, JMC console, manager app) regarding out of threads... There is a proposal to log a message when this happens but with current versions you won't see anything in the logs. Mark On Tue, Feb 3, 2009 at 6:35 AM, Mark Thomas ma...@apache.org wrote: Barak Yaish wrote: I've records the traffic using Wireshark (http://www.wireshark.org), and I've noticed that Tomcat send TCP Reset to the client, before it writes the reponse to the stream. Can you please assist understanding this behavior and tuning Tomcat in order to avoid these problems? Did you run out of threads and fill the accept queue? Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat only query localhost database
Mihamina Rakotomandimby (R12y) wrote: DriverManager.getConnection(jdbc:mysql://localhost/baseName, login, password); There, I see some hardcoded localhost. Might it be the nasty evil code? -- Chef de projet chez Vectoris http://www.google.com/search?q=mihamina+rakotomandimby - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: tomcat only query localhost database
From: Mihamina Rakotomandimby (R12y) [mailto:miham...@lab.vectoris.fr] Subject: Re: tomcat only query localhost database /etc/tomcat6/Catalina/localhost/webappName.xml ?xml version=1.0 encoding=UTF-8? Context path=/norpassWeb reloadable=true docBase=norpassWeb Note that the path attribute is not allowed in a Context element placed in META-INF/context.xml or in Catalina/[host]/[appName].xml; at best you will get double deployment, at worst your webapp won't function at all. The name of the .xml file is used as the path. Also, for webapps deployed under the Host appBase directory, which this appears to be, the docBase attribute is not allowed. - 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
Re: Copy Apache
Gregor, Gregor Schneider wrote: I'm sorry, but the whole question is rediculous Yes, but the correct word is ridiculous. and needs a rephrasing at least. And maybe your answer needs this also. - What does the OP want to copy? The whole of Apache? HTML only? To me it seems as if the OP doesn't have *any* clue when it comes to Apache / Tomcat (please also refer to his previous posts). That seems indeed to be the case. But no more so than quite a few other previous posters on this list. No need to get upset. I may appear rude, Yes. however, I believe that before asking questions in a list, ppl first should at least *try* to refer to the - in this case - excellent docs. Agreed. If there are still open questions left, everybody is very welcome to ask their questions here, and I believe the list-members are more than willing to help. Yes. However, most members of this list are helping during their spare time, free of charge, just because they like Tomcat and maybe believe in the principles of Open Source. On the other hand, most members of this list are also earning their pennies with software-development / administration / whatsoever. True, wherever they are. Still, this does not mean that the members of this list are helping some offshore-wannabies to fullfill their client's (!) requirements, thus cutting off the branch they're sitting on. Now that starts sounding a bit peculiar. What do you mean by offshore ? Anyone not in the same particular country where you presently are ? (because I don't think I am either) And I thought this was a global Internet forum, dedicated to helping Apache Tomcat users worldwide, irrespective of origin, culture, nationality, beliefs. Am I wrong or naive ? Ever wondered how some offshore-companies can come up with their prices? Have a look at some posts, and you'll know... I've been wondering about the same thing reading some posts, but the presumed cultural or geographical origin or off-shoreness is not well-correlated to the (lack of) quality of the posts. I don't have any problem with a fair competition and sharing information, But the way you write, makes it sound as if you do, because the only element you had to categorise this OP as unfair, offshore or whatever was his name. If I go by the names alone, I'd bet that quite a few of the Apache Tomcat developers and helpers on this list are not direct descendants of the Mayflower crew either. Your post could offend some of them too. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: No workers.properties file in $TOMCAT_HOME/conf
From: Gregor Schneider [mailto:rc4...@googlemail.com] Subject: Re: No workers.properties file in $TOMCAT_HOME/conf before asking this list for help, I suggest you read the excellent documentation first. You'll find it at the link I've provided in one of my prevous posts. As well as this excellent how-to: http://www.catb.org/~esr/faqs/smart-questions.html - 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
Re: tomcat only query localhost database
2009/2/3 Caldarale, Charles R chuck.caldar...@unisys.com: From: Mihamina Rakotomandimby (R12y) [mailto:miham...@lab.vectoris.fr] Subject: Re: tomcat only query localhost database /etc/tomcat6/Catalina/localhost/webappName.xml ?xml version=1.0 encoding=UTF-8? Context path=/norpassWeb reloadable=true docBase=norpassWeb Note that the path attribute is not allowed in a Context element placed in META-INF/context.xml or in Catalina/[host]/[appName].xml; at best you will get double deployment, at worst your webapp won't function at all. The name of the .xml file is used as the path. Also, for webapps deployed under the Host appBase directory, which this appears to be, the docBase attribute is not allowed. What are(or where can I find them) the rules on loading an app into localhost | webapps or ROOT? the O'Reilly Tomcat book talks about using localhost where in 5.x I used to use webapps directory. TIA -- Dave Pawson XSLT XSL-FO FAQ. Docbook FAQ. http://www.dpawson.co.uk - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat configuration with multiple services
From: Jaakko Taipale [mailto:jaakko.taip...@dbmanager.fi] Subject: VS: Tomcat configuration with multiple services Connector port=80 protocol=HTTP/1.1 connectionTimeout=2 redirectPort=8443 / Connector port=443 minSpareThreads=5 maxSpareThreads=75 enableLookups=true disableUploadTimeout=true acceptCount=100 maxThreads=200 scheme=https secure=true SSLEnabled=true keystoreFile=/path/somekeystore keystorePass=* clientAuth=false sslProtocol=TLS/ Your redirectPort should target the configured HTTPS port, not thin air. Engine name=Public defaultHost=mydomain.com Host name=mydomain.com appBase=httpapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false /Host Host name=hastobehttps.mydomain.com appBase=httpsapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false /Host /Engine What are you trying to achieve with the two Host elements? How can I force that users use https(or prevent http) when they access to hastobehttps.mydomain.com? Read the servlet spec; use a transport-guarantee of CONFIDENTIAL for all your webapps. If you want HTTPS to be used for everything, put the security-constraint element in conf/web.xml so it will be picked up by all webapps. - 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
Re: tomcat only query localhost database
Mihamina Rakotomandimby (R12y) wrote: Mihamina Rakotomandimby (R12y) wrote: DriverManager.getConnection(jdbc:mysql://localhost/baseName, login, password); There, I see some hardcoded localhost. Might it be the nasty evil code? Nope, it's in a catch bloc, the app finds the database I mean, it finds the localhost database I dont want it to find... -- Chef de projet chez Vectoris http://www.google.com/search?q=mihamina+rakotomandimby - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: NoClassDefFoundError: HttpServlet
From: Ladislav Gaspar [mailto:ladislav.gas...@it-vision.com] Subject: AW: NoClassDefFoundError: HttpServlet The sample servlets work. Good - which says the problem is isolated to your webapp, so that narrows the focus. But what could that be? It looks like somewhere in your webapp, you're carrying around a second copy of HttpServlet. You'll need to go through all your jars, looking for classes that duplicate ones that Tomcat provides. Also look in the META-INF/MANIFEST.MF entries of each jar, to see if there's a Class-Path entry that links to other jars it shouldn't. - 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
Re: Copy Apache
André, just a quick one, since this becomes OT, but if you like, we can continue this discussion via personal email. André, if I'm not mistaken, you're quite new to the list. I've seen lots of similar posts here, which I consider being a complete neglet of respect to the people contributing to this list. They always follow the same principle: - You can sense that they've no clue about Tomcat / Apache / name-the-topic - Their questions can easily be answered by referring to the docs - They always have a requirement from a client to solve an issue - Often, not always, you'll find the word ASAP within their post - At least to me the impression occurs, that those guys consider the list as some free-of-charge-solve-my-problems-thingy - On top, usually they don't provide any useful information which helps solving their problem - And most certain, after their problem is solved, you' ll never see them here again contributing - I don't care about the whereabouts / wherefroms of any poster of this list, and I'd give the same answer to anybody showing the same attitude, wether they're Indian, Chinese, German, US, UK, even Belgian ;) - I'm a cosmopolitan, I'm Europena, I'm German, and I just don't care where somebody has been born bred nor where somebody comes from. What I do care about is, that some freeloaders seem to take the contribution of this list-members for granted. And yes, I've heard it so many times from prospects: Well, you've offered a great solution, but I can get the same thing cheaper if I take company xyz. Sure, company xyz has some offshore-locations, and a year later meeting the same ex-prospect again, they tell me that either - either the project went down the drains - budget was quadrupled ... Now tell me: If you hire a company to, say, maintain the engine of your car? Right: You expect, that this company has employees knowing how to do this. What's happening here is, that the mechanic doesn't have any clue of your car, goes to a pub where he knows the mechanics from other companies are hanging out and asks them get his job done - for free, of course. Maybe this example is a bit over the top, but I guess you've got the meaning. Therefore, again: - I'm a great fan of a *fair* competition - I believe in Open Source and sharing of information (you got it: sharing works only both ways!) - Least I'm anything liek a racist - ask my friends and colleques in [ enter_any_country_here] On Tue, Feb 3, 2009 at 3:12 PM, André Warnier a...@ice-sa.com wrote: Yes, but the correct word is ridiculous. I'm also not joking about language-issues. Wish I had a dime for every typo / mistake I'm making when posting here - I'd be off to SEA baking in the sun for the rest of my life. When I see such posts, usually I'm giving those guys a piece of information from where they should be able to start (see my previous answers to the OP). However, sometimes enough is enough, and personally, after re-reading my post, I even don't consider it as rude (apart from the throw-up-part) but as an open word. Sorry if anyone is bugged by this slightly longer OT-post of mine, however, I wanted to clarify that. @André: Feel free to discuss this or any other issue with me via private email. Rgds Gregor -- just because your paranoid, doesn't mean they're not after you... gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2 gpgp-key available @ http://pgpkeys.pca.dfn.de:11371 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
[Tomcat] [daemon] java.lang.OutOfMemoryError unable to create new native thread
We have an application that runs under Tomcat under RHEL 5.0 and is launched by a jsvc daemon. It chugs along seemingly fine on several servers, yet yesterday crashed on one of them with the above exception seemingly without experiencing any kind of abnormal load. I am trying to get a handle on this. System is $ uname -a Linux 2.6.18-92.1.22.el5 #1 SMP Fri Dec 5 09:29:46 EST 2008 i686 i686 i386 GNU/Linux Java version: java -version java version 1.5.0_16 Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b02) Java HotSpot(TM) Client VM (build 1.5.0_16-b02, mixed mode, sharing) no special JVM memory settings are used when launching tomcat, just the default memory allocations. I have read in some places that this particular form of OutOfMemoryError is actually made worse by increasing the memory size. I need to deploy some thread and memory monitoring setup to get a handle on this. Can someone suggest a path forward here? Thanks. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Error, source unknown
2009/2/3 Gregor Schneider rc4...@googlemail.com: Dave, On Tue, Feb 3, 2009 at 2:38 PM, Dave Pawson dave.paw...@gmail.com wrote: [r...@marge apps]# netstat -lnp | grep 8080 tcp0 0 :::8080 :::* LISTEN 4014/java (Not very informative ?) informative enough: ps -lf 4041 gives you a bit more of information about the process. The process is 'named' jsvc, rather than tomcat. since it's a java-process, I'd bet my bottom-penny that Tomcat is already running. Further bet: You tried to shut down Tomcat, but shutdown failed for whatever reasons. 'cos I was messing about with the startup and shutdown scripts using jsvc. Aftert hat: Check the log-files what went wrong when shutting down Tomcat (Rights? Maybe you tried to start Tomcat as root?) Hope that gives you a start I'm messing about trying to get TC set up (failing nicely), so I did it the hard way. Three finger salute. Without those errors it comes up properly again! One step back, another forwards now :-) Thanks to both regards -- Dave Pawson XSLT XSL-FO FAQ. Docbook FAQ. http://www.dpawson.co.uk - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: AJP vs HTTP connectors?
Mark Thomas ma...@apache.org wrote in message news:4987ccc4.3080...@apache.org... The (very) short version is: mod_proxy_ajp is not as stable as mod_jk. mod_jk and mod_proxy_http are prety much neck and neck. mod_proxy_http has a very slight edge on average but on a case by case basis either may be the better choice. Is there any documentation / howtos available for securely setting up mod_proxy_http and/or mod_proxy_ajp with tomcat? The little that I know/remember about mod_proxy_http is that if you're not careful, you can end up with some major security holes in your installation. I did a quick cursory search and found enormous references to setting up mod_jk; there doesn't seem to be as much ref material for either mod_proxy_http or mod_proxy_ajp. However, all this begs the question - what is the difference between mod_jk which communicates via AJP and mod_proxy_ajp? Doesn't mod_proxy_ajp just communicate via the AJP protocol as well? In which case, isn't that tantamount to having the same issues/considerations as the AJP protocol in the first place? Thanks, Eric - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: AJP vs HTTP connectors?
Filip Hanik - Dev Lists devli...@hanik.com wrote in message news:49876e0d.4020...@hanik.com... first and foremost, always apply ol' grandpa's logic The famous quote is if it ain't broke, don't fix it So if you are using something that is working, don't even consider switching just cause some dude on a webinar told you so. Under most circumstances, I would agree with you. But given that it was Mark Thomas, and not just some dude, giving the webinar, I didn't disregard it. Eric - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: [Tomcat] [daemon] java.lang.OutOfMemoryError unable to create new native thread
Hi Steve, Some great tools to monitor your Tomcat installations are: - Jconsole (make sure you get the topthreads plugin) - VisualVM - VisualGC - Jmap Hope that helps. On Tue, 2009-02-03 at 09:31 -0600, Steve Cohen wrote: We have an application that runs under Tomcat under RHEL 5.0 and is launched by a jsvc daemon. It chugs along seemingly fine on several servers, yet yesterday crashed on one of them with the above exception seemingly without experiencing any kind of abnormal load. I am trying to get a handle on this. System is $ uname -a Linux 2.6.18-92.1.22.el5 #1 SMP Fri Dec 5 09:29:46 EST 2008 i686 i686 i386 GNU/Linux Java version: java -version java version 1.5.0_16 Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b02) Java HotSpot(TM) Client VM (build 1.5.0_16-b02, mixed mode, sharing) no special JVM memory settings are used when launching tomcat, just the default memory allocations. I have read in some places that this particular form of OutOfMemoryError is actually made worse by increasing the memory size. I need to deploy some thread and memory monitoring setup to get a handle on this. Can someone suggest a path forward here? Thanks. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Pieter Temmerman email: ptemmerman@sadiel.es skype: ptemmerman.sadiel SADIEL TECNOLOGÍAS DE LA INFORMACIÓN, S.A. http://www.sadiel.es. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Able to access URL without port
randhir.si...@elitecore.com wrote: I had a doubt of something I had heard with regard to the access of URL possible without port number if apache is used in the environment. We have our application running with JBOSS as the AS and tomcat as the web server. My question is that is the URL, http://application-URL:10080 assuming tomcat is running on port 10080 can be accessed like http://application-URL without the port number if apache is also installed. I hope, my question is clear. Please, help in solving the doubt. regards Small knit here -- when you omit the port number in your URLs, the browser assumes port 80 for http and 443 for https protocols. Most modern browsers will also assume http protocol if you omit the http:// from the beginning of your urls as well. You could configure a connector in tomcat to listen on port 80 and eliminate Apache HTTPd all together if you like. --David - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: [Tomcat] [daemon] java.lang.OutOfMemoryError unable to create newnative thread
From: Steve Cohen [mailto:sco...@javactivity.org] Subject: [Tomcat] [daemon] java.lang.OutOfMemoryError unable to create newnative thread I have read in some places that this particular form of OutOfMemoryError is actually made worse by increasing the memory size. Not memory size, but more specifically, Java heap size. The Java heap and all the other memory consumers have to exist inside the process virtual space, which is somewhat limited on 32-bit systems. If you expand the Java heap, you reduce the amount left over for other uses (such as thread stacks) making it somewhat more likely that you'll encounter errors like the above. You can monitor the state and number of Java threads with JConsole or similar tools. If your webapp includes some native code, it might be creating threads that are unknown to the JVM, so you'll need to watch for those with whatever platfom-specific tools you have available. Taking periodic JVM thread dumps might also let you know if threads are getting stuck somewhere and never terminating. Your webapp might be creating auxiliary threads but not managing them properly. Of course, it might be some other resource leak that's eating up the process space (e.g., an excessive number of open files), and it's just thread creation that happened to get caught. - Chuck P.S. Don't cross-post. 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
Re: AJP vs HTTP connectors?
On Tue, Feb 3, 2009 at 7:38 AM, Eric B. ebe...@hotmail.com wrote: Is there any documentation / howtos available for securely setting up mod_proxy_http and/or mod_proxy_ajp with tomcat? The little that I know/remember about mod_proxy_http is that if you're not careful, you can end up with some major security holes in your installation. Do you have any references to substantiate that? Because a quick google turns up *one* reference to a DoS attack vulnerability in Apache httpd 2.0 -- which requires the attacker to *own* the system being proxied to, an unlikely scenario IMHO. And for the record I prefer mod_proxy_http because I can monitor all active production connectors with standard http requests using e.g. Nagios, as well as manually check with a browser. So I'd definitely be interested in hearing more about any other known vulnerabilities. H* -- Hassan Schroeder hassan.schroe...@gmail.com - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Apache/mod_jk serves random files from tomcat
yuvalperlov wrote: I am having the exact same symptoms with the latest versions of everything: Fedora 10 Tomcat 6.0.18 Apache Apache/2.2.10 mod_jk-1.2.27 (and the same problem with the built-in mod_proxy_ajp). It takes a day or so for the problem to start but once it does it happens more frequently - resources get mixed up. Tomcat logs show that the right resources are loaded in response to each call but on the browser end you can see images loaded in the wrong place. Restarting apache resets the problem for another day or so. This describes my issue as well. SuSE 10.3 64-bit, running Apache 2.2.11, Tomcat 6.0.16, APR 1.3.4 and mod_jk/1.2.27. I have downgraded mod_jk to 1.2.24 to see if this makes a difference. Cheers! Luke -- View this message in context: http://www.nabble.com/Apache-mod_jk-serves-random-files-from-tomcat-tp18385568p21812944.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
servlets. TC classpaths
From the logs [Loaded SimpleServlet from file:/apps/tomcat6/webapps/atom/WEB-INF/classes/SimpleServlet.class] Feb 3, 2009 3:57:06 PM org.apache.catalina.core.StandardContext listenerStart SEVERE: Error configuring application listener of class listeners.ContextListener java.lang.ClassNotFoundException: listeners.ContextListener I've loaded a very simple restlet and I'm missing something in the classpath... Guessing this is a TC jar, where should it be please... or if I need a jar file, AFAIK it should be loaded into webapps/myapp/WEB-INF/lib/myjar.jar Is that the right structure please? TIA -- Dave Pawson XSLT XSL-FO FAQ. Docbook FAQ. http://www.dpawson.co.uk - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: servlets. TC classpaths
Yes -- your webapp's jars are placed in your webapps's WEB-INF/lib folder. Unjarred classes are placed in WEB-INF/classes w/ a folder layout mirroring the package layout for your classes. BTW, listeners.ContextListener AFAIK is not a tomcat class. Maybe you've copied a web.xml off the web and used it without knowing what all the different parts are. --David Dave Pawson wrote: From the logs [Loaded SimpleServlet from file:/apps/tomcat6/webapps/atom/WEB-INF/classes/SimpleServlet.class] Feb 3, 2009 3:57:06 PM org.apache.catalina.core.StandardContext listenerStart SEVERE: Error configuring application listener of class listeners.ContextListener java.lang.ClassNotFoundException: listeners.ContextListener I've loaded a very simple restlet and I'm missing something in the classpath... Guessing this is a TC jar, where should it be please... or if I need a jar file, AFAIK it should be loaded into webapps/myapp/WEB-INF/lib/myjar.jar Is that the right structure please? TIA - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat only query localhost database
Mihamina Rakotomandimby (R12y) wrote: DriverManager.getConnection(jdbc:mysql://localhost/baseName, login, password); There, I see some hardcoded localhost. Might it be the nasty evil code? Nope, it's in a catch bloc, the app finds the database and there's no (localhost,baseName,login,password) on the area. -- Chef de projet chez Vectoris http://www.google.com/search?q=mihamina+rakotomandimby - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
AW: NoClassDefFoundError: HttpServlet
oh gosh, how embarrassing... Someone had changed the default output folder for the compiled classes but my ant scripts still deployed from the old (and now wrong) location... sorry for bothering ye, and thanks for the replies. cheers Laci --- Laci Gaspar T. +41 61 206 9617 Senior Professional www.it-vision.com portX Technik www.portx.ch IT Vision AG St. Alban-Anlage 29 Technoparkstrasse 1 4010 Basel 8005 Zürich --- -Ursprüngliche Nachricht- Von: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] Gesendet: Dienstag, 3. Februar 2009 16:07 An: Tomcat Users List Betreff: RE: NoClassDefFoundError: HttpServlet From: Ladislav Gaspar [mailto:ladislav.gas...@it-vision.com] Subject: AW: NoClassDefFoundError: HttpServlet The sample servlets work. Good - which says the problem is isolated to your webapp, so that narrows the focus. But what could that be? It looks like somewhere in your webapp, you're carrying around a second copy of HttpServlet. You'll need to go through all your jars, looking for classes that duplicate ones that Tomcat provides. Also look in the META-INF/MANIFEST.MF entries of each jar, to see if there's a Class-Path entry that links to other jars it shouldn't. - 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 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Request queue menagement Tomcat 5.5 + Axis
From: Sergio Arrighi [mailto:sergio.arri...@iminholding.com] Subject: Re: Request queue menagement Tomcat 5.5 + Axis Could you please tell me if it's possible to set the number of dedicated threads and queue lenght? As usual, it's in the doc: http://tomcat.apache.org/tomcat-5.5-doc/config/http.html Look at acceptCount and all the thread-related attributes. - 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
mod_jk sporadic errors
I am running Apache with mod_jk 1.2.26 module (on Solaris) In the same machine, I am running Tomcat 6.0.16 with the Tomcat Native Library 1.1.12 (linked to APR 1.3.3) I am getting sporadic errors on the mod_jk log as the shown below: [Tue Feb 03 08:48:29.367 2009] [13821:22] [error] ajp_get_reply::jk_ajp_common.c (1730): (localworker) Timeout with waiting reply from tomcat. Tomcat is down, stopped or network problems (errno=145) [Tue Feb 03 08:48:31.377 2009] [13821:22] [info] ajp_service::jk_ajp_common.c (2186): (localworker) sending request to tomcat failed (recoverable), because of reply timeout (attempt=1) It seems that some of the requests (from Apache to Tomcat) just get lost by the Tomcat Native Library, Apache then resends the request. If that request does not produce any Tomcat response again, Apache responds to my client with 504 Gateway timeout but sometimes my client just timeouts before getting any response from Apache. Does anybody has experienced this problem? Any solution (other than disabling the Tomcat Native Library)? -Jorge - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: ExtendedAccessLogValve pattern?
I decided to dig through the source code myself as well and also found that this is the case, so thanks. Not exactly sure why they subclassed this without inheriting any of that functionality. Caldarale, Charles R wrote: From: CameronL Subject: ExtendedAccessLogValve pattern? Can you not mix the different field patterns like this? A quick look at the code says you can't - you have to use the W3c fields, as documented here: http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/catalina/valves/ExtendedAccessLogValve.html - 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 -- View this message in context: http://www.nabble.com/ExtendedAccessLogValve-pattern--tp21802341p21813587.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat resets the connection during load
Ok, will try to search after the relevant attributes in jconsole, for the mean time I ran ab against a load balancer connected to 3 Tomcat on 3 different boxes and the scenario repeated it self: [ad...@ltse1 ~]$ ab -n 2 -k -c 1500 http://lbmachine/scale/ctx1?cc=123456; This is ApacheBench, Version 2.0.40-dev $Revision: 1.146 $ apache-2.0 Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Copyright 2006 The Apache Software Foundation, http://www.apache.org/ Benchmarking *lbmachine* (be patient) Completed 2000 requests Completed 4000 requests Completed 6000 requests apr_socket_recv: Connection reset by peer (104) Total of 6576 requests completed On Tue, Feb 3, 2009 at 3:48 PM, Mark Thomas ma...@apache.org wrote: Barak Yaish wrote: How can I determine that? I haven't seen any exception in catalina.out Monitor the current thread usage (eg with LambdaProbe, JMC console, manager app) regarding out of threads... There is a proposal to log a message when this happens but with current versions you won't see anything in the logs. Mark On Tue, Feb 3, 2009 at 6:35 AM, Mark Thomas ma...@apache.org wrote: Barak Yaish wrote: I've records the traffic using Wireshark (http://www.wireshark.org), and I've noticed that Tomcat send TCP Reset to the client, before it writes the reponse to the stream. Can you please assist understanding this behavior and tuning Tomcat in order to avoid these problems? Did you run out of threads and fill the accept queue? Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: tomcat only query localhost database
From: Dave Pawson [mailto:dave.paw...@gmail.com] Subject: Re: tomcat only query localhost database What are(or where can I find them) the rules on loading an app into localhost | webapps or ROOT? In the Tomcat docs: http://tomcat.apache.org/tomcat-6.0-doc/config/index.html Note that you have mixed up three different concepts in the above question: host, appBase, and a specific webapp. A Host (localhost) specifies a domain name that Tomcat should be serving. The appBase attribute (webapps) of the Host element specifies the default deployment directory for that Host's webapps. ROOT is the name of the default webapp for a given Host. the O'Reilly Tomcat book talks about using localhost where in 5.x I used to use webapps directory. Read the Tomcat docs first; I haven't read the O'Reilly book, so I can't comment on its veracity, but I seriously doubt that it has confused such basic concepts. - 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
Re: Documentation on the working of tomcat and architecture
tomcat.apache.org rgds gregor -- just because your paranoid, doesn't mean they're not after you... gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2 gpgp-key available @ http://pgpkeys.pca.dfn.de:11371 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat only query localhost database
Gregor Schneider wrote: Sorry, but you're providing too few informations. - please post the file /etc/tomcat6/Catalina/localhost/webappName.xml (masquerade the user-id / password!) ?xml version=1.0 encoding=UTF-8? Context path=/norpassWeb reloadable=true docBase=norpassWeb Resource name=jdbc/norpassDBPool auth=Container type=javax.sql.DataSource maxActive=100 maxIdle=100 maxWait=3 removeAbandoned=true removeAbandonedTimeout=20 logAbandoned=true autoCommit=true username= password= driverClassName=org.gjt.mm.mysql.Driver url=jdbc:mysql://77.88.777.999:3306/dbname?autoReconnect=true / /Context - please post the piece of code where the said webapp tries to create the database-connection. (A more readable version is attached) public static Connection getConnection() throws SQLException { try { if (null == s_dataSource) { try { Context envCtx = (Context) new InitialContext(); if(envCtx == null ) throw new Exception(ERROR - No Context); s_dataSource = (DataSource) envCtx.lookup(java:comp/env/jdbc/norpassDBPool); } catch (NamingException e) { e.printStackTrace(); throw e; } } return s_dataSource.getConnection(); } catch(Exception e) { try { Class.forName(org.gjt.mm.mysql.Driver); } catch (ClassNotFoundException e1) { e1.printStackTrace(); } Connection con = DriverManager.getConnection(jdbc:mysql://localhost/baseName, login, password); con.setAutoCommit(false); return con; } } -- Chef de projet chez Vectoris http://www.google.com/search?q=mihamina+rakotomandimby public static Connection getConnection() throws SQLException { try { if (null == s_dataSource) { try { Context envCtx = (Context) new InitialContext(); if(envCtx == null ) throw new Exception(ERROR - No Context); s_dataSource = (DataSource) envCtx.lookup(java:comp/env/jdbc/norpassDBPool); } catch (NamingException e) { e.printStackTrace(); throw e; } } return s_dataSource.getConnection(); } catch(Exception e) { try { Class.forName(org.gjt.mm.mysql.Driver); } catch (ClassNotFoundException e1) { e1.printStackTrace(); } Connection con = DriverManager.getConnection(jdbc:mysql://localhost/baseName, login, password); con.setAutoCommit(false); return con; } }- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: servlets. TC classpaths
2009/2/3 David Smith d...@cornell.edu: Yes -- your webapp's jars are placed in your webapps's WEB-INF/lib folder. Unjarred classes are placed in WEB-INF/classes w/ a folder layout mirroring the package layout for your classes. BTW, listeners.ContextListener AFAIK is not a tomcat class. Maybe you've copied a web.xml off the web and used it without knowing what all the different parts are. --David grin/ You guessed. Now removed. Tks -- Dave Pawson XSLT XSL-FO FAQ. Docbook FAQ. http://www.dpawson.co.uk - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: AJP vs HTTP connectors?
Hassan Schroeder hassan.schroe...@gmail.com wrote in message news:4eedb92a0902030808n399c1107x90207c3edb9d9...@mail.gmail.com... On Tue, Feb 3, 2009 at 7:38 AM, Eric B. ebe...@hotmail.com wrote: Is there any documentation / howtos available for securely setting up mod_proxy_http and/or mod_proxy_ajp with tomcat? The little that I know/remember about mod_proxy_http is that if you're not careful, you can end up with some major security holes in your installation. Do you have any references to substantiate that? Offhand, no. I played with mod_proxy a couple of years ago for some project (don't even remember what), and at the time, remember reading that incorrectly configuring it could be hazardous. More specifically than that, my memory fails. It is very possible that whatever security issues there were have been resolved. Unless anyone else has any knowledge about this? Thanks, Eric - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Error, source unknown
From: Dave Pawson [mailto:dave.paw...@gmail.com] Subject: Re: Error, source unknown [r...@marge apps]# netstat -lnp | grep 8080 tcp0 0 :::8080 :::* LISTEN 4014/java (Not very informative ?) On the contrary, it tells you that pid 4014 is using the port you want. Certainly indicative that you already have Tomcat running, or perhaps have misconfigured Connector elements. - 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
dbcp pool freezing
Hi, I'm having some trouble with my dbcp pool freezing up when running a load, and am having trouble figuring out why. I have enabled JMX on the server and connected via jConsole, and see that all my threads are in the WAITING state from org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:810) I don't believe I have any connection leaks in my code (I explicity close all my connections in a try/catch/finally), and yet, once all my connections are used up, all processes hang. I have tried enabling removeAbandoned connections, but it doesn't seem to do anything either. If I look at the numActive threads in jConsole, it is always stuck at maxThreads (in my case, 8). Increasing the number of maxThreads will unblock the problem, but it doesn't resolve the underlying question as to why this happens in the first place. I would expect that if some threads are busy doing nothing, that they would be cleaned up by the removeAbandoned option, and released to the next available thread. Resource name=jdbc/db auth=Container type=javax.sql.DataSource username=db password=db driverClassName=com.mysql.jdbc.Driver url=jdbc:mysql://localhost:3306/db?autoReconnect=true maxActive=8 maxIdle=4 removeAbandoned=true removeAbandonedTimeout=20 logAbandoned=true / Example jConsole thread trace: Name: http-8112-12 State: WAITING on org.apache.tomcat.dbcp.dbcp.abandonedobjectp...@1cee361 Total blocked: 634 Total waited: 285 Stack trace: java.lang.Object.wait(Native Method) java.lang.Object.wait(Object.java:474) org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:810) org.apache.tomcat.dbcp.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjectPool.java:84) org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:96) org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880) ... All the threads just wait in this state perpetually. I was hoping to go through the source code for the pooling, but I can't seem to find the srcs for tomcat-dbcp.jar anywhere. I realize that they are a subset of the commons-dbcp library, but was wondering if the actual sources that make up tomcat-dbcp exist anywhere. I can't find them anywhere on the tomcat site. Any ideas, suggestions or pointers would be greatly appreciated. Thanks! Eric - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: dbcp pool freezing
Hi, The first thing to be checked is probably your application. If some method does not properly close an SQL connection, you will have a leak that will ultimately lead to this resource exhaustion. To better trace if this is a case, you may for example create a Wrapper of SqlConnection that counts connection creation/close. Best regards /Philippe Eric B. a écrit : Hi, I'm having some trouble with my dbcp pool freezing up when running a load, and am having trouble figuring out why. I have enabled JMX on the server and connected via jConsole, and see that all my threads are in the WAITING state from org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:810) I don't believe I have any connection leaks in my code (I explicity close all my connections in a try/catch/finally), and yet, once all my connections are used up, all processes hang. I have tried enabling removeAbandoned connections, but it doesn't seem to do anything either. If I look at the numActive threads in jConsole, it is always stuck at maxThreads (in my case, 8). Increasing the number of maxThreads will unblock the problem, but it doesn't resolve the underlying question as to why this happens in the first place. I would expect that if some threads are busy doing nothing, that they would be cleaned up by the removeAbandoned option, and released to the next available thread. Resource name=jdbc/db auth=Container type=javax.sql.DataSource username=db password=db driverClassName=com.mysql.jdbc.Driver url=jdbc:mysql://localhost:3306/db?autoReconnect=true maxActive=8 maxIdle=4 removeAbandoned=true removeAbandonedTimeout=20 logAbandoned=true / Example jConsole thread trace: Name: http-8112-12 State: WAITING on org.apache.tomcat.dbcp.dbcp.abandonedobjectp...@1cee361 Total blocked: 634 Total waited: 285 Stack trace: java.lang.Object.wait(Native Method) java.lang.Object.wait(Object.java:474) org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:810) org.apache.tomcat.dbcp.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjectPool.java:84) org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:96) org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880) ... All the threads just wait in this state perpetually. I was hoping to go through the source code for the pooling, but I can't seem to find the srcs for tomcat-dbcp.jar anywhere. I realize that they are a subset of the commons-dbcp library, but was wondering if the actual sources that make up tomcat-dbcp exist anywhere. I can't find them anywhere on the tomcat site. Any ideas, suggestions or pointers would be greatly appreciated. Thanks! Eric - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: dbcp pool freezing
Philippe Martinou philippe.marti...@sparkom.com wrote in message news:49887d2f.3000...@sparkom.com... Hi, The first thing to be checked is probably your application. If some method does not properly close an SQL connection, you will have a leak that will ultimately lead to this resource exhaustion. To better trace if this is a case, you may for example create a Wrapper of SqlConnection that counts connection creation/close. Thanks for the idea, but isn't that the whole point of the abandoned connections tracking? ie: removeAbandoned=true, removeAbandonedTimeout=20 and logAbandoned=true. I get no logs indicating thta any connections have been abandoned. Does the abandoned tracking work? Additionally, I see this problem in 2 seperate applications I am working on. One uses explicit calls to sql.connection, and the other one uses Hibernate exclusively to do all the transaction handling. Given that I am seeing the problem on both, it leads me to believe that it isn't actually the case of forgetting to close a connection, rather than a connection not being released properly. Thoughts? Thanks, Eric - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: dbcp pool freezing
Check that you don't have garbage collection problems. A heavy GC load will show up with these symptoms you are seeing (because GC stalls threads as they acquire or release locks). - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: dbcp pool freezing
From: news [mailto:n...@ger.gmane.org] On Behalf Of Eric B. Subject: dbcp pool freezing and see that all my threads are in the WAITING state from org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrowObject (GenericObjectPool.java:810) I don't believe I have any connection leaks in my code Belief is not a substitute for evidence... Your webapp is clearly not returning connection objects to the pool in a timely fashion. Given the other observations, it may not be a traditional leak, but a logic error in your webapp that is repeatedly obtaining multiple connection objects for one request. Look deeper in the stack trace to see where in *your* code the call originates. Setting the pool size to one often helps in finding such bugs. I would expect that if some threads are busy doing nothing, that they would be cleaned up by the removeAbandoned option, and released to the next available thread. That's not the way it works. Any connection objects not returned to the pool in the specified amount of time are simply discarded and new ones created to take their place. I was hoping to go through the source code for the pooling, It's always somebody else's fault (non-sexist version of a Jimmy Buffett line). The bug is in your webapp. I can't seem to find the srcs for tomcat-dbcp.jar anywhere. The source is created during the Tomcat build process by a script that edits the package names; the code is identical with what's in commons-dbcp otherwise. - 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
Re: [Tomcat] [daemon] java.lang.OutOfMemoryError unable to create new native thread
One additional restriction I have is a security bureaucracy from hell. As far as console access I have a two-hop connection. As far as GUI access I have some crappy device to log into that lets me have really bad keyboard/mouse control of the machine, which, unless I can overcome this means that GUI-based tools are not going to work, and as for remote GUI access, see above security bureaucracy. Which means I'm looking for command-line equivalents for what JConsole does, particularly the threads tab. Any ideas along that path? Pieter Temmerman wrote: Hi Steve, Some great tools to monitor your Tomcat installations are: - Jconsole (make sure you get the topthreads plugin) - VisualVM - VisualGC - Jmap Hope that helps. On Tue, 2009-02-03 at 09:31 -0600, Steve Cohen wrote: We have an application that runs under Tomcat under RHEL 5.0 and is launched by a jsvc daemon. It chugs along seemingly fine on several servers, yet yesterday crashed on one of them with the above exception seemingly without experiencing any kind of abnormal load. I am trying to get a handle on this. System is $ uname -a Linux 2.6.18-92.1.22.el5 #1 SMP Fri Dec 5 09:29:46 EST 2008 i686 i686 i386 GNU/Linux Java version: java -version java version 1.5.0_16 Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b02) Java HotSpot(TM) Client VM (build 1.5.0_16-b02, mixed mode, sharing) no special JVM memory settings are used when launching tomcat, just the default memory allocations. I have read in some places that this particular form of OutOfMemoryError is actually made worse by increasing the memory size. I need to deploy some thread and memory monitoring setup to get a handle on this. Can someone suggest a path forward here? Thanks. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
What are the benefits of using Tomcat Native when using AJP connector?
Does anybody know what significantly means on the following paragraph of the Tomcat Native library? When APR is enabled, the AJP connector will use a socket poller for keepalive, increasing scalability of the server. As AJP is designed around a pool of persistent (or almost persistent) connections, this will reduce significantly the amount of processing threads needed by Tomcat. Unlike the HTTP connector, the AJP connector cannot use sendfile to optimize static file processing. Taken from : http://tomcat.apache.org/tomcat-5.5-doc/apr.html -Jorge - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat resets the connection during load
How can I determine that? I haven't seen any exception in catalina.out regarding out of threads... On Tue, Feb 3, 2009 at 6:35 AM, Mark Thomas ma...@apache.org wrote: Barak Yaish wrote: I've records the traffic using Wireshark (http://www.wireshark.org), and I've noticed that Tomcat send TCP Reset to the client, before it writes the reponse to the stream. Can you please assist understanding this behavior and tuning Tomcat in order to avoid these problems? Did you run out of threads and fill the accept queue? Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Error, source unknown
Dave, On Tue, Feb 3, 2009 at 2:38 PM, Dave Pawson dave.paw...@gmail.com wrote: [r...@marge apps]# netstat -lnp | grep 8080 tcp0 0 :::8080 :::* LISTEN 4014/java (Not very informative ?) informative enough: ps -lf 4041 gives you a bit more of information about the process. since it's a java-process, I'd bet my bottom-penny that Tomcat is already running. Further bet: You tried to shut down Tomcat, but shutdown failed for whatever reasons. What to do? Verify, what process actually blocks port 8080 and end that process. If it's Tomcat, run Tomcat's shutdown.sh-script If Tomcat won't shutdown using said script, a kill 4014 should help Aftert hat: Check the log-files what went wrong when shutting down Tomcat (Rights? Maybe you tried to start Tomcat as root?) Hope that gives you a start Gregor -- just because your paranoid, doesn't mean they're not after you... gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2 gpgp-key available @ http://pgpkeys.pca.dfn.de:11371 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: [Tomcat] [daemon] java.lang.OutOfMemoryError unable to create new native thread
Hi Steve, Also, a good tool for monitoring Tomcat is Lamda Probe http://www.lambdaprobe.org/d/index.htm Regards, Ovidiu On Tue, Feb 3, 2009 at 9:31 AM, Steve Cohen sco...@javactivity.org wrote: We have an application that runs under Tomcat under RHEL 5.0 and is launched by a jsvc daemon. It chugs along seemingly fine on several servers, yet yesterday crashed on one of them with the above exception seemingly without experiencing any kind of abnormal load. I am trying to get a handle on this. System is $ uname -a Linux 2.6.18-92.1.22.el5 #1 SMP Fri Dec 5 09:29:46 EST 2008 i686 i686 i386 GNU/Linux Java version: java -version java version 1.5.0_16 Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b02) Java HotSpot(TM) Client VM (build 1.5.0_16-b02, mixed mode, sharing) no special JVM memory settings are used when launching tomcat, just the default memory allocations. I have read in some places that this particular form of OutOfMemoryError is actually made worse by increasing the memory size. I need to deploy some thread and memory monitoring setup to get a handle on this. Can someone suggest a path forward here? Thanks. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- ovidiu asiminei
RE: [Tomcat] [daemon] java.lang.OutOfMemoryError unable to createnew native thread
From: Steve Cohen [mailto:sco...@javactivity.org] Subject: Re: [Tomcat] [daemon] java.lang.OutOfMemoryError unable to createnew native thread Which means I'm looking for command-line equivalents for what JConsole does, particularly the threads tab. The jstack tool will do much of that. Use jps to find the PID, and use the -l option on jstack for the most information. Other tools of interest for poking around inside a running JVM are jinfo and jmap. - 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
Re: [Tomcat] [daemon] java.lang.OutOfMemoryError unable to create new native thread
Dear Steve, One additional restriction I have is a security bureaucracy from hell. As far as console access I have a two-hop connection. Is there no test system that you can use to reproduce this, under less insane restrictions? Have you considered hauling your behind to the data center to sit behind the console for a few hours? In the past I found that I could spend days fighting the bizarre rules with half- working technical solutions, or just go to the actual machine and look at the display there. Of course, it was only a two hour drive in my case. Yours might well be at the other end of the world. As far as GUI access I have some crappy device to log into that lets me have really bad keyboard/mouse control of the machine, which, unless I can overcome this means that GUI-based tools are not going to work, and as for remote GUI access, see above security bureaucracy. Which means I'm looking for command-line equivalents for what JConsole does, particularly the threads tab. Any ideas along that path? There are some JMX command line tools, but JMX is really easy to use from code. You could write a simple JSP page to give you the figures that way. Script with curl/wget and graph with Excel. :) -- Kees Jan http://java-monitor.com/forum/ kjkos...@kjkoster.org 06-51838192 The secret of success lies in the stability of the goal. -- Benjamin Disraeli - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tuning Tomcat
From: Sergey Livanov [mailto:sergey.liva...@gmail.com] Subject: Tuning Tomcat Help me to adjust JVM, please. My configuration - win2k server, Tomcat5.5.9 system vars - JAVA_HOME=c:\jre153, CATALINA_HOME=c:\tomcat catalina.bat - set CATALINA_OPTS=-server -Xms256M -Xmx512M After start Free memory: 1.64 MB Total memory: 5.44 MB Max memory: 63.56 MB 42. http://www.catb.org/~esr/faqs/smart-questions.html Once you've read that, read this: http://wiki.apache.org/tomcat/FAQ/Performance_and_Monitoring Then come back and ask an answerable question. - 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
Re: AJP vs HTTP connectors?
Hi. Maybe slightly off-topic, but having a moment of blues and lack of inspiration/motivation about working on what I should really be working on, and just in the spirit of communicating a user experience... We are using Apache and Tomcat to provide an application, both on-site and in ASP mode, in total on about 50 different hosts right now. Our Apache/Tomcat setup is quite simple, and in fact just about the only original reason for which we are using Tomcat, is that one part of our application, which we get from another supplier, requires it as part of the interface to a back-end database system. What we do on that database system is demanding from a system point of view, but not really stressful from a Tomcat or Apache/Tomcat connector point of view. By that I mean that we do not have thousands of concurrent requests to Tomcat, it's more like 10-100 at the most. Neither do we need load-balancing or anything sophisticated like that, and we usually run just one Apache and one Tomcat on a single host. (Not always, just most of the time). We run this about 80% under Linux, 10% other Unixes, 10% Windows. Because we started this several years ago, we use mod_jk 1.2.x as a connector, as it was then the only connector available, and the setup was the same under Windows and Unix/Linux. All of this to say that in all these years, I guess a reasonable number of hundreds of thousands (or millions) of requests have been processed through mod_jk, and we have never had any significant problem with it. I had a problem a couple of months ago, due to a valid but peculiar configuration of mine (I tend to use SetHandler jakarta-servlet in Apache, rather than the more usual JkMount); I submitted the problem on this list and it elicited an immediate response, and a fix by Rainer Jung within the next 24h (at the most). Even more recently, I had a customer problem in which basically mod_jk was not involved at all, but where the mod_jk log proved a very valuable source for tracking down the problem, and this list also proved a valuable source of information and suggestions. I have had a look at mod_proxy_ajp, but did not find the available documentation very enlightening, nor the potential gains evident, and since indeed it seems to use the same AJP connector on the Tomcat side, and since we are basically happy with mod_jk, and since I am a great believer in the wisdom of the if it ain't broke, don't fix it maxim, I did not really pursue it very deeply. That is not to say that mod_proxy_ajp is not good, I just never tried it. Of course all that is also not to say that mod_jk might not be the right tool in other circumstances. But as far as we are concerned, I would state it like this : if a customer would come to us saying that they had a problem with our application, the mod_jk module would be among the very last pieces which I would suspect of being involved in the problem. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tuning Tomcat
Caldarale, Charles R wrote: From: Sergey Livanov [mailto:sergey.liva...@gmail.com] Subject: Tuning Tomcat Help me to adjust JVM, please. My configuration - win2k server, Tomcat5.5.9 system vars - JAVA_HOME=c:\jre153, CATALINA_HOME=c:\tomcat catalina.bat - set CATALINA_OPTS=-server -Xms256M -Xmx512M After start Free memory: 1.64 MB Total memory: 5.44 MB Max memory: 63.56 MB 42. http://www.catb.org/~esr/faqs/smart-questions.html Once you've read that, read this: http://wiki.apache.org/tomcat/FAQ/Performance_and_Monitoring Then come back and ask an answerable question. Chuck, you were faster. :-) I like this post, because the system parameters remind me of Chuck's portable phone, and my development system. Sergey, good points : you provided some system and Tomcat information. Not all people do that. bad points : what is the problem ? ;-) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: dbcp pool freezing
From: news [mailto:n...@ger.gmane.org] On Behalf Of Eric B. Subject: Re: dbcp pool freezing Then the question becomes why aren't they being returned at all? My timeout is 20secs; I would expect, if the Abandon tracking was working properly for me, that the connections would be returned after 20secs to the pool, and another thread would be able to continue using it. If, as I suspect, you have a loop somewhere in your webapp that keeps requesting connections, each recovered connection would be consumed as soon as it's recovered. The webapp logic would use the connection briefly, then try to go back and grab another one, and wait up to 20 seconds for the next connection recovery. - 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
RE: Tuning Tomcat
From: André Warnier [mailto:a...@ice-sa.com] Subject: Re: Tuning Tomcat Free memory: 1.64 MB Total memory: 5.44 MB Max memory: 63.56 MB I like this post, because the system parameters remind me of Chuck's portable phone, and my development system. Actually, those are just number for the Java heap, not the system; we didn't really get any system info other than OS. (And my phone is *way* bigger than that :-) - 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
tomcat including files from apache
I have a basic configuration working where Apache serves my static html and tomcat provides my dynamic data. Using Apache2 on linux with TomCat 6 and mod_jk. How do I include header files and other files from apache for my tomcat jsp files. right now I use %@ include file=/header.html% but the header.html file must be in my tomcat directory. I would like to pull that file from apache. Tomcat will not accept %@ include file=http://www.myapp.com/header.html% -- View this message in context: http://www.nabble.com/tomcat-including-files-from-apache-tp21818196p21818196.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: dbcp pool freezing
Philippe Martinou philippe.marti...@sparkom.com wrote in message news:49887d2f.3000...@sparkom.com... Hi, The first thing to be checked is probably your application. If some method does not properly close an SQL connection, you will have a leak that will ultimately lead to this resource exhaustion. To better trace if this is a case, you may for example create a Wrapper of SqlConnection that counts connection creation/close. I've been trying to figure out how to create a Wrapper of SqlConnection, but am having trouble getting this to work. Would you mind giving me a couple of pointers where to start? I tried to see if I could put my own wrapper to the MySQL driver in my context resource, but it doesn't have a get/close. And I'm not quite sure how to get my own wrapper used instead of the standard sql.connection implementation. Is there a way to indicate that you want a different implementation of sql.connection used? Thanks, Eric - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat startup issue
Chuck, Thanks for the reply. That did the trick. Thanks again! -Dan - Original Message - From: Charles R Caldarale chuck.caldar...@unisys.com To: Tomcat Users List users@tomcat.apache.org Sent: Tuesday, February 3, 2009 3:28:49 PM GMT -05:00 US/Canada Eastern Subject: RE: Tomcat startup issue From: da...@comcast.net [mailto:da...@comcast.net] Subject: Tomcat startup issue I've opened Apache Tomcat Properties, selected the Startup tab and appended -security to start That's wrong; the -security option is for the startup.bat (and catalina.bat) scripts, not for the Bootstrap class. Undo what you did, then use the tomcat5w.exe program in Tomcat's bin directory (not the Windows services snap-in), go to the Java tab, and enter this in Java Options: -Djava.security.policy=C:\Program Files\Apache Software Foundation\Tomcat 5.5\conf\catalina.policy (All on one line, of course.) Not sure if you need quotes around the value; I try to avoid having spaces in path names, for fairly obvious reasons. - 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
RE: Tomcat startup issue
From: da...@comcast.net [mailto:da...@comcast.net] Subject: Tomcat startup issue I've opened Apache Tomcat Properties, selected the Startup tab and appended -security to start That's wrong; the -security option is for the startup.bat (and catalina.bat) scripts, not for the Bootstrap class. Undo what you did, then use the tomcat5w.exe program in Tomcat's bin directory (not the Windows services snap-in), go to the Java tab, and enter this in Java Options: -Djava.security.policy=C:\Program Files\Apache Software Foundation\Tomcat 5.5\conf\catalina.policy (All on one line, of course.) Not sure if you need quotes around the value; I try to avoid having spaces in path names, for fairly obvious reasons. - 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
Re: Tomcat startup issue
da...@comcast.net wrote: Chuck, Thanks for the reply. That did the trick. And, just by curiosity, did you have to quote the \Program Files\ or not ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat including files from apache
chuckvb wrote: I have a basic configuration working where Apache serves my static html and tomcat provides my dynamic data. Using Apache2 on linux with TomCat 6 and mod_jk. How do I include header files and other files from apache for my tomcat jsp files. right now I use %@ include file=/header.html% but the header.html file must be in my tomcat directory. I would like to pull that file from apache. Tomcat will not accept %@ include file=http://www.myapp.com/header.html% Hi. Just forget for a moment that the html is generated by Tomcat. How would you do it if you wanted to have an include in a static html page served by Apache ? Then just put that in your jsp pages. No ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat startup issue
Actually, no I didn't need to. It seems to work without the double quotes. But I agree with you, it's better to do the install in a directory without spaces. -Dan - Original Message - From: André Warnier a...@ice-sa.com To: Tomcat Users List users@tomcat.apache.org Sent: Tuesday, February 3, 2009 3:59:57 PM GMT -05:00 US/Canada Eastern Subject: Re: Tomcat startup issue da...@comcast.net wrote: Chuck, Thanks for the reply. That did the trick. And, just by curiosity, did you have to quote the \Program Files\ or not ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: dbcp pool freezing
Caldarale, Charles R chuck.caldar...@unisys.com wrote in message news:0aae5ab84b013e45a7b61cb66943c17215b600c...@usea-exch7.na.uis.unisys.com... From: news [mailto:n...@ger.gmane.org] On Behalf Of Eric B. Subject: dbcp pool freezing and see that all my threads are in the WAITING state from org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrowObject (GenericObjectPool.java:810) I don't believe I have any connection leaks in my code Belief is not a substitute for evidence... Your webapp is clearly not returning connection objects to the pool in a timely fashion. I am tempted to agree with you; I just am having trouble understanding how or why they aren't being returned properly. I would expect that if some threads are busy doing nothing, that they would be cleaned up by the removeAbandoned option, and released to the next available thread. That's not the way it works. Any connection objects not returned to the pool in the specified amount of time are simply discarded and new ones created to take their place. Even better. Then the question becomes why aren't they being returned at all? My timeout is 20secs; I would expect, if the Abandon tracking was working properly for me, that the connections would be returned after 20secs to the pool, and another thread would be able to continue using it. However, this doesn't seem to happen; no threads seem to be returned to the pool and instead, everything just hangs in the WAITING state. Thanks, Eric - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Re: dbcp pool freezing
In addition to explicitly closing the connection, are you also explicitly closing out any prepared or callable statements? I had overlooked this issue one time, and while it wasn't causing a great performance hindrance per se, I could tell by my monitoring tool that many rogue connections were still left open, and that can get ugly after a while, believe me. -Original Message- From: news [mailto:n...@ger.gmane.org] On Behalf Of Eric B. Sent: Tuesday, February 03, 2009 2:05 PM To: users@tomcat.apache.org Subject: Re: dbcp pool freezing Caldarale, Charles R chuck.caldar...@unisys.com wrote in message news:0aae5ab84b013e45a7b61cb66943c17215b604a...@usea-exch7.na.uis.unisys .com... From: news [mailto:n...@ger.gmane.org] On Behalf Of Eric B. Subject: Re: dbcp pool freezing Then the question becomes why aren't they being returned at all? My timeout is 20secs; I would expect, if the Abandon tracking was working properly for me, that the connections would be returned after 20secs to the pool, and another thread would be able to continue using it. If, as I suspect, you have a loop somewhere in your webapp that keeps requesting connections, each recovered connection would be consumed as soon as it's recovered. The webapp logic would use the connection briefly, then try to go back and grab another one, and wait up to 20 seconds for the next connection recovery. I'm happy to test out an validate that theory, but based on what I've seen so far, this isn't the case at all. I've been trying to figure out how to create an sql connection wrapper class to count the number of times the connection is opened and closed (as suggested by Philippe earlier in this thread), but am actually having trouble getting it to work. I can only assume I'm doing it incorrectly. In my current application, I know that one of my queries throws an SQL exception. If I comment out the code that generates this query (or fix the query properly), then this issue disappears. However, having now found this issue, I am more concerned about finding the root cause of the problem, as opposed to simply treating the symptom, as I am seeing the same issue manifest itself in another application that doesn't have the same SQL exception. And yes, my exception is wrapped in a try/catch/finally statement, whereby I have the connection.close() in the finally{} block. Any ideas how I can further track this down? Thanks, Eric - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat including files from apache
chuckvb wrote: I have a basic configuration working where Apache serves my static html and tomcat provides my dynamic data. Using Apache2 on linux with TomCat 6 and mod_jk. How do I include header files and other files from apache for my tomcat jsp files. right now I use %@ include file=/header.html% but the header.html file must be in my tomcat directory. I would like to pull that file from apache. Tomcat will not accept %@ include file=http://www.myapp.com/header.html% see: http://java.sun.com/products/jsp/tags/11/syntaxref1112.html - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tomcat 6: How to tell a Context/Webapp where to look for files?
Hi; Tomcat: 6.0 Tomcat Installation Directory: C:\Program Files\Apache Software Foundation\Tomcat 6.0 OS: Windows XP ( Windows 5.1 service pack 2 ) Java: JDK 1.6.0_10-beta Context/Webapp Name: abcdev I'm using the above configuration to set up a development environment for myself. I used the very convenient and slick installer for Windows that automatically sets up a service for me with a useful control interface in my system tray. My web application is called abcdev.I'm setting the Context element for it in a one line file called abcdev.xml which I have placed in c:\Program Files\Apache Software Foundation\Tomcat 6.0\conf\Catalina\localhost\ I noticed that if I don't give my JSPs and my servlet a path that they look for files in CATALINA_HOME aka my installation directory: C:\Program Files\Apache Software Foundation\Tomcat 6.0 Can I have my JSPs and servlets look for files in other locations without altering the code? If so, can I do this on a context (webapp) by context (webapp) basis? My apologies if this is in the documentation. I have read the docs, but I have been away from tomcat for a few years. I'm still catching up on a learning curve. I'm not used to the jargon yet or the organization of the docs. Thanks in advance for any info Steve
RE: Tomcat 6: How to tell a Context/Webapp where to look for files?
From: Steve Mysterious [mailto:tinker...@gmail.com] Subject: Tomcat 6: How to tell a Context/Webapp where to look for files? I noticed that if I don't give my JSPs and my servlet a path that they look for files in CATALINA_HOME You should probably be using ServletContext.getResourceAsStream(), or possibly ClassLoader.getResourceAsStream(). Note that using ServletContext.getRealPath() can be problematic, since the container (Tomcat) is under no obligation to expose the file system (if any) to servlets. - 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
Fwd: Tomcat 6/IIS/Windows 2003 Server x64 (Intel E2180)
Hi all, I've been using tomcat and the isapi filter with win32 for years now. I recently tried to get tomcat 6 working on windows server 2003 x64 and have run into trouble. Using the Tomcat Connector 1.2.27 64-bit, I get the dreaded red arrow next to the ISAPI filter in IIS. I have tried both AMD and Intel versions of the connector, as well both using isapi_redirect.properties and registry settings to configure the dll. Nothing seems to work. No useful error messages or logging either. Has anyone ever managed to a setup like this working? I'm shocked that after all these years no windows guru has put together a comprehensive installer for IIS and tomcat that just works. Thanks! - Mark
Re: Tuning Tomcat
Sergey Livanov: Help me to adjust JVM, please. My configuration - win2k server, Tomcat5.5.9 I hope you follow Chuck's good advice and re-describe your problem in a way others can understand. Moreover, if you're interested in tuning, you could start by downloading a Tomcat version that is not almost 4 years old. Regards mks - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
AW: Tomcat 6/IIS/Windows 2003 Server x64 (Intel E2180)
Hi, Please excuse if this is a stupid idea in your case, but we had the same issue, until we realized that the hosting provider setup IIS x32. Did you check in task-manager if the IIS is actually running 64bits (without the asterisk)? We gave the 32bit dlls a try and - tada just works. With best regards, Thomas -Ursprüngliche Nachricht- Von: Mark Brocato [mailto:mvbroc...@biofortis.com] Gesendet: Dienstag, 3. Februar 2009 23:45 An: users@tomcat.apache.org Betreff: Fwd: Tomcat 6/IIS/Windows 2003 Server x64 (Intel E2180) Hi all, I've been using tomcat and the isapi filter with win32 for years now. I recently tried to get tomcat 6 working on windows server 2003 x64 and have run into trouble. Using the Tomcat Connector 1.2.27 64-bit, I get the dreaded red arrow next to the ISAPI filter in IIS. I have tried both AMD and Intel versions of the connector, as well both using isapi_redirect.properties and registry settings to configure the dll. Nothing seems to work. No useful error messages or logging either. Has anyone ever managed to a setup like this working? I'm shocked that after all these years no windows guru has put together a comprehensive installer for IIS and tomcat that just works. Thanks! - Mark -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tomcat startup issue
I have installed Tomcat 5.5 on a Windows 2003 box. I have it installed as a service and need to use to the -security option but it's failing on startup. I've opened Apache Tomcat Properties, selected the Startup tab and appended -security to start, so the Arguments are set to: start -security I select Apply and Ok then try to start the server. In my catalina.log I see the following error: Feb 3, 2009 2:02:36 PM org.apache.catalina.startup.Bootstrap main WARNING: Bootstrap: command start -security does not exist. My service is set up with: C:\Program Files\Apache Software Foundation\Tomcat 5.5\bin\tomcat5.exe //RS//Tomcat5 And my catalina.properties in my C:\Program Files\Apache Software Foundation\Tomcat 5.5\conf directory. I've done some Googling and I'm not finding much. Anyone have an suggestions on how to fix this? Thanks, -Dan
Re: apache tomcat connector header size
On Tue, Feb 3, 2009 at 2:08 PM, eric tse hfe...@gmail.com wrote: Can I bump up the header size of the apache tomcat connector header ??? How? I think I am trying to a big header transfer .. and it breaks in proxy point, saying fail to append header. and did route Thanks Eric Tse - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: apache tomcat connector header size
how can I bump up the header size of connector? apache tomcat connector header ??? How? I think I am trying to a big header transfer .. and it breaks in proxy point, saying fail to append header. and did route Thanks Eric Tse On Tue, Feb 3, 2009 at 2:08 PM, eric tse hfe...@gmail.com wrote: Can I bump up the header size of the apache tomcat connector header ??? How? I think I am trying to a big header transfer .. and it breaks in proxy point, saying fail to append header. and did route Thanks Eric Tse - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: dbcp pool freezing
Dear Eric, and see that all my threads are in the WAITING state from org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrowObject (GenericObjectPool.java:810) I don't believe I have any connection leaks in my code Belief is not a substitute for evidence... Your webapp is clearly not returning connection objects to the pool in a timely fashion. I am tempted to agree with you; I just am having trouble understanding how or why they aren't being returned properly. I'd suggest you look into hooking your application up to Java- monitor.com. It will pick up on Tomcat-managed data sources automatically, and it can also help you do Hibernate session leak detection (if you use Hibernate). http://java-monitor.com/forum/livedemo.php shows you what it looks like. Just click on another server @ ... to see the database connection pool usage and Hibernate sessions over the past two days (scroll down to Hibernate Sessions). If you prefer a local solution, check out p6spy. It has the capability of giving you a stack trace for each abandoned database connection. Alternately, it can show you the stack trace of each allocated JDBC connection. Of course, such stack traces are relatively expensive to make for each database operation, so you may want to disable that functionality once you solved your issues. :) -- Kees Jan http://java-monitor.com/forum/ kjkos...@kjkoster.org 06-51838192 Human beings make life so interesting. Do you know that in a universe so full of wonders, they have managed to invent boredom. Quite astonishing... -- Terry Pratchett - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: What are the benefits of using Tomcat Native when using AJP connector?
From: Jorge Medina [mailto:jmed...@e-dialog.com] Subject: What are the benefits of using Tomcat Native when using AJP connector? When APR is enabled, the AJP connector will use a socket poller for keepalive, increasing scalability of the server. As AJP is designed around a pool of persistent (or almost persistent) connections, this will reduce significantly the amount of processing threads needed by Tomcat. It does not reduce the number of threads required to handle concurrent requests, but it does eliminate the dedication of a thread to a connection when that connection is in an idle (keep-alive) state. Whether or not that's significant in your environment depends on how busy your connections are. - 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
Re: dbcp pool freezing
Caldarale, Charles R chuck.caldar...@unisys.com wrote in message news:0aae5ab84b013e45a7b61cb66943c17215b604a...@usea-exch7.na.uis.unisys.com... From: news [mailto:n...@ger.gmane.org] On Behalf Of Eric B. Subject: Re: dbcp pool freezing Then the question becomes why aren't they being returned at all? My timeout is 20secs; I would expect, if the Abandon tracking was working properly for me, that the connections would be returned after 20secs to the pool, and another thread would be able to continue using it. If, as I suspect, you have a loop somewhere in your webapp that keeps requesting connections, each recovered connection would be consumed as soon as it's recovered. The webapp logic would use the connection briefly, then try to go back and grab another one, and wait up to 20 seconds for the next connection recovery. I'm happy to test out an validate that theory, but based on what I've seen so far, this isn't the case at all. I've been trying to figure out how to create an sql connection wrapper class to count the number of times the connection is opened and closed (as suggested by Philippe earlier in this thread), but am actually having trouble getting it to work. I can only assume I'm doing it incorrectly. In my current application, I know that one of my queries throws an SQL exception. If I comment out the code that generates this query (or fix the query properly), then this issue disappears. However, having now found this issue, I am more concerned about finding the root cause of the problem, as opposed to simply treating the symptom, as I am seeing the same issue manifest itself in another application that doesn't have the same SQL exception. And yes, my exception is wrapped in a try/catch/finally statement, whereby I have the connection.close() in the finally{} block. Any ideas how I can further track this down? Thanks, Eric - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tuning Tomcat
Help me to adjust JVM, please. My configuration - win2k server, Tomcat5.5.9 system vars - JAVA_HOME=c:\jre153, CATALINA_HOME=c:\tomcat catalina.bat - set CATALINA_OPTS=-server -Xms256M -Xmx512M After start Free memory: 1.64 MB Total memory: 5.44 MB Max memory: 63.56 MB TIA . - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: [Tomcat] [daemon] java.lang.OutOfMemoryError unable to create new native thread
Steve Cohen wrote: [...] Which means I'm looking for command-line equivalents for what JConsole does, particularly the threads tab. Any ideas along that path? Not really a help here, but as I have discovered JConsole wont't even work through a simple SSH tunnel, because it wants to dynamically open a second parallel connection, which of course your tunnel knows nothing about. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: AW: Tomcat 6/IIS/Windows 2003 Server x64 (Intel E2180)
I actually installed the OS myself, so I'm sure it's 64-bit. - Mark On Feb 3, 2009, at 5:59 PM, Thomas Strauß wrote: Hi, Please excuse if this is a stupid idea in your case, but we had the same issue, until we realized that the hosting provider setup IIS x32. Did you check in task-manager if the IIS is actually running 64bits (without the asterisk)? We gave the 32bit dlls a try and - tada just works. With best regards, Thomas -Ursprüngliche Nachricht- Von: Mark Brocato [mailto:mvbroc...@biofortis.com] Gesendet: Dienstag, 3. Februar 2009 23:45 An: users@tomcat.apache.org Betreff: Fwd: Tomcat 6/IIS/Windows 2003 Server x64 (Intel E2180) Hi all, I've been using tomcat and the isapi filter with win32 for years now. I recently tried to get tomcat 6 working on windows server 2003 x64 and have run into trouble. Using the Tomcat Connector 1.2.27 64-bit, I get the dreaded red arrow next to the ISAPI filter in IIS. I have tried both AMD and Intel versions of the connector, as well both using isapi_redirect.properties and registry settings to configure the dll. Nothing seems to work. No useful error messages or logging either. Has anyone ever managed to a setup like this working? I'm shocked that after all these years no windows guru has put together a comprehensive installer for IIS and tomcat that just works. Thanks! - Mark -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: AJP vs HTTP connectors?
Eric B. wrote: Filip Hanik - Dev Lists devli...@hanik.com wrote in message news:49876e0d.4020...@hanik.com... first and foremost, always apply ol' grandpa's logic The famous quote is if it ain't broke, don't fix it So if you are using something that is working, don't even consider switching just cause some dude on a webinar told you so. Under most circumstances, I would agree with you. But given that it was Mark Thomas, and not just some dude, giving the webinar, I didn't disregard it. Thanks for the vote of confidence. If memory serves me correctly, Filip gave that webinar with me (or it might have been one of the ones where I did Europe and he did the US). Anyway, Filip makes a very good point. If it ain't broke, don't fix it should be the first consideration. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: AJP vs HTTP connectors?
Eric B. wrote: However, all this begs the question - what is the difference between mod_jk which communicates via AJP and mod_proxy_ajp? Doesn't mod_proxy_ajp just communicate via the AJP protocol as well? In which case, isn't that tantamount to having the same issues/considerations as the AJP protocol in the first place? I don't tend to work on the mod_jk / mod_proxy_ajp code so others will be able to give you more detail. mod_proxy_ajp is a port of mod_jk to the mod_proxy_* framework. It added mod_proxy_balancer and mod_proxy_ajp. Both use the AJP protocol and the Tomcat connector is exactly the same. The main issue is that bugs tend to get fixed faster in mod_jk so it is generally more stable. That said, the code changes faster in mod_jk so there is also a greater risk of a regression. Overall, general experience to date has shown mod_jk to be a better choice than mod_proxy_ajp. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Error in building mod_jk for Apache 2.2.x and Tomcat 4.x
Hi Pieter, Thank you for the response. I did check my config.log and I can see something like below. I have attached my config.log file. It has been more than a week that I am stuck with this issue. It would be really great if you could help me with this. Regards, Shweta conftest.c:10:28: ac_nonexistent.h: No such file or directory configure:5280: $? = 1 configure: failed program was: | /* confdefs.h. */ | #define PACKAGE_NAME | #define PACKAGE_TARNAME | #define PACKAGE_VERSION | #define PACKAGE_STRING | #define PACKAGE_BUGREPORT | #define PACKAGE mod_jk | #define VERSION 1.2.27 | /* end confdefs.h. */ | #include ac_nonexistent.h ... configure:10301: result: no configure:10306: checking for shl_load in -ldld configure:10341: gcc -o conftest -g -O2 conftest.c -ldld 5 ld: fatal: library -ldld: not found ld: fatal: File processing errors. No output written to conftest collect2: ld returned 1 exit status configure:10347: $? = 1 configure: failed program was: | /* confdefs.h. */ -Original Message- From: Pieter Temmerman [mailto:ptemmerman@sadiel.es] Sent: Tuesday, February 03, 2009 6:09 PM To: Tomcat Users List Subject: Re: Error in building mod_jk for Apache 2.2.x and Tomcat 4.x Maybe something went wrong during the configure step. Could you take a look at the config.log file and check whether there are any errors being logged. On Tue, 2009-02-03 at 17:59 +0530, Shweta Parakh -X (shparakh - Infosys at Cisco) wrote: Hi, I am trying to build mod_jk for Apache 2.2.11 and Tomcat 4.1.39 on Solaris platform 1. Downloaded mod_jk (version 1.2.27) source from http://tomcat.apache.org/download-connectors.cgi and is kept in /opt/mod_jk-1.2.27 directory 2. Installed apache2 in /opt/apache-2.2.11 directory. 3. I am able to configure mod_jk using below command to generate Makefile ./configure --with-apxs2=/opt/apache-2.2.11/usr/local/apache2/bin/apxs --with-java-home=/opt/support/java/Java1.6.0_05/bin/java --with-apache=/opt/apache 2.2.11/usr/local/apache2 4. I could see 3 Makefiles are generated (Makefile, Makefile.in, Makefile.am) in /opt/mod_jk-1.2.27/native But I am getting below error while running make : make[1]: *** [lib_jk.la] Error 1 make[1]: Leaving directory `/opt/mod_jk-1.2.27/native/apache-2.0' make: *** [all-recursive] Error 1 5. libtool is being given below mentioned arguments : ./libtool --mode=link gcc -o lib_jk.la -static -rpath /opt/apache-2.2.11/usr/local/apache2/modules/jk mod_jk.lo ../common/jk_ajp12_worker.lo ../common/jk_connect.lo ../common/jk_msg_buff.lo ../common/jk_util.lo ../common/jk_ajp13.lo ../common/jk_pool.lo ../common/jk_worker.lo ../common/jk_ajp13_worker.lo ../common/jk_lb_worker.lo ../common/jk_sockbuf.lo ../common/jk_map.lo ../common/jk_uri_worker_map.lo ../common/jk_ajp14.lo ../common/jk_ajp14_worker.lo ../common/jk_md5.lo ../common/jk_shm.lo ../common/jk_ajp_common.lo ../common/jk_context.lo ../common/jk_url.lo ../common/jk_status.lo false cru .libs/lib_jk.a mod_jk.o ../common/jk_ajp12_worker.o ../common/jk_connect.o ../common/jk_msg_buff.o ../common/jk_util.o ../common/jk_ajp13.o ../common/jk_pool.o ../common/jk_worker.o ../common/jk_ajp13_worker.o ../common/jk_lb_worker.o ../common/jk_sockbuf.o ../common/jk_map.o ../common/jk_uri_worker_map.o ../common/jk_ajp14.o ../common/jk_ajp14_worker.o ../common/jk_md5.o ../common/jk_shm.o ../common/jk_ajp_common.o ../common/jk_context.o ../common/jk_url.o ../common/jk_status.o 6. When I run libtool script independently in bash mode, I could see below error : ... + libtool_args='gcc -o lib_jk.la -static -rpath /opt/apache-2.2.11/usr/local/apache2/modules/jk mod_jk.lo' + test -n '' + prevarg=mod_jk.lo + case $arg in + test -z '' + echo 'libtool: link: `mod_jk.lo'\'' is not a valid libtool object' libtool: link: `mod_jk.lo' is not a valid libtool object + exit 1 Could someone please let me know what can be done to resolve this issue? Thank you. Regards, Shweta -- Pieter Temmerman email: ptemmerman@sadiel.es skype: ptemmerman.sadiel SADIEL TECNOLOGÍAS DE LA INFORMACIÓN, S.A. http://www.sadiel.es. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org