Re: Deploy 1st Service to Tomcat proper
Hi Michael, Thank you for your reply. I should hasve pasted the error. The reason I didn't wa sthat I assumed that my method of export.wardeploy was incorrect. When i click on the application in my Tomcat Manager page I get a HTTP Status 404 error telling me that my web service (requested resource) is not available. There is no error in the $Tomcat/logs folder. I checked, manager, catalina, stdout, localhost, jakarta_service,host-manager and admin logs. But I could see no error. In catalina.2009.X.X.log when I start Tomcat it says it deploys the service. When I stop Tomcat I get a message in stdout_2009.X.X, a log4j error message telling me that LogManager.repositorySelector was null. This message is coming from my service as I used to get it within Eclipse before I set up Log4j correctly but I don't think this is the cause.. this link would indicate it might not be.. http://www.mail-archive.com/log4j-u...@logging.apache.org/msg09782.html Any ideas welcome, Thanks again, Tori Michael Ludwig-6 wrote: Toriacht schrieb am 28.01.2009 um 14:48:59 (-0800): Exportwar exports a war file with the same name of my project. I can then browse from Tomcat, import and deploy this service. but if I click on teh service it get brought to an error page. Then the error message might give a hint as to what the problem is. It is probably in one of the log files in $Tomcat/logs. Also, the java project had a lot of dependencies on jar files. Do these get exported or do I have to manually deploy/copy these to my Tomcat server? That depends. You can use jar tf your.war to check what's in the JAR. Michael Ludwig - 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/Deploy-1st-Service-to-Tomcat-proper-tp21716925p21722963.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 getting stopped automatically
From: Javed420 [mailto:javed.inam...@gmail.com] I am doing processing over data from xls file on perticular request. But Tomcat gets automatically stopped in middle of execution. If anybody know reply. Does any of your code contain System.exit() when it encounters an error? Don't laugh, it's one of the commonest causes of unexpected server stops! - Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: problem regarding JK Connector
Hi, I am trying to use JK connector, but at http://tomcat.apache.org http://www.tom/ site , many documentation links are not opening/working - eg 1) http://tomcat.apache.org/connectors-doc/webserver_howto/workers.html 2) http://tomcat.apache.org/connectors-doc/reference/worker.html Kindly let me know if these links are out dated or its temporarily not working. Or kindly help me with its documents or working documentation link for Apache Tomcat connector, as I urgently need to use apache as front end with tomcat. It would be nice of you, if you can do anything related to this. Thanks in advance MItali
Re: problem regarding JK Connector
Hi, I am trying to use JK connector, but at http://tomcat.apache.org http://www.tom/ site , many documentation links are not opening/working - eg 1) http://tomcat.apache.org/connectors-doc/webserver_howto/workers.html 2) http://tomcat.apache.org/connectors-doc/reference/worker.html Kindly let me know if these links are out dated or its temporarily not working. Or kindly help me with its documents or working documentation link for Apache Tomcat connector, as I urgently need to use apache as front end with tomcat. It would be nice of you, if you can do anything related to this. Thanks in advance MItali
Re: problem regarding JK Connector
meetali dey wrote: [...] Hi. Kindly check the archives of this list, particularly in the last 2 days. There was a thread named Connecting Apache Tomcat to Apache which would probably be of great help. On this page : http://tomcat.apache.org/lists.html under Archives, you find a series of URLs that point to archives of this list. If you click for example on the one that sys MarkMail, you get a page where you can enter a search in the first line. Enter Connecting Apache Tomcat to Apache et voila ! - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Graceful Stop
Mohit Anchlia wrote: tomcat 6: Is there a way to gracefully stop tomcat similar to apache? Yes, depending on how you started it: - stop the windows service - use shutdown.(sh|bat) - kill the process - CTRL-C with focus on the DOS window Note with all of these any request that takes too long (20s? - I can't remember the exact time) to complete will be forcibly stopped. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: SECURITY breach in Tomcat
Toby Kurien wrote: Seems like the infection was related to the loose (default) password of the manager app. I suppose changing that fixed the problem. There is *no* default password for the manager application. You have to configure it yourself. If you have a Tomcat distribution that does have a default password for the manager application please let us know where you got it from so we can try and get that security hole in that non-Apache distro fixed. Mark On Thu, Jan 22, 2009 at 4:26 PM, Toby Kurien tobyis7...@gmail.com wrote: thanks. I only need ROOT and myApp (which is my application). I am the developer, admin, everything. And yes, we moved between physical server racks that actually host Virtual environments. On Thu, Jan 22, 2009 at 3:15 PM, Gregor Schneider rc4...@googlemail.com wrote: Moving servers mean we moved it physically from one box to another. IP and DNS stays the same when we move. Btw: Can I take off all the apps from webapps, except ROOT and myApp? Hacker or virus is probably exploiting some vulnerability in them. As of now, tomcat is running after restarting the whole box, but I am afraid if it will shutdown or crash. box == server-rack? Since I got no idea of your application's structure, I can't give you any advice of what to remove and what to keep. Just that much: ROOT.war ist the default application when you call your server i.e. at www.yourserver.com. Provided myApp.war is a known application, *theoretically* it might be possible that it needs additional apps, if it uses servlet-chaing etc.. It might be helpful if you could post the result of cd [Tomcat-Installation-Directory] dir -s The best method actually would be if you contact the developer of the application(s) hosted, ask them about what they expect within their application-directories and remove the rest. Toby, I'm afraid I'll have to call it a day now, however, since the guys from the US should be about to wake up after yesterday's inauguration-party, I'm pretty sure they will help you to get your feet back on the ground. I'll check the list tomorrow anyways. Good luck! 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 - 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: problem regarding JK Connector
meetali dey wrote: Hi, I am trying to use JK connector, but at http://tomcat.apache.org http://www.tom/ site , many documentation links are not opening/working - eg 1) http://tomcat.apache.org/connectors-doc/webserver_howto/workers.html 2) http://tomcat.apache.org/connectors-doc/reference/worker.html If I go to this page : http://tomcat.apache.org/connectors-doc/ and click on all the links on the left side (e.g. For the impatient, All about workers, Apache ), they all work for me. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Specific Tomcat version for Java6
Caldarale, Charles R wrote: From: Christopher Schultz [mailto:ch...@christopherschultz.net] Subject: Re: Specific Tomcat version for Java6 No. I believe all versions of Tomcat can be run on all versions of Java from 1.2 onward Don't think so. Tomcat 6 requires Java 1.5 or newer (seems to work happily even on the 1.7 beta). I'm also pretty certain you can't run 5.5 on a 1.3 JVM, but I haven't actually tried it. Correct. You might be able to get it to work with lots of extra libs and some tweaks to the source. Don't know about the 4.x Tomcat levels. Most of Tomcat 4 will run on a 1.2 JVM. Some things don't work, the CGI serv;et being one of them if I recall correctly. To get back to the original question, Tomcat 7 which will implement the servlet 3.0 spec will require a 1.6 JVM (as required by the spec). So far there are a few generics tweaks in 1.6 we are taking advantage of but no major usage of 1.6 features. That may well change as development progresses. Mark - 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: Java/Tomcat 5 CPU utilization very high under low load
Leon Rosenberg wrote: How best can I find the troubled thread on a running production system? kill -QUIT id_of_the_tomcat_process the thread dump will be printed into the catalina.out Best to take several (eg 30 thread dumps ~10 seconds apart. Mark Its best to restart the server after the thread dump, but since it's handing anyway... also include the heap info: jmap -heap pid regards Leon - 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 getting stopped automatically
Peter Crowther wrote: From: Javed420 [mailto:javed.inam...@gmail.com] I am doing processing over data from xls file on perticular request. But Tomcat gets automatically stopped in middle of execution. If anybody know reply. Does any of your code contain System.exit() when it encounters an error? Don't laugh, it's one of the commonest causes of unexpected server stops! The other is the linux OOM killer. Mark - Peter - 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
Advanced IO and Tomcat
Hello everybody! I'm doing a research on the topic Does Comet scale?. I have already developed a solution using some Javascript and Wireshark measurements. During my research I was looking for people who did this already or could give me any idea of how to configure my setting and so on. But there was not too much information. And so I developed the following 3 test cases: 1. 2 Clients, 1 initiates Updates on the resource and both receive these. 2. 2 active Clients initiating Updates on the resource and 1600 passive Clients receiving these. 3. 8 active Clients initiating and receiving Updates. (This test will be soon coming with 64 concurrent active Clients) All these test cases have shown that Comet, referring Tomcat 6, performs very well. Now at this point of my research I would be very interested in how you tested the new Comet feature. This would very much help me to evaluate my own efforts. With best regards Philipp Abromeit
Re: unwar and unjar an application
Often the following will unpack a jar or war (both): jar -xf the war or jar On Jan 29, 2009, at 12:45 AM, Mihamina Rakotomandimby (R12y) wrote: Kirk True wrote: A developer gave me just a .war file to deploy on a tomcat. I read [w|j]ar files are just zipped. The .war contains some .jar... I would like to explode all the .war (and the contained jars) and have the full code source. I could do it manually. Are you sure that the WAR and its contained JARs actually have source code? They don't by default (and I've never seen one that does)... To deplay the application, they usually put the WAR into the webapp directory and they it runs: I concluded the source code is in there. In case the war dont contain the source code: - Where is the application code? - Why do they need to upload that big file (1.1Mo big in my case)? But then there are two questions: - How to jar and war the exploded code back (to get it all archived it it was)? - if I unarchive some .jar, they dont unarchive in a subdir but directly in the current dir. How to manage that (when unarchiving _and_ re-archiving)? Well, the developper used some environment, I want to - put the code under SVN - edit it with Emacs/JDE These aren't really Tomcat-specific questions at all :( I'd advise taking each question and finding its answer via your favorite search engine. The last section of my post was to explain the goal, so that people could understand my request. Obviously I did not expect some indication about that. -- 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 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Request queue menagement Tomcat 5.5 + Axis
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?? Thank you very much Sergio Arrighi -- *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: javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
Thanks Michael for the reply. No dice. Same error message with url. I forgot to mention that this is a fresh installation of Tomcat 6 so I haven't changed anything except for trying to insert this element. Eric -Original Message- From: Michael Ludwig [mailto:mil...@gmx.de] Sent: Wednesday, January 28, 2009 6:17 PM To: Tomcat Users List Subject: Re: javax.naming.NameNotFoundException: Name jdbc is not bound in this Context Hamacher, Eric schrieb am 28.01.2009 um 08:18:21 (-0600): Resource name=jdbc/GFDataSource auth=Container type=javax.sql.DataSource maxActive=30 maxIdle=2 maxWait=1000 username=username password=password driverClassName=oracle.jdbc.OracleDriver uri=jdbc:oracle:thin:@aserver:2224:DB/ Try changing the attribute uri to url. Even though the connect URL doesn't look like your typical web URL, it is actually used to locate the service, not only to identify it. Michael Ludwig - 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: unwar and unjar an application
Mihamina Rakotomandimby (R12y) wrote: Kirk True wrote: A developer gave me just a .war file to deploy on a tomcat. I read [w|j]ar files are just zipped. The .war contains some .jar... I would like to explode all the .war (and the contained jars) and have the full code source. I could do it manually. Are you sure that the WAR and its contained JARs actually have source code? They don't by default (and I've never seen one that does)... To deplay the application, they usually put the WAR into the webapp directory and they it runs: I concluded the source code is in there. In case the war dont contain the source code: - Where is the application code? - Why do they need to upload that big file (1.1Mo big in my case)? Java classes in a .jar or .war file are normally compiled .class files (java byte code), not .java source. A .war file may also contain .jsp files, which typically do have the page source in them, which is then compiled by the servlet engine (tomcat). .Jars and particularly .war's get big because they often contain all the dependencies as well, and because a complex program takes a lot of code whether it's in source or compiled form. But then there are two questions: - How to jar and war the exploded code back (to get it all archived it it was)? - if I unarchive some .jar, they dont unarchive in a subdir but directly in the current dir. How to manage that (when unarchiving _and_ re-archiving)? Well, the developper used some environment, I want to - put the code under SVN - edit it with Emacs/JDE These aren't really Tomcat-specific questions at all :( I'd advise taking each question and finding its answer via your favorite search engine. The last section of my post was to explain the goal, so that people could understand my request. Obviously I did not expect some indication about that. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Connecting Apache Tomcat to Apache
This was also the answer for me (original poster). I placed the mount directives directly in the virtual host that I needed it in and all works well. Thank you for the assistance. I am sure I will be back with additional questions...so don't go far. Very Respectfully, Mike On Wed, 2009-01-28 at 15:03 -0800, Jordan Michaels wrote: Thanks folks. Oddly enough I ran into this same issue with almost an identical system at the same time as the original poster (odd in itself), and this solution fixed me right up. I added the JkMountCopy all line under the rest of my global jkmount lines and that fixed me right up. Thank you! Warm regards, Jordan Michaels Vivio Technologies http://www.viviotech.net/ Open BlueDragon Steering Committee Adobe Solution Provider Rainer Jung wrote: Well answered until here. I assume it's the old put your JkMount into the virtual host problem. kMount does only apply to the virtual host they are put into. So when they are in the global server, but your requests to httpd are handled by a VirtualHost, then the JkMounts are not effective for those requests. To keep it simple, you can set JkMountCopy all in the global server, or you can move the JkMount lines to the virtual hosts which should actually do the forwarding. Regards, Rainer - 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 6.0 loading servlet twice
Hi, If you go in via Tomcat's Manager app, do you see more webapps than you expect? A long time ago I made the mistake of deploying apps under the webapps directory as well as configuring them with their own context - this resulted in those particular applications being loaded twice. Also, make sure you clean out Tomcat's work directory - just to be sure that your config changes are taking effect. -- Stephen Souness Ani wrote: On Thu, Jan 29, 2009 at 11:40, Ani jadhao.anirud...@gmail.com wrote: Hello, I have a web application in which I am facing one wiered pbm. I see tomcat loading servlet twice , on which my application logic is failing and quits. Getting below error in log file. My findings : One thing I did was , inside comp folder I made a copy of website folder and renamed it to website_old. Now both folders contains servlet.jar. Will it be causing a pbm??? == Jan 29, 2009 10:48:34 AM org.apache.catalina.loader.WebappClassLoader validateJarFile INFO: validateJarFile(.\comp\website_old\WEB-INF\lib\servlet.jar) - jar no t loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class == I have Server.xml has an entry of below Context docBase=C:\Program Files\Avaya/comp/website path=/website reloadable=false crossContext=true / So tomcat should look for website folder in the specified directory, but in the C:\Program Files\Avaya/comp directory, there are two directories , website and website_old. Why tomcat is searching for C:\Program Files\Avaya/comp/website_old application if it gets the C:\Program Files\Avaya/comp/website . ?? I have tomcat6. Any reason?? --Ani - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 6.0 loading servlet twice
What m I thinking was , I have entry in context tag of server.xml as Context docBase=C:\Program Files\Avaya/comp/website path=/website reloadable=false crossContext=true / where as I have two web applicatio folders named website and website_old in side C:\Program Files\Avaya/comp. These two web app's WEB-INF folder contains servlet-api.jar I did some rnd by changing the same of website_old to old_website , that time tomcat went well. It didnt reloaded the serlvet again. So I am thinking tht the docBase might search for applications starting with names from website (in this case). Whats your thot? --Ani On Thu, Jan 29, 2009 at 20:08, Stephen Souness sou...@hotmail.com wrote: Hi, If you go in via Tomcat's Manager app, do you see more webapps than you expect? A long time ago I made the mistake of deploying apps under the webapps directory as well as configuring them with their own context - this resulted in those particular applications being loaded twice. Also, make sure you clean out Tomcat's work directory - just to be sure that your config changes are taking effect. -- Stephen Souness Ani wrote: On Thu, Jan 29, 2009 at 11:40, Ani jadhao.anirud...@gmail.com wrote: Hello, I have a web application in which I am facing one wiered pbm. I see tomcat loading servlet twice , on which my application logic is failing and quits. Getting below error in log file. My findings : One thing I did was , inside comp folder I made a copy of website folder and renamed it to website_old. Now both folders contains servlet.jar. Will it be causing a pbm??? == Jan 29, 2009 10:48:34 AM org.apache.catalina.loader.WebappClassLoader validateJarFile INFO: validateJarFile(.\comp\website_old\WEB-INF\lib\servlet.jar) - jar no t loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class == I have Server.xml has an entry of below Context docBase=C:\Program Files\Avaya/comp/website path=/website reloadable=false crossContext=true / So tomcat should look for website folder in the specified directory, but in the C:\Program Files\Avaya/comp directory, there are two directories , website and website_old. Why tomcat is searching for C:\Program Files\Avaya/comp/website_old application if it gets the C:\Program Files\Avaya/comp/website . ?? I have tomcat6. Any reason?? --Ani - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
Which lib did you put your jars in? The web app's or Tomcat's? -- Stephen Souness Hamacher, Eric wrote: Hello: This has been a truly frustrating problem. Here is what I did: Tomcat 6.0.18 JDK 1.5 u 16 Eclipse w/ WTP 3.4.1 Ojdbc14dms.jar Dms.jar I placed my drivers in lib. In web.xml, I put resource-ref res-ref-namejdbc/GFDataSource/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref I placed the following in three different places, conf/server.xml, conf/context.xml, and in a context file in my app's META-INF directory: Resource name=jdbc/GFDataSource auth=Container type=javax.sql.DataSource maxActive=30 maxIdle=2 maxWait=1000 username=username password=password driverClassName=oracle.jdbc.OracleDriver uri=jdbc:oracle:thin:@aserver:2224:DB/ For driverClassName, I've also tried oracle.jdbc.driver.OracleDriver. This application works on other servers. Please help! J. ERIC HAMACHER Software Application Developer 608.664.3859 8476 Greenway Boulevard Suite 100 Middleton, WI 53562 USA GALLUP Technology Achiever | Learner | Restorative | Intellection | Deliberative - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
Tomcat's -Original Message- From: news [mailto:n...@ger.gmane.org] On Behalf Of Stephen Souness Sent: Thursday, January 29, 2009 9:02 AM To: users@tomcat.apache.org Subject: Re: javax.naming.NameNotFoundException: Name jdbc is not bound in this Context Which lib did you put your jars in? The web app's or Tomcat's? -- Stephen Souness Hamacher, Eric wrote: Hello: This has been a truly frustrating problem. Here is what I did: Tomcat 6.0.18 JDK 1.5 u 16 Eclipse w/ WTP 3.4.1 Ojdbc14dms.jar Dms.jar I placed my drivers in lib. In web.xml, I put resource-ref res-ref-namejdbc/GFDataSource/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref I placed the following in three different places, conf/server.xml, conf/context.xml, and in a context file in my app's META-INF directory: Resource name=jdbc/GFDataSource auth=Container type=javax.sql.DataSource maxActive=30 maxIdle=2 maxWait=1000 username=username password=password driverClassName=oracle.jdbc.OracleDriver uri=jdbc:oracle:thin:@aserver:2224:DB/ For driverClassName, I've also tried oracle.jdbc.driver.OracleDriver. This application works on other servers. Please help! J. ERIC HAMACHER Software Application Developer 608.664.3859 8476 Greenway Boulevard Suite 100 Middleton, WI 53562 USA GALLUP Technology Achiever | Learner | Restorative | Intellection | Deliberative - 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 6.0 loading servlet twice
From: Ani [mailto:jadhao.anirud...@gmail.com] Subject: Re: Tomcat 6.0 loading servlet twice I have entry in context tag of server.xml Don't put Context elements in server.xml. For webapps placed in the Host appBase directory, the Context element belongs in the webapp's META-INF/context.xml file. For webapps placed outside of the Host appBase directory, the Context element must go into conf/Catalina/[host]/[appName].xml. You must not use the path attribute, and only use the docBase attribute for the second case. These two web app's WEB-INF folder contains servlet-api.jar Never, never put servlet-api.jar inside a webapp. Don't put any other jars in your webapp that the container provides. Clean up your mess, try it again, and let us know what the result is. - 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
Indicator APR is loaded - TC 5.5
Hi guys, I'm a bit puzzled: I'm running a few TC-instances, all of them using TC-native and APR. I'm used to that, once the APR is loaded, there's a line in the logs stating that the APR is being used , or, if mis-configured, that the APR cannot be found. On my Tomcat 6 on Debian this works like charm: catalina.out:INFO: Loaded APR based Apache Tomcat Native library 1.1.16. catalina.out:INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true]. However, on my Tomcat 5.5, also running on Debian, I don't find *any* information. I've specified the APRLifeCycleListener in server.xml, and even in the connector I specified an option which is only available if the APR is being used. Some snippets from my server.xml: Server port=8005 shutdown=somePass Listener className=org.apache.catalina.core.AprLifecycleListener / [...] Service name=Catalina [ ... ] Connector port=8080 maxHttpHeaderSize=8192 emptySessionPath=true useSendfile=true maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false redirectPort=8443 acceptCount=100 connectionTimeout=2 disableUploadTimeout=true address=127.0.0.1/ I have to say that I'm using mod_jk on the TC 5.5-installation being fronted by Apache HTTPD. Actually, it doesn't make sense using the APR here, however, I want to shift and run Tomcat only. tomcat.log.INFO says the following: 2009-01-29 16:34:42,672 INFO[main]: Initializing Coyote HTTP/1.1 on http-127.0.0.1-8080 2009-01-29 16:34:42,678 INFO[main]: Initializing Coyote AJP/1.3 on ajp-127.0.0.1-8009 2009-01-29 16:34:42,678 INFO[main]: Initialization processed in 1261 ms 2009-01-29 16:34:42,842 INFO[main]: Starting service Catalina 2009-01-29 16:34:42,855 INFO[main]: Starting Servlet Engine: Apache Tomcat/5.5.26 2009-01-29 16:34:43,325 INFO[main]: XML validation disabled 2009-01-29 16:34:45,686 INFO[main]: Deploying web application archive WebDemoEN.war 2009-01-29 16:34:46,037 INFO[main]: Deploying web application archive WebDemoDE.war 2009-01-29 16:34:46,682 INFO[main]: Deploying web application archive WebMailer.war 2009-01-29 16:34:47,267 INFO[main]: Starting Coyote HTTP/1.1 on http-127.0.0.1-8080 2009-01-29 16:34:47,346 INFO[main]: Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009 2009-01-29 16:34:47,485 INFO[main]: Find registry server-registry.xml at classpath resource 2009-01-29 16:34:47,680 INFO[main]: Server startup in 5001 ms So what am I missing here? Now is APR loaded or not? How can I find any indicator telling me that the APR is loaded? If the APR is not loaded - any suggestions on what I might have missed? TIA 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: Graceful Stop
When I perform tomcat stop on linux it doesn't look like it processes all the requests and then stops. It just stops right away. On Thu, Jan 29, 2009 at 2:39 AM, Mark Thomas ma...@apache.org wrote: Mohit Anchlia wrote: tomcat 6: Is there a way to gracefully stop tomcat similar to apache? Yes, depending on how you started it: - stop the windows service - use shutdown.(sh|bat) - kill the process - CTRL-C with focus on the DOS window Note with all of these any request that takes too long (20s? - I can't remember the exact time) to complete will be forcibly stopped. 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: javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
I solved the problem by putting java:/comp/env in the JNDI lookup in the code. That led me to an exception when I tried to use an ArrayDescriptor. So I tried to change my pooling form dbcp to oracle with: Resource name=jdbc/GFDataSource auth=Container type=oracle.jdbc.pool.OracleDataSource factory=oracle.jdbc.pool.OracleDataSourceFactory connectionCachingEnabled=true maxActive=30 maxIdle=2 maxWait=1000 username=GLP_S password=gideupstg driverClassName=oracle.jdbc.driver.OracleDriver url=jdbc:oracle:thin:@uxsvr3.enetrix.msn:2224:STG9/ And now I'm back to javax.naming.NameNotFoundException: Name jdbc is not bound in this Context! -Original Message- From: Hamacher, Eric [mailto:eric_hamac...@gallup.com] Sent: Thursday, January 29, 2009 9:04 AM To: Tomcat Users List Subject: RE: javax.naming.NameNotFoundException: Name jdbc is not bound in this Context Tomcat's -Original Message- From: news [mailto:n...@ger.gmane.org] On Behalf Of Stephen Souness Sent: Thursday, January 29, 2009 9:02 AM To: users@tomcat.apache.org Subject: Re: javax.naming.NameNotFoundException: Name jdbc is not bound in this Context Which lib did you put your jars in? The web app's or Tomcat's? -- Stephen Souness Hamacher, Eric wrote: Hello: This has been a truly frustrating problem. Here is what I did: Tomcat 6.0.18 JDK 1.5 u 16 Eclipse w/ WTP 3.4.1 Ojdbc14dms.jar Dms.jar I placed my drivers in lib. In web.xml, I put resource-ref res-ref-namejdbc/GFDataSource/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref I placed the following in three different places, conf/server.xml, conf/context.xml, and in a context file in my app's META-INF directory: Resource name=jdbc/GFDataSource auth=Container type=javax.sql.DataSource maxActive=30 maxIdle=2 maxWait=1000 username=username password=password driverClassName=oracle.jdbc.OracleDriver uri=jdbc:oracle:thin:@aserver:2224:DB/ For driverClassName, I've also tried oracle.jdbc.driver.OracleDriver. This application works on other servers. Please help! J. ERIC HAMACHER Software Application Developer 608.664.3859 8476 Greenway Boulevard Suite 100 Middleton, WI 53562 USA GALLUP Technology Achiever | Learner | Restorative | Intellection | Deliberative - 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 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: enableLookups=true, getRemoteHost returns ip
Thanks, Konstantin, for the thorough response! I was failing to grasp that the forward lookup portion of the method was failing because there was no forward dns mapping. I thought it was failing locally inside the java code, not in the dns system. To confirm the lack of a dns mapping, I used host ip address and received a host name. Then I tried host host name and got a host not found message. Since it's not critical that I prevent spoofing in my app, I'm using a variation of the jndi dns code you pointed out in http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4670102. Thanks again, Peter -- View this message in context: http://www.nabble.com/enableLookups%3Dtrue%2C-getRemoteHost-returns-ip-tp21696774p21731881.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: logging outgoing requests from Tomcat to SQL
Hi Christopher, thanks for the comment, it's really interesting! And it looks like more wrapping than before christmas, but I have never taken a close look on JDBC implementations (at least not this close). So, i'd be interested in that *super-sexy *class wrapper generator of yours! Also in any experience, pitfalls or sources for manuals if you might have some ideas! Thank you, Gergely Paljak 2009/1/28 Christopher Schultz ch...@christopherschultz.net: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Gergely, Gergely Paljak wrote: A want to realize a logging system for tomcat that is capable of: - logging the incoming request for Servlets (easy) - and logging the time when the Tomcat response is sent (easy as well) As you say, these are relatively easy to accomplish. - logging the outgoing SQL queries inside Tomcat while maintaining a mapping between the requested Servlet and the sent SQL queries - logging the incoming SQL query results I think your best bet is to implement your own DataSource that extends Tomcat's built-in datasource (or some other one, if you like). Have your DataSource return Connection objects that wrap the ones provided by Tomcat's DataSource object. Your Connection class should produce wrapped Statement classes that log the statements as they are executed, and wrapped ResultSet objects that do ... something else. Due to the specific JDBC spec requirements about how results are read, you may have to settle for only reading those values /actually read/ by the application, instead of the entire result set. I have implemented JDBC interface wrappers before, and they are completely miserable to do (just sooo much plumbing code). I wrote a super-sexy class wrapper generator if you're interested in doing something like this. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkmAplsACgkQ9CaO5/Lv0PAySgCfZSTz2qkBq4yZD3HCuvAYDTBb 2ygAnR3SMz+fR0Ow1rBF+lJcfjm5YJEU =wTg7 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Indicator APR is loaded - TC 5.5
Ok, since there's no comment by now, I'll try to rephrase my question: As I wrote, said Tomcat instance is fronted b Apache HTTPD via mod_jk. This means, that Tomcat in the current confuguration is only serving dynamic content, such as JSPs and Servlets, but no static HTML. I guess that the APR-message usually showing up in the logs IMHO is triggered by the APRLifeCycleListener (true?) Could it be that the APRLifeCycleListener is loaded lazy, and since no static HTML is served, the APRLifeCycleListener ist not loaded and therefore no logging-message is showing up? Would appreciate if anyone here could confirm this behaviour. 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: logging outgoing requests from Tomcat to SQL
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Gergely, Gergely Paljak wrote: And it looks like more wrapping than before christmas, but I have never taken a close look on JDBC implementations (at least not this close). So, i'd be interested in that *super-sexy *class wrapper generator of yours! Also in any experience, pitfalls or sources for manuals if you might have some ideas! As with most super-sexy code (!), it comes without documentation and without warranty. It is fairly readable, though. Enjoy! - -chris import java.io.IOException; import java.io.OutputStream; import java.io.OutputStreamWriter; import java.io.PrintWriter; import java.io.Writer; import java.lang.reflect.*; import java.util.Arrays; import java.util.ArrayList; import java.util.Collections; import java.util.HashSet; import java.util.Iterator; import java.util.Set; public class WrapperGenerator { public static void main(String[] args) throws Exception { String className = args[0]; Class clazz = Class.forName(className); new WrapperGenerator(clazz).generate(System.out); } private static String INDENT = ; private final Class _class; private final String _bareName; public WrapperGenerator(Class clazz) { if(Modifier.isFinal(clazz.getModifiers())) throw new IllegalArgumentException(Cannot wrap + clazz.getName() + : + class is final.); _class = clazz; _bareName = getShortName(_class); } public void generate(OutputStream out) throws IOException { this.generate(new OutputStreamWriter(out)); } public void generate(Writer out) throws IOException { PrintWriter pout; if(out instanceof PrintWriter) pout = (PrintWriter)out; else pout = new PrintWriter(out); generateHeader(pout); generateWrapperMethods(pout); generateFooter(pout); pout.flush(); } private void generateHeader(PrintWriter out) throws IOException { // package declaration out.println(// package ;); out.println(); // imports // out.print(import ); // out.print(_class.getName()); // out.println(;); // out.println(); // class declaration out.println(/**); out.print( * A wrapper class for ); out.print(_bareName); out.println( objects.); out.println( */); out.print(public ); if(Modifier.isStrict(_class.getModifiers())) out.print(strictfp ); out.print(class ); out.print(_bareName); out.println(Wrapper); out.print(INDENT); if(Modifier.isInterface(_class.getModifiers())) out.print(implements ); else out.print(extends ); out.println(_class.getName()); out.println({); // wrapped member out.print(INDENT); out.println(/**); out.print(INDENT); out.print( * The ); out.print(_bareName); out.println( being wrapped by this class.); out.print(INDENT); out.println( */); out.print(INDENT); out.print(private ); out.print(_class.getName()); out.println( _wrapped;); out.println(); out.print(INDENT); out.println(/**); out.print(INDENT); out.print( * Creates a new ); out.print(_bareName); out.print(Wrapper with the specified wrapped ); out.print(_bareName); out.println(.); out.print(INDENT); out.println( *); out.print(INDENT); out.print( * @param wrapped The ); out.print(_bareName); out.print( being wrapped by this); out.print(_bareName); out.println(Wrapper.); out.print(INDENT); out.println( */); out.print(INDENT); out.print(public ); out.print(_bareName); out.print(Wrapper(); out.print(_class.getName()); out.println( wrapped)); out.print(INDENT); out.println({); out.print(INDENT); out.print(INDENT); out.println(_wrapped = wrapped;); out.print(INDENT); out.println(}); } private void generateWrapperMethods(PrintWriter out) throws IOException { Method[] methods = _class.getDeclaredMethods(); for(int i=0; imethods.length; ++i) generateMethod(methods[i], out); } private void generateMethod(Method method, PrintWriter out) throws IOException { // signature if(Modifier.isFinal(method.getModifiers()) !Modifier.isStatic(method.getModifiers())) { // Class cannot be extended :( out.println(// ===);
Performance of APR
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 All, I often hear folks on the list mentioning that since the APR library is the same as that which runs under Apache httpd, the performance of the two ought to be the same for static content. I'm not so sure, so I'm asking about it. Since Tomcat's request processing is all in Java (right?), the request must first be processed by Java, including creating all those objects that are included in the request. I realize that some of those objects are created on demand (for instance, Tomcat doesn't parse all the GET and POST parameters from the request until the handling servlet actually requests one of them), but all that stuff still happens. Before the request is handed-off to APR. Is the same true of Apache httpd; that is, since Apache must do a bunch of pre-processing of the request before the bytes are actually streamed, does the performance of the two actually end up being the same? I can't help but suspect that Apache httpd will outperform Tomcat even when it's running APR for static content, merely due to the overhead of the JVM, heap management, etc. (which I realize are fairly minimal). Can anyone give a non-flame comment or point to an actual performance comparison with decent data? (I realize that the consensus on the list is that APR is /much/ faster for SSL on Tomcat which I can easily accept.) Thanks, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkmCEs8ACgkQ9CaO5/Lv0PCrLwCgtuLFAygs4NCpH/siOe5ZS3L8 HFUAn3eTSpBGLv40IEUiJOHKmaCSx5n3 =GoMU -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Performance of APR
Christopher Schultz wrote: I can't help but suspect that Apache httpd will outperform Tomcat even when it's running APR for static content, merely due to the overhead of the JVM, heap management, etc. (which I realize are fairly minimal). Can anyone give a non-flame comment or point to an actual performance comparison with decent data? Serving static content is an I/O-limited task. So whether the server code takes 450ns or 500ns to do the processing required is not significant. Provided the interface with the kernel is optimal, any server will perform roughly the same because it's the kernel doing all the work. I think you also need to factor in the labor cost to manage two different servers. I know that in our production deployments we could buy many many machines for the cost of the time we've spent trying to make AJP work. Tomcat could be 10x slower than Apache and I'd still use it to avoid the hassle. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
Hamacher, Eric wrote: I solved the problem by putting java:/comp/env in the JNDI lookup in the code. So you're not putting: java:/comp/jdbc/GFDataSource? p That led me to an exception when I tried to use an ArrayDescriptor. So I tried to change my pooling form dbcp to oracle with: Resource name=jdbc/GFDataSource auth=Container type=oracle.jdbc.pool.OracleDataSource factory=oracle.jdbc.pool.OracleDataSourceFactory connectionCachingEnabled=true maxActive=30 maxIdle=2 maxWait=1000 username=GLP_S password=gideupstg driverClassName=oracle.jdbc.driver.OracleDriver url=jdbc:oracle:thin:@uxsvr3.enetrix.msn:2224:STG9/ And now I'm back to javax.naming.NameNotFoundException: Name jdbc is not bound in this Context! -Original Message- From: Hamacher, Eric [mailto:eric_hamac...@gallup.com] Sent: Thursday, January 29, 2009 9:04 AM To: Tomcat Users List Subject: RE: javax.naming.NameNotFoundException: Name jdbc is not bound in this Context Tomcat's -Original Message- From: news [mailto:n...@ger.gmane.org] On Behalf Of Stephen Souness Sent: Thursday, January 29, 2009 9:02 AM To: users@tomcat.apache.org Subject: Re: javax.naming.NameNotFoundException: Name jdbc is not bound in this Context Which lib did you put your jars in? The web app's or Tomcat's? -- Stephen Souness Hamacher, Eric wrote: Hello: This has been a truly frustrating problem. Here is what I did: Tomcat 6.0.18 JDK 1.5 u 16 Eclipse w/ WTP 3.4.1 Ojdbc14dms.jar Dms.jar I placed my drivers in lib. In web.xml, I put resource-ref res-ref-namejdbc/GFDataSource/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref I placed the following in three different places, conf/server.xml, conf/context.xml, and in a context file in my app's META-INF directory: Resource name=jdbc/GFDataSource auth=Container type=javax.sql.DataSource maxActive=30 maxIdle=2 maxWait=1000 username=username password=password driverClassName=oracle.jdbc.OracleDriver uri=jdbc:oracle:thin:@aserver:2224:DB/ For driverClassName, I've also tried oracle.jdbc.driver.OracleDriver. This application works on other servers. Please help! J. ERIC HAMACHER Software Application Developer 608.664.3859 8476 Greenway Boulevard Suite 100 Middleton, WI 53562 USA GALLUP Technology Achiever | Learner | Restorative | Intellection | Deliberative - 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 - 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: Indicator APR is loaded - TC 5.5
Gregor Schneider: I guess that the APR-message usually showing up in the logs IMHO is triggered by the APRLifeCycleListener (true?) Yes. Could it be that the APRLifeCycleListener is loaded lazy, and since no static HTML is served, the APRLifeCycleListener ist not loaded and therefore no logging-message is showing up? Would appreciate if anyone here could confirm this behaviour. I'm not sure but I doubt it. AFAIR there's no APRLifeCycleListener in Tomcat 5.5. Looking at the changelog, this entry for 6.0.11 seems relevant, too: - Add logging to display APR capabilities on the platform. Regards mks - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Performance of APR
From: Christopher Schultz [mailto:ch...@christopherschultz.net] Subject: Performance of APR due to the overhead of the JVM, heap management, etc. Actually, object allocation these days is quite a bit faster than a malloc(), and objects that quickly become unreachable quickly cost almost nothing at GC time. Some JVMs can determine that objects are truly thread local and don't even allocate them on the heap but instead treat them like local variables in C. Can anyone give a non-flame comment or point to an actual performance comparison with decent data? The last trustworthy study I saw on this specific topic was the one from Peter Lin: http://tomcat.apache.org/articles/benchmark_summary.pdf Note that it predates APR use in Tomcat. There are some other interesting papers here: http://tomcat.apache.org/resources.html#Articles - 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: Request queue menagement Tomcat 5.5 + Axis
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
Re: Graceful Stop
Mohit Anchlia wrote: When I perform tomcat stop on linux it doesn't look like it processes all the requests and then stops. It just stops right away. And how are you stopping Tomcat? kill -9 will have the effect you describe. Mark On Thu, Jan 29, 2009 at 2:39 AM, Mark Thomas ma...@apache.org wrote: Mohit Anchlia wrote: tomcat 6: Is there a way to gracefully stop tomcat similar to apache? Yes, depending on how you started it: - stop the windows service - use shutdown.(sh|bat) - kill the process - CTRL-C with focus on the DOS window Note with all of these any request that takes too long (20s? - I can't remember the exact time) to complete will be forcibly stopped. 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 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Graceful Stop
doing /etc/init.d/tomcat stop On Thu, Jan 29, 2009 at 1:01 PM, Mark Thomas ma...@apache.org wrote: Mohit Anchlia wrote: When I perform tomcat stop on linux it doesn't look like it processes all the requests and then stops. It just stops right away. And how are you stopping Tomcat? kill -9 will have the effect you describe. Mark On Thu, Jan 29, 2009 at 2:39 AM, Mark Thomas ma...@apache.org wrote: Mohit Anchlia wrote: tomcat 6: Is there a way to gracefully stop tomcat similar to apache? Yes, depending on how you started it: - stop the windows service - use shutdown.(sh|bat) - kill the process - CTRL-C with focus on the DOS window Note with all of these any request that takes too long (20s? - I can't remember the exact time) to complete will be forcibly stopped. 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 - 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: Indicator APR is loaded - TC 5.5
From: Markus Schönhaber [mailto:tomcat-us...@list-post.mks-mail.de] Subject: Re: Indicator APR is loaded - TC 5.5 AFAIR there's no APRLifeCycleListener in Tomcat 5.5. There is in 5.5.23, but I don't know when it first appeared. I finally got around to looking at the source code; there is no logging for an error-free APR initialization in 5.5.23 or 5.5.26 (the only 5.5 sources I currently have around), but there is in 6.0.18. - 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: Graceful Stop
From: Mohit Anchlia [mailto:mohitanch...@gmail.com] Subject: Re: Graceful Stop doing /etc/init.d/tomcat stop Which is not a script supplied in a real Tomcat distribution. That one came from whatever 3rd-party repackaged version of Tomcat you're using. - 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: Performance of APR
On Thu, Jan 29, 2009 at 9:34 PM, Christopher Schultz ch...@christopherschultz.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 All, I often hear folks on the list mentioning that since the APR library is the same as that which runs under Apache httpd, the performance of the two ought to be the same for static content. I'm not so sure, so I'm asking about it. according to this free chapter of Tomcat: The Definitive Guide, Second Edition book http://oreilly.com/catalog/9780596101060/chapter/index.html tomcat's JIO (old plain java connector) outperforms apache httpd in nearly all tests, so don't bother playing with APR:) Since Tomcat's request processing is all in Java (right?), the request must first be processed by Java, including creating all those objects that are included in the request. I realize that some of those objects are created on demand (for instance, Tomcat doesn't parse all the GET and POST parameters from the request until the handling servlet actually requests one of them), but all that stuff still happens. Before the request is handed-off to APR. Is the same true of Apache httpd; that is, since Apache must do a bunch of pre-processing of the request before the bytes are actually streamed, does the performance of the two actually end up being the same? I can't help but suspect that Apache httpd will outperform Tomcat even when it's running APR for static content, merely due to the overhead of the JVM, heap management, etc. (which I realize are fairly minimal). Well, actually when it comes to IO performance Java outperforms C, so I wouldn't place my money on old bets like C is faster because its C. It isn't. Can anyone give a non-flame comment or point to an actual performance comparison with decent data? yeah, check the link (and buy the book :-)) regards Leon - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Graceful Stop
Caldarale, Charles R wrote: From: Mohit Anchlia [mailto:mohitanch...@gmail.com] Subject: Re: Graceful Stop doing /etc/init.d/tomcat stop Mohit, can you supply that script /etc/init.d/tomcat here ? Let's have a look. And remind us of the exact platform on which you're running this. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
commons-logging problem
I have a web application running in Tomcat 5.5.27 with JDK 1.5.0_16-b02 on Windows XP SP3. log4j-1.2.15.jar and commons-logging-1.1.1.jar are installed in WEB-INF/lib and there is a context.xml file in META-INF. When packaged as a war file this combination reliably produces the exception shown below in the Tomcat console under the following circumstances: 1. deploy the war file (e.g. using Tomcat HTTP manager) 2. stop and restart tomcat 3. undeploy the war file 4. deploy the war file Note that to demonstrate this it is necessary to have both a context.xml file in META-INF and commons-logging-1.1.1.jar in WEB-INF/lib. Also, the problem disappears if you downgrade to commons-logging-1.0.4. Otherwise the contents of the application don't seem to matter - it can be demonstrated in an application containing no classes or other libraries. The only other thing I've found to have an effect is the *name* of the application. commons-logging-test exhibits the problem, but in at least one test renaming the same application to start with a letter later in the alphabet did not (possibly to do with the order applications are loaded)? I suspect this is a bug either in Tomcat or the logging sub-system, but these things are notoriously tricky and before reporting it as such any comments or help would be very welcome. Thanks, John. === 29-Jan-2009 21:07:43 org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive commons-logging-test.war 29-Jan-2009 21:07:43 org.apache.catalina.core.StandardContext processTlds SEVERE: Error reading tld listeners java.lang.NullPointerException java.lang.NullPointerException at org.apache.log4j.Category.isEnabledFor(Category.java:749) at org.apache.commons.logging.impl.Log4JLogger.isTraceEnabled(Log4JLogg r.java:333) at org.apache.catalina.startup.TldConfig.tldScanResourcePaths(TldConfig java:581) at org.apache.catalina.startup.TldConfig.execute(TldConfig.java:282) at org.apache.catalina.core.StandardContext.processTlds(StandardContext java:4307) at org.apache.catalina.core.StandardContext.start(StandardContext.java: 144) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBas .java:760) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:7 0) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544 at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:831 at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:51 ) at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1232) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcce sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java 458) at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataIm l.java:213) at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:220) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(Default BeanServerInterceptor.java:815) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:78 ) at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java 1397) at org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.jav :635) at org.apache.catalina.manager.ManagerServlet.doPut(ManagerServlet.java 424) at javax.servlet.http.HttpServlet.service(HttpServlet.java:650) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(App icationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Application ilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapper alve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContext alve.java:172) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentic torBase.java:525) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve. ava:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve. ava:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVa ve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.ja a:174) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.jav :875) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler. rocessConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndp int.java:528) at
Force loading a page on restart
I would like to know if it is possible to force a user to a certain page when Tomcat restarts. In my application, if Tomcat is restarted after the user displays a page, the user is not aware of the restart until he/she clicks on a link or button on that page. Then, Tomcat will automatically redirect to the login page. This is OK so far. However, the problem I have is what happens after the user logs in. I am using RichFaces and after login, there usually is some AJAX response being processed, but this usually leads to a page only being partially updated. I would like to force full reload of a specific page, say the users's home page, if Tomcat is restarted after the user has authenticated. How can i do this? I am using Tomcat 6.0.18 and RichFaces 3.3.0. Martin
RE: commons-logging problem
From: John Holman [mailto:j.g.hol...@qmul.ac.uk] Subject: commons-logging problem When packaged as a war file this combination reliably produces the exception shown below in the Tomcat console under the following circumstances: This is likely the result of a fix to prevent PermGen from filling up after some number of webapp redeployments. You can try disabling the newer behavior by setting the system property: org.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES to false. Doc is here: http://tomcat.apache.org/tomcat-5.5-doc/config/systemprops.html#Other The original bug report is here: https://issues.apache.org/bugzilla/show_bug.cgi?id=41939 - 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
Excel file in Tomcat Virtual Dir has junk data in it.
Hello Everyone, I have set up a Virtual Directory (Directory Listing) in Tomcat. We use this to distribute documents and reports. The way we do is put the documents to be distributed in this directory on the server and all our user go to this virtual directory by accessing a URL and view/get their reports. I have put a .xls file in there, and when we open it - it opens in the browser itself and what it seems to have is junk data in it. (unreadable). However instead of clicking it to open, if we do Save the target as.. and save it in the local machine and change the extension from .htm to .xls the report comes to full-life and its all good. We used to have similar virtual directory in Apache before. I remember that if we clicked on the .xls report, instead of opening it in the browser, it would begin downloading it to the local machine as an Excel file, so that was very good. Is there any settings in Tomcat which we can set so that instead of opening files in the browser itself, it would download it to the users' PC with the correct file extensions? Any insight and recommendations in this regard would be greatly appreciated. Thanks in Advance Uddav -- View this message in context: http://www.nabble.com/Excel-file-in-Tomcat-Virtual-Dir-has-junk-data-in-it.-tp21737355p21737355.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: Excel file in Tomcat Virtual Dir has junk data in it.
From: uddav [mailto:adi.upr...@gmail.com] Subject: Excel file in Tomcat Virtual Dir has junk data in it. I have set up a Virtual Directory (Directory Listing) in Tomcat. How? While you're at it, you might want to tell us what version of Tomcat you're using, and perhaps the JVM vendor and level, and maybe the platform you're running on. Since you didn't bother to tell us that, one can only speculate that the mime-mapping entries in conf/web.xml are not correct. - 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: Excel file in Tomcat Virtual Dir has junk data in it.
uddav wrote: [...] In the conf directory of your Tomcat installation is a file called web.xml. That file contains a section which tells Tomcat about the correspondence between file extensions and their mime type. Check if it contains a section like this one : mime-mapping extensionxls/extension mime-typeapplication/vnd.ms-excel/mime-type /mime-mapping If not, add it, restart Tomcat and retry. When Tomcat (like other webservers) sends data to a browser, it tells it what kind of data this is, via a HTTP header sent along with the data. The browser should normally accept this information, and handle the received data accordingly. Now, if the browser you are using is Internet Explorer, it is possible that even when the webserver tells it what kind of file it is sending (like application/vnd.ms-excel above), IE in it's wisdom might do its own check and decide otherwise. I would not be surprised if even for an Excel file it got it wrong. In that case, you might want to try the same link with Firefox, just to check. There also exist tools, for IE and Firefox, which allow you to see exactly what the server is sending to the browser in terms of description of the file. If your problem persists, you might want to use one of those to find out for sure. Firefox : LiveHttpHeader add-on IE : Fiddler2 (search Google) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: commons-logging problem
Thank you - disabling the PermGen fix by setting org.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES to false stops the exception from appearing, as you suggested. Doing this does make me a bit nervous though, as we've had problems with PermGen memory exhaustion in the past. It also suggests that this fix has problems of its own. I have a very simple test war that demonstrates the problem - is it worth filing a bug report to pinpoint what's going wrong in this particular case? Also is it a supported configuration to use commons-logging and log4j in WEB-INF/lib? I can't find a definitive statement one way or the other in the Tomcat docs, but it seems necessary to do this to get debugging info from digester etc. Unless I'm missing something. Many thanks, John. Caldarale, Charles R wrote: From: John Holman [mailto:j.g.hol...@qmul.ac.uk] Subject: commons-logging problem When packaged as a war file this combination reliably produces the exception shown below in the Tomcat console under the following circumstances: This is likely the result of a fix to prevent PermGen from filling up after some number of webapp redeployments. You can try disabling the newer behavior by setting the system property: org.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES to false. Doc is here: http://tomcat.apache.org/tomcat-5.5-doc/config/systemprops.html#Other The original bug report is here: https://issues.apache.org/bugzilla/show_bug.cgi?id=41939 - 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: commons-logging problem
From: John Holman [mailto:j.g.hol...@qmul.ac.uk] Subject: Re: commons-logging problem Doing this does make me a bit nervous though, as we've had problems with PermGen memory exhaustion in the past. I think your nervousness is quite justified. is it worth filing a bug report to pinpoint what's going wrong in this particular case? Wouldn't hurt. At worst, it will be closed with a pointer to the original bug. Also is it a supported configuration to use commons-logging and log4j in WEB-INF/lib? That I don't know for sure, but I don't see why it wouldn't be o.k. AFAIK, commons-logging can be used with a variety of logging packages. - 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: Performance of APR
David Boreham wrote: I think you also need to factor in the labor cost to manage two different servers. I know that in our production deployments we could buy many many machines for the cost of the time we've spent trying to make AJP work. Tomcat could be 10x slower than Apache and I'd still use it to avoid the hassle. Of course if you need load balancing across multiple Tomcats you either need Apache or a dedicated load balancer appliance. Also Apache 2.2 allows easy configurable authentication (or a single resource/URL) against multiple authentication repositories, e.g. multiple LDAPs. Last I investigated Tomcat did not. I'd love to see a simple world of only needing Tomcat and no front-end web server. For starters Tomcat should provide high-performance load-balancing from one front-end Tomcat to multiple backend Tomcats and easy authentication against multiple LDAPs. After that there are other issues, e.g. security providers that provide Apache but not Tomcat plug-ins, but these would seemingly impact far fewer folk. In fact, I'd bet fairly few of us need the multi-LDAP stuff -- just giving good, high-performance load balancing over Tomcats by a Tomcat would be huge. -- Jess Holle - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Installing Tomcat
I have been trying to install Tomcat 4.1.39 and failing miserably. My fault, fair enough for that. But I am struck that when I installed Apache HHTP there was an installer that gave me some warnings about why it failed. I had messages that I could do a net search and learn to fix. The only thing that I found are some instructions for manually installing Tomcat and I have no clue why it's not working.
Re: Installing Tomcat
What are you trying to install it on? We can help point you in the right direction. Warm regards, Jordan Michaels Vivio Technologies http://www.viviotech.net/ Open BlueDragon Steering Committee Adobe Solution Provider michel wrote: I have been trying to install Tomcat 4.1.39 and failing miserably. My fault, fair enough for that. But I am struck that when I installed Apache HHTP there was an installer that gave me some warnings about why it failed. I had messages that I could do a net search and learn to fix. The only thing that I found are some instructions for manually installing Tomcat and I have no clue why it's not working. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Installing Tomcat
Jordan, Much thanks for the response and thinking it over after I emailed this I have some idea where I went wrong, so I'll try to fix it. But I am just frustrated that installing Tomcat involves so much guess-work as oppossed to having some clues. The people who develop Tomcat are obviously a lot more intelligent than I am so they don't need an installer but a dufus like me would love it. Thanks! - Original Message - From: Jordan Michaels jor...@viviotech.net To: Tomcat Users List users@tomcat.apache.org Sent: Thursday, January 29, 2009 8:43 PM Subject: Re: Installing Tomcat What are you trying to install it on? We can help point you in the right direction. Warm regards, Jordan Michaels Vivio Technologies http://www.viviotech.net/ Open BlueDragon Steering Committee Adobe Solution Provider michel wrote: I have been trying to install Tomcat 4.1.39 and failing miserably. My fault, fair enough for that. But I am struck that when I installed Apache HHTP there was an installer that gave me some warnings about why it failed. I had messages that I could do a net search and learn to fix. The only thing that I found are some instructions for manually installing Tomcat and I have no clue why it's not working. - 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: Installing Tomcat
The main rule of thumb is that with simplicity comes limitation, and with flexibility comes complexity. A Tomcat install may seem complex at first glance, but it's because it can do so much with it (IMO). There are *so many* things you can do with it, and so many different ways you can install it. It can seem a bit overwhelming at first. Once you're familiar with how you want to set it up though, it's really pretty simple. You're taking the right road here. You're becoming familiar with it and once you do that, everything becomes a lot easier to understand. HTH. Warm regards, Jordan Michaels Vivio Technologies http://www.viviotech.net/ Open BlueDragon Steering Committee Adobe Solution Provider michel wrote: Jordan, Much thanks for the response and thinking it over after I emailed this I have some idea where I went wrong, so I'll try to fix it. But I am just frustrated that installing Tomcat involves so much guess-work as oppossed to having some clues. The people who develop Tomcat are obviously a lot more intelligent than I am so they don't need an installer but a dufus like me would love it. Thanks! - Original Message - From: Jordan Michaels jor...@viviotech.net To: Tomcat Users List users@tomcat.apache.org Sent: Thursday, January 29, 2009 8:43 PM Subject: Re: Installing Tomcat What are you trying to install it on? We can help point you in the right direction. Warm regards, Jordan Michaels Vivio Technologies http://www.viviotech.net/ Open BlueDragon Steering Committee Adobe Solution Provider michel wrote: I have been trying to install Tomcat 4.1.39 and failing miserably. My fault, fair enough for that. But I am struck that when I installed Apache HHTP there was an installer that gave me some warnings about why it failed. I had messages that I could do a net search and learn to fix. The only thing that I found are some instructions for manually installing Tomcat and I have no clue why it's not working. - 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 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Installing Tomcat
From: michel [mailto:compu...@videotron.ca] Subject: Re: Installing Tomcat But I am just frustrated that installing Tomcat involves so much guess-work as oppossed to having some clues. I'm really confused by your statement. I have to admit that I've never installed the ancient level you're trying to use, but I have installed 5.0, 5.5, and 6.0 on several different platforms, including our proprietary mainframe. In all cases, it was simply download, unzip (or untar), run the startup script, done. Note that in all cases I was using a real Tomcat download (not a 3rd-party repackaged corruption) and a real JVM (not gcj). So what is the source of your frustration? - 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: Installing Tomcat
many of the earlier bugs with TC 4 were fixed by the latest Tomcat Distro.. TC 6 http://tomcat.apache.org/download-60.cgi Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. From: compu...@videotron.ca To: users@tomcat.apache.org Subject: Installing Tomcat Date: Thu, 29 Jan 2009 20:13:40 -0500 I have been trying to install Tomcat 4.1.39 and failing miserably. My fault, fair enough for that. But I am struck that when I installed Apache HHTP there was an installer that gave me some warnings about why it failed. I had messages that I could do a net search and learn to fix. The only thing that I found are some instructions for manually installing Tomcat and I have no clue why it's not working. _ Windows Live™: E-mail. Chat. Share. Get more ways to connect. http://windowslive.com/howitworks?ocid=TXT_TAGLM_WL_t2_allup_howitworks_012009
Re: Installing Tomcat
Chuck, I am using the real Tomcat. I set up java and it runs, I added the different environment variables but it won't start. I will just go to 5.5 and see what happens. Thanks! - Original Message - From: Caldarale, Charles R chuck.caldar...@unisys.com To: Tomcat Users List users@tomcat.apache.org Sent: Thursday, January 29, 2009 9:34 PM Subject: RE: Installing Tomcat From: michel [mailto:compu...@videotron.ca] Subject: Re: Installing Tomcat But I am just frustrated that installing Tomcat involves so much guess-work as oppossed to having some clues. I'm really confused by your statement. I have to admit that I've never installed the ancient level you're trying to use, but I have installed 5.0, 5.5, and 6.0 on several different platforms, including our proprietary mainframe. In all cases, it was simply download, unzip (or untar), run the startup script, done. Note that in all cases I was using a real Tomcat download (not a 3rd-party repackaged corruption) and a real JVM (not gcj). So what is the source of your frustration? - 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: Installing Tomcat
From: michel [mailto:compu...@videotron.ca] Subject: Re: Installing Tomcat I set up java and it runs What JVM? (The 4.1 version of Tomcat requires a JDK, not just a JRE.) What platform? Problem solving is pretty much impossible without specifics. I added the different environment variables There's only one environment variable needed: JAVA_HOME; the rest are set by the startup.bat or startup.sh scripts automatically. I will just go to 5.5 and see what happens. I'd suggest using 6.0, don't bother with the older versions unless you have a specific need for them (e.g., matching some existing implementation). For 5.5 and 6.0, you will need a 1.5 or 1.6 JRE (a JDK also works, but isn't required). If you have a JRE, set JRE_HOME, not JAVA_HOME. (You can run 5.5 on a 1.4 JVM, but it's more complicated and there's really no reason to do so.) - 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: Installing Tomcat
Chuck, Thanks, and I'll go with 6.0 as you suggest. Right now I am just trying to learn how to get different servers and software systems set up and working. But at this time I am better to give up on Tomcat 4 anyway since I can't get it working and it's out do date anyway. - Original Message - From: Caldarale, Charles R chuck.caldar...@unisys.com To: Tomcat Users List users@tomcat.apache.org Sent: Thursday, January 29, 2009 10:01 PM Subject: RE: Installing Tomcat From: michel [mailto:compu...@videotron.ca] Subject: Re: Installing Tomcat I set up java and it runs What JVM? (The 4.1 version of Tomcat requires a JDK, not just a JRE.) What platform? Problem solving is pretty much impossible without specifics. I added the different environment variables There's only one environment variable needed: JAVA_HOME; the rest are set by the startup.bat or startup.sh scripts automatically. I will just go to 5.5 and see what happens. I'd suggest using 6.0, don't bother with the older versions unless you have a specific need for them (e.g., matching some existing implementation). For 5.5 and 6.0, you will need a 1.5 or 1.6 JRE (a JDK also works, but isn't required). If you have a JRE, set JRE_HOME, not JAVA_HOME. (You can run 5.5 on a 1.4 JVM, but it's more complicated and there's really no reason to do so.) - 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: Tomcat returns HTTP status of 200 when HttpServletResponse.sendError() called.
From: Nathan Potter [mailto:n...@opendap.org] Subject: Re: Tomcat returns HTTP status of 200 when HttpServletResponse.sendError() called. Sorry for not responding earlier, things have been a little hectic this week. I just got try it today and here is what happened: I just tried the same thing, with no problems. I made this class: I don't see a package clause in your code, nor are the imports shown. Here's the entire code I used, including the poor man's logger, System.out: package mypackage; import javax.servlet.http.HttpServletRequest; import org.apache.catalina.Globals; public class StaticContentServlet extends org.apache.catalina.servlets.DefaultServlet { protected String getRelativePath(HttpServletRequest request) { // Are we being processed by a RequestDispatcher.include()? if (request.getAttribute(Globals.INCLUDE_REQUEST_URI_ATTR) != null) { String result = (String)request.getAttribute(Globals.INCLUDE_PATH_INFO_ATTR); if (result == null) { result = (String)request.getAttribute(Globals.INCLUDE_SERVLET_PATH_ATTR); } if (result == null || result.equals()) result = /; System.out.println(StaticContentServlet returning + result); return result; } // No, extract the desired path directly from the request. String result = request.getPathInfo(); if (result == null) { result = request.getServletPath(); } else { result = request.getServletPath() + result; } if (result == null || result.equals()) result = /; System.out.println(StaticContentServlet returning + result); return result; } } I added it to my web.xml file: Mine is almost the same, with the addition of a listings param: servlet servlet-namedocs/servlet-name servlet-classmypackage.StaticContentServlet/servlet-class init-param param-namelistings/param-name param-valuetrue/param-value /init-param load-on-startup1/load-on-startup /servlet just so the /docs mapping would do something useful. (The servlet mappings are identical to yours.) Referencing the URLs: http://localhost:8080/sample/docs http://localhost:8080/sample/docs/test.txt got me this result in stdout: StaticContentServlet returning /docs StaticContentServlet returning /docs/test.txt and the expected directory listings and the text file contents in the browser window. - 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: UnsatisfiedLinkError in Windows Service (tomcat6w/5w.exe)
From: Michael Ludwig [mailto:mil...@gmx.de] Subject: Re: UnsatisfiedLinkError in Windows Service (tomcat6w/5w.exe) -Djava.library.path=C:\Server;C:\src\BerkeleyDbXml\dbxml-2.4.1 6\bin\debug;... Is *src* really the right place to find the DLLs? I realize it's long, but can you post the full string? Where you see ... I can see what looks like the value of my PATH. Can you post the full version of that as well? Plus, in my case, C:\WINDOWS\Sun\Java\bin. Shouldn't matter, as this doesn't exist. Yes, I now realize I get that too, when Tomcat is run as a service (I don't have such a directory either). I presume the tomcat6.exe launcher adds it for prehistoric reasons. So I guess there is something wrong with Tomcat here. I can't see how, unless there's something really odd going on with the classloader hierarchy. Can you post the full stack trace of the UnsatisfiedLinkError? I wonder if there's a custom classloader that's getting in the way, since I don't have any problems with Tomcat's set of classloaders accessing native libraries specified by the java.library.path setting. - 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: Performance of APR
Jess Holle wrote: David Boreham wrote: I think you also need to factor in the labor cost to manage two different servers. I know that in our production deployments we could buy many many machines for the cost of the time we've spent trying to make AJP work. Tomcat could be 10x slower than Apache and I'd still use it to avoid the hassle. Of course if you need load balancing across multiple Tomcats you either need Apache or a dedicated load balancer appliance. Also Apache 2.2 allows easy configurable authentication (or a single resource/URL) against multiple authentication repositories, e.g. multiple LDAPs. Last I investigated Tomcat did not. The new combined realm (as of 6.0.19) will let you do this. No Tomcat only load balancing though. Mark I'd love to see a simple world of only needing Tomcat and no front-end web server. For starters Tomcat should provide high-performance load-balancing from one front-end Tomcat to multiple backend Tomcats and easy authentication against multiple LDAPs. After that there are other issues, e.g. security providers that provide Apache but not Tomcat plug-ins, but these would seemingly impact far fewer folk. In fact, I'd bet fairly few of us need the multi-LDAP stuff -- just giving good, high-performance load balancing over Tomcats by a Tomcat would be huge. -- Jess Holle - 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: Performance of APR
Jess Holle wrote: David Boreham wrote: I think you also need to factor in the labor cost to manage two different servers. I know that in our production deployments we could buy many many machines for the cost of the time we've spent trying to make AJP work. Tomcat could be 10x slower than Apache and I'd still use it to avoid the hassle. Of course if you need load balancing across multiple Tomcats you either need Apache or a dedicated load balancer appliance. You can make your own LB using Tomcat. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tomcat Clustering trouble when starting up under high load
Hello all I´m Mikel, and me and my workmates have already been a while testing our environment in order to establish a in memory session replication cluster for our servers. The thing is that our servers are often loaded with up to a thousand (1000) and more sessions (and now, we have three tomcat nodes in different machines working in a load balancer). In hot moments, I have counted up to 4500 sessions distributed between the three servers. So, I'll tell you the main configuration our production environment. Web servers: Two windows server 2003 with IIS and isapi_redirect.dll conector. App servers node 1 2: IBM Xseries_3550 Intel Xeon CPU 5150 @2,66GHz, 2,00 GB RAM, Windows 2003 Server R2 node3: IBM XSeries_366 Intel Xeon CPU 3,20Ghz, 3,00 GB RAM, Windows Server 2003 R2 In our development environment, where we have been making our tests, we have 2 tomcats in two different machines node 1: Intel Xeon CPU E5440 @ 2,83GHz, 1,00 GB RAM, Windows Server 2003 R2 node 2: IBM XSeries_3550 Intel Xeon CPU E5440 @ 2,83 GHz, 2GB RAM, Windows Server 2003 R2 We have been testing the Tomcat 5.5.9 that we are using in production, finding some trouble, even after aplying the clustering fix pack from https://issues.apache.org/bugzilla/show_bug.cgi?id=34389 . Finally, we took the decission to upgrade to last Tomcat 6 available, version 6.0.18, to see if the announced refactoring of cluster subsystem could solve our trouble. After all this prety long intro, I'll tell you the reason of my request. When we test the cluster (in development environment) with both nodes running, we create up to a thousand sessions, keeping alive and modificating about 500. So, we can see that all of them get replicated to the other node quickly . The trouble comes when, after shutting down one of the instances, we start it again (while the half of the alive sessions are still beeing modified by the JMeter test). In our tests, the starting tomcat instance finally gets hunged when receiving sessions from the alive node. Theese are the traces seen in the catalina.log of node 1 when starting it: Jan 26, 2009 6:51:56 PM org.apache.catalina.core.AprLifecycleListener init INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\tomcat-6.0.18\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\Serena\Dimensions 10.1\CM\prog;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32\WBEM;C:\Program Files\IBM\Director\bin;C:\Program Files\Common Files\IBM\ICC\cimom\bin;C:\Program Files\System Center Operations Manager 2007\ Jan 26, 2009 6:51:56 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-9080 Jan 26, 2009 6:51:56 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-9081 Jan 26, 2009 6:51:56 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 1928 ms Jan 26, 2009 6:51:56 PM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Jan 26, 2009 6:51:56 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/6.0.18 Jan 26, 2009 6:51:56 PM org.apache.catalina.ha.tcp.SimpleTcpCluster start INFO: Cluster is about to start Jan 26, 2009 6:51:56 PM org.apache.catalina.tribes.transport.ReceiverBase bind INFO: Receiver Server Socket bound to:/172.26.102.233:4009 Jan 26, 2009 6:51:56 PM org.apache.catalina.tribes.membership.McastServiceImpl setupSocket INFO: Attempting to bind the multicast socket to /228.0.0.9:45569 Jan 26, 2009 6:51:56 PM org.apache.catalina.tribes.membership.McastServiceImpl setupSocket INFO: Binding to multicast address, failed. Binding to port only. Jan 26, 2009 6:51:56 PM org.apache.catalina.tribes.membership.McastServiceImpl setupSocket INFO: Setting multihome multicast interface to:/172.26.102.233 Jan 26, 2009 6:51:56 PM org.apache.catalina.tribes.membership.McastServiceImpl setupSocket INFO: Setting cluster mcast soTimeout to 1000 Jan 26, 2009 6:51:56 PM org.apache.catalina.tribes.membership.McastServiceImpl waitForMembers INFO: Sleeping for 2000 milliseconds to establish cluster membership, start level:4 Jan 26, 2009 6:51:57 PM org.apache.catalina.ha.tcp.SimpleTcpCluster memberAdded INFO: Replication member added:org.apache.catalina.tribes.membership.MemberImpl[tcp://{-84, 26, 102, -60}:4009,{-84, 26, 102, -60},4009, alive=1938953,id={-57 67 34 -23 -38 83 74 68 -67 -87 -112 -94 13 102 -78 -20 }, payload={}, command={}, domain={}, ] Jan 26, 2009 6:51:58 PM org.apache.catalina.tribes.membership.McastServiceImpl waitForMembers INFO: Done sleeping, membership established, start level:4 Jan 26, 2009 6:51:58 PM org.apache.catalina.tribes.membership.McastServiceImpl waitForMembers INFO: Sleeping for 2000 milliseconds to establish cluster membership, start level:8 Jan 26, 2009 6:51:58 PM org.apache.catalina.tribes.io.BufferPool getBufferPool INFO: Created a buffer pool with
Re: Performance of APR
Leon Rosenberg wrote: On Thu, Jan 29, 2009 at 9:34 PM, Christopher Schultz I can't help but suspect that Apache httpd will outperform Tomcat even when it's running APR for static content, merely due to the overhead of the JVM, heap management, etc. (which I realize are fairly minimal). Well, actually when it comes to IO performance Java outperforms C, so I wouldn't place my money on old bets like C is faster because its C. It isn't. When it comes to the large file serving then the OS sendfile support in Tomcat Native outperforms the standard Java IO by an order of magnitude (In some of my tests up to 4 times), and with constant memory usage regardless of file size. There is also some other advanced features like Thread per request processing model, and much faster OpenSSL compared to JSSE. I have a presentation from ApacheCon EU 2007 that has some performance figures: http://people.apache.org/~mturk/tc6apconneu07.pdf Regards -- ^(TM) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org