RE: maxProcessors problem
The server has 2 GB physical memory and 4 GB swap file. During peak times I'm hitting between 60 and 75 requests per second and it is using pretty close to all of the memory. I've seen the JVM using ~ 830 MB watching top. Thanks, Mike -Original Message- From: Kwok Peng Tuck [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 19, 2003 9:24 PM To: Tomcat Users List Subject: Re: maxProcessors problem If I may ask how much physical memory do you have in the first place ? Do you really have that much to give to the for the max heap size ? Mike Cherichetti (Renegade Internet) wrote: I've set CATALINA_OPTS to use -Xmx896m and -Xms384m. That works fine with maxProcessors set to 384. Problem is, if I set -Xmx higher or maxProcessors higher, I get he OutOfMemoryError. Thanks, Mike -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 19, 2003 9:12 AM To: Tomcat Users List; [EMAIL PROTECTED] Subject: RE: maxProcessors problem Howdy, What's your -Xmx setting to the JVM? Yoav Shapira Millennium ChemInformatics -Original Message- From: Mike Cherichetti (Renegade Internet) [mailto:[EMAIL PROTECTED] Sent: Monday, August 18, 2003 4:42 PM To: Tomcat Users Subject: maxProcessors problem First off, I'm using RedHat Linux 7.3, IBM JDK 1.4.1, and Tomcat 4.1.24 on an IBM xSeries with Dual Xeon 2 GHz processors, 2 GB RAM, and SCSI disks. I'm trying to get Tomcat to handle a lot of traffic (4-5 million hits per day) and bumping up against a problem I for life of me can't figure out. So, I'm hoping someone else on this list has run into this problem and can help me out! Basically, I can't set maxProcessors higher than 384. If I do, Tomcat ends up choking (it doesn't crash, it just stops creating more request processors) and I get the following in catalina.out: Aug 18, 2003 5:05:02 AM org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on port 80 Aug 18, 2003 5:05:05 AM org.apache.tomcat.util.threads.ThreadPool$ControlRunnable run SEVERE: Caught exception executing [EMAIL PROTECTED], terminating thread java.lang.OutOfMemoryError: JVMCI015:OutOfMemoryError, cannot create anymore threads due to memory or resource constraints at java.lang.Thread.start(Native Method) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.init(Thread Pool . java:582) at org.apache.tomcat.util.threads.ThreadPool.openThreads(ThreadPool.java:4 60) at org.apache.tomcat.util.threads.ThreadPool.runIt(ThreadPool.java:293) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5 36) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo l.ja v a:619) at java.lang.Thread.run(Thread.java:568) Now, I know that the JVM has plenty of memory left that it can be allocated and the system has plenty of free memory, so I'm not sure it's really a memory issue. As I said, Tomcat still runs and the memory allocated to the JVM increases, it just doesn't have nearly enough request processors created at the point this error happens to deal with all of the traffic. I've tried playing around with ulimit settings, but those didn't have any impact. I've also tried the Sun JVM and it did the same thing. Has anyone run into this problem or something like it before? Any help would be greatly appreciated! Thanks, Mike - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Apache-Tomcat-Struts 404 Not Found
Nope, that didn't solve the problem. But let it be known that I'm not realy a guru when it comes to configuring this lot. Heres some extracts: httpd.conf- VirtualHost * ServerAdmin [EMAIL PROTECTED] ServerName localhost ErrorLog logs/local-error.log CustomLog logs/local-access.log common /VirtualHost VirtualHost * ServerAdmin [EMAIL PROTECTED] DocumentRoot C:\Apache\Tomcat 5.0\webapps\itdiv ServerName www.itdiv.com ErrorLog logs/www.itdiv.com-error.log CustomLog logs/www.itdiv.com-access.log common /VirtualHost ### Tomcat 5 Connector include C:/Apache/Tomcat 5.0/conf/mod_jk.conf mod_jk.conf- # JkMount /* ajp13 JkMount /*.do ajp13 JkMount /*.jsp ajp13 JkMount /servlet/* ajp13 http://localhost/struts-example/logon.do- results in a 404. http://localhost:8080/struts-example/logon.do - works! http://www.itdiv.com/logon.do - results in a 404. http://www.itdiv.com:8080/logon.do - works! Regards, and thanks. Johan. -Original Message- From: Johan Wasserman - CPX Mngd Services Sent: Wednesday, August 20, 2003 7:42 AM To: Tomcat Users List Subject: RE: Apache-Tomcat-Struts 404 Not Found Thanks John, no I didn't. But I did have JkMount /* ajp13, wouldn't that do it? I'll try specifying it the way you suggest. Thanks again. Johan. -Original Message- From: John Turner [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 19, 2003 10:30 PM To: Tomcat Users List Subject: Re: Apache-Tomcat-Struts 404 Not Found Tomcat 4 and Tomcat 5 configuration with mod_jk are the same. Do you have something like this in your httpd.conf file? JkMount /*.do ajp13 John Johan Wasserman - CPX Mngd Services wrote: Hi, I got Tomcat and Apache configured according to documentation (still referencing TC4x) I found on the web. It seemed to work fine but while testing struts I found that the actions (*do) resulted in a 404 Not found. When I test via Tomcat only (localhost:8080) it works fine. I have probably only been looking in the wrong places but cannot seem to find documentation or a download area for mod_jk to do a config on the following versions: Tomcat v. 5.0.3 Apache v. 2.0.46 So, my curent versions are configured using Tomcat v 4x documentation (and mod_jk). Have anyone done this successfully on the newer versions, and where can I download the required bin's and doc's? Thanks! Johan. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to send back data without to wait for the complete page.
Stefano, You would probably be better off creating a thread to run this lengthy process in the background and have your Servlet send back a please wait response and refresh automatically after several seconds to check the status until it completes and you can display all of the results. If you're set on doing it though, look for a way to manually flush output from a JSP. I'm not sure how to do that or if you can (I'm sure you probably can, I just haven't ever had the need to do it). But, be careful if you're displaying these rows in a table. Netscape (I'm not sure if this holds true for newer Gecko powered versions) for example won't render a table until it's received the whole thing. Hope that helps, Mike -Original Message- From: Unternaehrer Stefano [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 20, 2003 1:42 AM To: [EMAIL PROTECTED] Subject: How to send back data without to wait for the complete page. Hello all. Hope the subject explains what I mean. I even don't know how to call that, so cannot search it in archives, and don't know if this behaviour can be setted for a specific jsp page or at tomcat configuration level. I have a page wich requires some time to be executed, you can imagine to receive a table with different rows, where every row require some time to be prepared. I would like that the used doesn't need to wait for the last row to be ready before to see something, but instead that it will see the first rows as soon as possible, than others following when ready. Is this possible with tomcat? I'm using version 3.2.1 but can upgrade when required. Thank you and best regards, Stefano --- Stefano Unternaehrer IT System Administrator Sistema bibliotecario ticinese Bellinzona Ticino Switzerland [EMAIL PROTECTED] www.sbt.ti.ch (091 814 1513) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Starting Tomcat w/ commons-daemon
The Tomcat.sh file is meant to be a template for the file that you install in '/etc/init.d'. In particular, it sets the JAVA_HOME variable to where a 1.3.1 JVM would live on a Solaris box (which is most likely the cause of your errors). Most of the other variable will likely need to be modified as well (or you will just start seeing other errors in catalina.out :). If you still have problems after fixing the paths, please post them. I am very interested in hearing about them. Richard Park [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, I've downloaded and built commons-daemon from source. I have the following issues: 1/ the 'INSTALL' text says I should have 'jsvc', 'service.jar'. I have 'jsvc', but 'service.jar' is no where to be found. The tutorial I'm following is from O'reilly's Tomcat Def. Guide, but it seems somewhat inaccurate/outdated it makes no mention of 'service.jar'. 2/ I placed the dist directory in '/usr/local/apps/commons-daemon', set permisions on my Tomcat 'logs', 'temp', 'webapps' and 'work' directories, set my $PATH and $DAEMON_HOME env. variables. When I run Tomcat.sh start nothing happens - Tomcat does not start. I checked 'catalina.out' and there are 3 jsvc error messages stating that my 'libjvm.so' could not be dynamically linked due to a 'permission denied'. I've tried playing with the permissions on this file with no luck. Any suggestions or pointers would be greatly appreciated - thanks! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Error when I start Jakarta-tomcat(Cont)
Correct. You need to do 'ls -lL /bin/sh' to be sure. However, if the link is there, I'd guess that what it links to is probably there. More likely, Tomcat's 'startup.sh' script isn't executable (e.g. you used the .zip download, or copied from a Windows machine). victor pereira [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] (lrwxrwxrwx). -- that makes it a symbolic link i believe but if the file the sym link is pointing to is not executeable you wont be able to excute Cheers Vic - Original Message - From: Luong Phan [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, August 19, 2003 9:52 PM Subject: Re: Error when I start Jakarta-tomcat(Cont) Hi all, The file /bin/sh exists, and is executable (lrwxrwxrwx). I still get the error massage when I start jakarta-tomcat. Please help me! LuongPhan --- Reinhard Moosauer [EMAIL PROTECTED] wrote: Hello, seems like /bin/sh does not exist. I saw the same problem in another mail today. Please check if /bin/sh exists and is executable. It really should! regards, Reinhard Am Dienstag, 19. August 2003 11:05 schrieb Luong Phan: Hi all, I am having problem starting TOMCAT, I installed j2sdk1.4.2 and jakarta-tomcat-3.2.4 on the Redhat Linux 7.3. Those two directories are located at the /usr/java. I set the envoroment variables in the /.bash_profile as the following: JAVA_HOME=/usr/java/j2sdk1.4.2 TOMCAT_HOME=/usr/java/jakarta-tomcat-3.2.4 CLASSPATH=$JAVA_HOME/lib/tools.jar:$TOMCAT_HOME/lib/servlet.jar export JAVA_HOME TOMECAT_HOME CLASSPATH Every time I try [EMAIL PROTECTED] root]# $TOMCAT_HOME/bin/startup.sh I get the massage: bash:/usr/java/jakarta-tomcat-3.2.4/bin/startup.sh:/bin/sh bad interpreter: Permision denied Please help me! LuongPhan __ Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo. http://search.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo. http://search.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: About heap size, gc and newsize
At least in Tomcat, the HttpRequests aren't short-lived ;-). If you are using Sun's JVM, then I'd try -Xincgc first (otherwise, consult your vendor's docs for the correct option). In many cases it hurts performance, but in some it improves it dramatically. Your mileage may vary ;-). [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi all. I am trying to get gc to reclaim more regularly by clearing short live HttpRequest. Is this syntax corrrect, doesn't seem to do much whichever way I tweak it : (catalina.sh) ... JAVA_OPTS=-Xms256m -Xmx256m -XX:NewSize=128m -XX:MaxNewSize=128m TIA :-) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: changing class file and reloading question
You can reload using the manager app (the link is on the start page when you first start tomcat). You can also use an ant target. You can reload a single webapp, which is probably the better way of doing it. Here's an example target from a build.xml that takes an arguement: target name=reload depends=deploy description=Reloads Tomcat Application (Local) get src=http://127.0.0.1:8080/manager/reload?path=/${app.name}; dest=status.txt username=yourtomcataccount password=yourtomcatpassword / loadfile property=catalina.reload srcFile=status.txt / echo${catalina.reload}/echo delete file=status.txt/ /target Luke Vanderfluit wrote: Hi, I'm running tomcat 4.1.27 standalone on Redhat 9 I have a class that I'm changing (development) and don't want to have to restart tomcat each time I make a change. It wouldn't be so bad to do that if it wasn't for the fact that tomcat takes ages to read my servlet every time it's restarted. I have got the following entry in my server.xml file # DefaultContext reloadable=true/ !-- Tomcat Root Context -- Context path= docBase=ROOT debug=0 reloadable=true /Context # The class I'm changing is in the ROOT/WEB-INF/classes directory the console message when I hit 'reload' on the browser is: WebappClassLoader: Resource '/WEB-INF/classes/Topic3x4.class' was modified; Date is now: Wed Aug 20 05:53:59 CST 2003 Was: Wed Aug 20 05:44:04 CST 2003 How do I get tomcat to indeed reload the classes without having to restart each time? Thanks, kind regards, - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
R: How to send back data without to wait for the complete page.
Thank you Mike. Yes I could write a please wait and than display all the result. But I would prefer the replay piece by piece, when possible. Look at this example: http://www.chvk.ch/ this is not in english but easy to use.. this is a meta-catalog which permit you to search a book on different libraries. Just type for example cinema in the Titel field (title) and click Starten (start search). You will receive a search result which composed of different html tables, one for each library. As you can see, first comes quickly then others appears later. That's GREAT! I want do that!! :-) Best regards, Stefano -Messaggio originale- Da: Mike Cherichetti (Renegade Internet) [mailto:[EMAIL PROTECTED] Inviato: mercoledì, 20. agosto 2003 08:22 A: Tomcat Users List Oggetto: RE: How to send back data without to wait for the complete page. Stefano, You would probably be better off creating a thread to run this lengthy process in the background and have your Servlet send back a please wait response and refresh automatically after several seconds to check the status until it completes and you can display all of the results. If you're set on doing it though, look for a way to manually flush output from a JSP. I'm not sure how to do that or if you can (I'm sure you probably can, I just haven't ever had the need to do it). But, be careful if you're displaying these rows in a table. Netscape (I'm not sure if this holds true for newer Gecko powered versions) for example won't render a table until it's received the whole thing. Hope that helps, Mike -Original Message- From: Unternaehrer Stefano [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 20, 2003 1:42 AM To: [EMAIL PROTECTED] Subject: How to send back data without to wait for the complete page. Hello all. Hope the subject explains what I mean. I even don't know how to call that, so cannot search it in archives, and don't know if this behaviour can be setted for a specific jsp page or at tomcat configuration level. I have a page wich requires some time to be executed, you can imagine to receive a table with different rows, where every row require some time to be prepared. I would like that the used doesn't need to wait for the last row to be ready before to see something, but instead that it will see the first rows as soon as possible, than others following when ready. Is this possible with tomcat? I'm using version 3.2.1 but can upgrade when required. Thank you and best regards, Stefano --- Stefano Unternaehrer IT System Administrator Sistema bibliotecario ticinese Bellinzona Ticino Switzerland [EMAIL PROTECTED] www.sbt.ti.ch (091 814 1513) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: shutdown tomcat
I've added a listener instance and notifications start working! Thank you for the answer! - Original Message - From: Jon Wingfield [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, August 19, 2003 7:31 PM Subject: Re: shutdown tomcat So you added an instance of TestTomcatNotifications to a session as an attribute? That's the only way you'll get HttpSessionActivationListener events. You added a listener element to your web.xml registering TestTomcatNotifications as a HttpSessionListener? On shutdown sessionDestroyed(...) doesn't get called because the StandardManager persists sessions and doesn't destroy them. Let us know if you still don't get the sessionWillPassivate(...) event coz that would worry me. Jon Maksimenko Alexander wrote: Hi! I created the following implementation of HttpSessionListener,HttpSessionActivationListener. public class TestTomcatNotifications implements HttpSessionListener, HttpSessionActivationListener { public void sessionCreated(HttpSessionEvent se) { System.out.println(TestTomcatNotifications.sessionCreated(se)); } public void sessionDestroyed(HttpSessionEvent se) { System.out.println(TestTomcatNotifications.sessionDestroyed(se)); } public void sessionWillPassivate(HttpSessionEvent se) { System.out.println(TestTomcatNotifications.sessionWillPassivate(se)); } public void sessionDidActivate(HttpSessionEvent se) { System.out.println(TestTomcatNotifications.sessionDidActivate(se)); } } So this class logs that some method was invoked only. But when I am shut down tomcat neither sessionWillPassivate nor sessionDestroyed are been invoked. In API Doc we can read that: A container that migrates session between VMs or persists sessions is required to notify all attributes bound to sessions implementing HttpSessionActivationListener. What's wrong? P.S. I use org.apache.catalina.session.StandardManager implementation. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: That ever-popular 'wrong version:46, expected 45' message
The 46 and 45 are magic numbers that the java compiler puts into byte-code. It looks like you are trying to compile with a older (and incompatible) version of javac than the servlet classes were compiled against. I've seen this before when an installation of Oracle added jdk1.1.8 when I was already using version 1.3... What does java -version give? Paul R Gazis wrote: I'm running the J2SE 1.4.1_04 SDK and Tomcat 4.1.27 under Windows 2000. The Tomcat installation runs fine, but try as I might, I cannot compile code that imports any of the servlet classes. Attempts to do so yield that damnable error message: Invalid class file format in {my tomcat directory}\common\lib\servlet.jar (javax/servlet/http/HttpServlet.class) wrong version:46, expected 45 Looking through the archives, I can see that this has been an enduring and popular problem for much of the past year, but I can not locate any references to the fix. I've tried all the obvious things: different versions of J2SE and Tomcat, different settings for CLASSPATH, PATH, and other environment variables, etc. Currently my enviroment variables are set to: JAVA_HOME -- points to J2SE 1.4.1_04 SDK CLASSPATH={my tomcat directory}\common\lib\servlet.jar PATH -- points to {my JAVA_HOME}\bin Any suggestions? Surely this is a common problem, for which the solution is well known. I would welcome any help. Thanks! Paul Gazis [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: directory outside context root
I personally would use the Apache alias. The codes already written for you and through apache the serving of the files should be pretty fast. You don't need to write any servlets or anything then to allow access to these files. It all depends on your project spec. If these files should have restricted access then that adds more to the equation. -Original Message- From: Erez Efrati [mailto:[EMAIL PROTECTED] Sent: 19 August 2003 17:49 To: 'Tomcat Users List' Subject: RE: directory outside context root Well I did find a way to do that by declaring another context just for that with docBase='c:\www\files' for example. Thing is, all this is not really working under the Tomcat bundled in JBoss. One option of solving this is having a servlet (Struts Action for example) which will serve the files. The other way is using the 'alias' directive under Apache directing to wherever I'd like in the file system. For that I need to put Apache in front of JBoss/Tomcat. Which is better? Thanks, Erez -Original Message- From: John Turner [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 19, 2003 1:57 PM To: Tomcat Users List Subject: Re: directory outside context root If on UNIX or Linux, you could use symbolic links, but this is not recommended for security and portability reasons. So, in general, the answer is no. John Erez Efrati wrote: Is there some way to tell tomcat to serve files from a specific directory outside the context root? Thanks in advance, Erez - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Installing Tomcat as a Service
Hi all, How might I go about installing Tomcat as a service in RedHat 9.0. I've never installed a service under linux manually before and I'm not sure what to do. I can't find the appropriate documentation in the manuals for either Tomcat or RedHat. I must be looking in the wrong places :O( UNRELATED: Also, If I wanted to install a java program as a service, how might I do this? Is this a similar process? Regards, Stuart - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: maxProcessors problem
Hi all. It seems that TC4 has some algorithm which tags objects (read HttpRequests) as long- or short-lived. At 70+ connections per second, I guess most of your HttpRequests would be short lived, which means the gc will reclaim them first, but not until the heap is exhausted. So it might help to allocate more to the short lived requests to force gc to reclaim more often, like this: -XX:NewSize=448m -XX:MaxNewSize=448m This should force the allocation of half the memory to short-lived requests and make gc reclaim more often. You might like to tweak it some more to achieve optimum results ? Please keep us posted on this. Hope that helps. Arthur ;-) Mike Cherichetti (Renegade Internet) wrote: The server has 2 GB physical memory and 4 GB swap file. During peak times I'm hitting between 60 and 75 requests per second and it is using pretty close to all of the memory. I've seen the JVM using ~ 830 MB watching top. Thanks, Mike -Original Message- From: Kwok Peng Tuck [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 19, 2003 9:24 PM To: Tomcat Users List Subject: Re: maxProcessors problem If I may ask how much physical memory do you have in the first place ? Do you really have that much to give to the for the max heap size ? Mike Cherichetti (Renegade Internet) wrote: I've set CATALINA_OPTS to use -Xmx896m and -Xms384m. That works fine with maxProcessors set to 384. Problem is, if I set -Xmx higher or maxProcessors higher, I get he OutOfMemoryError. Thanks, Mike -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 19, 2003 9:12 AM To: Tomcat Users List; [EMAIL PROTECTED] Subject: RE: maxProcessors problem Howdy, What's your -Xmx setting to the JVM? Yoav Shapira Millennium ChemInformatics -Original Message- From: Mike Cherichetti (Renegade Internet) [mailto:[EMAIL PROTECTED] Sent: Monday, August 18, 2003 4:42 PM To: Tomcat Users Subject: maxProcessors problem First off, I'm using RedHat Linux 7.3, IBM JDK 1.4.1, and Tomcat 4.1.24 on an IBM xSeries with Dual Xeon 2 GHz processors, 2 GB RAM, and SCSI disks. I'm trying to get Tomcat to handle a lot of traffic (4-5 million hits per day) and bumping up against a problem I for life of me can't figure out. So, I'm hoping someone else on this list has run into this problem and can help me out! Basically, I can't set maxProcessors higher than 384. If I do, Tomcat ends up choking (it doesn't crash, it just stops creating more request processors) and I get the following in catalina.out: Aug 18, 2003 5:05:02 AM org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on port 80 Aug 18, 2003 5:05:05 AM org.apache.tomcat.util.threads.ThreadPool$ControlRunnable run SEVERE: Caught exception executing [EMAIL PROTECTED], terminating thread java.lang.OutOfMemoryError: JVMCI015:OutOfMemoryError, cannot create anymore threads due to memory or resource constraints at java.lang.Thread.start(Native Method) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.init(Thread Pool . java:582) at org.apache.tomcat.util.threads.ThreadPool.openThreads(ThreadPool.java:4 60) at org.apache.tomcat.util.threads.ThreadPool.runIt(ThreadPool.java:293) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5 36) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo l.ja v a:619) at java.lang.Thread.run(Thread.java:568) Now, I know that the JVM has plenty of memory left that it can be allocated and the system has plenty of free memory, so I'm not sure it's really a memory issue. As I said, Tomcat still runs and the memory allocated to the JVM increases, it just doesn't have nearly enough request processors created at the point this error happens to deal with all of the traffic. I've tried playing around with ulimit settings, but those didn't have any impact. I've also tried the Sun JVM and it did the same thing. Has anyone run into this problem or something like it before? Any help would be greatly appreciated! Thanks, Mike - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you.
Manager Component configuration
Does anyone have any examples of Manager Component configuration (which I believe is nested within the Context tags) ? I am using Tomcat 5.0.6 and want to disable the (default) saving of session data that occurs when Tomcat is shutdown. thanks
Tomcat holding problem - CLOSE_WAIT
Hi, I am trying tomcat-4.1.27, apache2.0.47, mod_jk2.0.2, j2se1.4.2 on Linux9. I have downloaded tomcat binary. I have compiled apache with ssl, mod_jk2. I can access dynamic pages which are in tomcat. It works fine. I wanted to have stress test, so I choose JMeter to test one server page. After few samples (62) all threads holed by tomcat. It happened to me few times. I have checked netstat, I found some CLOSE_WAIT. I can't find the problem, its looks configurations is ok, but I can make it work. Any help is appreciated. Thanks in advance. Srinivas. workers.properties # only at beginnin. In production uncomment it out [logger.apache2] level=DEBUG [uriMap:] info=Maps the requests. Options: debug debug=0 [config:] file=${serverRoot}/conf/workers2.properties debug=0 debugEnv=0 [shm] file=${serverRoot}/logs/jk2.shm size=1048576 debug=0 disabled=0 [lb:lb-gipalbum] info=GIPALBUM load balancer. debug=0 [lb:lb-ext] info=EXT load balancer. debug=0 # define the GIPALBUM worker [channel.socket:192.168.1.211:8091] info=Ajp13 forwarding over socket to GIPALBUM debug=0 tomcatId=gipablum-tc lb_factor=1 group=lb-gipalbum disabled=0 # define the EXT worker [channel.socket:192.168.1.211:8092] info=Ajp13 forwarding over socket to EXT debug=0 tomcatId=ext-tc lb_factor=1 group=lb-ext disabled=0 # define the status worker [status:] info=Status worker, displays runtime informations # Uri mapping for status worker [uri:/jkstatus/*] info=Display status information and checks the config file for changes. group=status: # Uri mapping [uri:/admin/*.jsp] info=admin project context=/admin group=lb-gipalbum debug=0 # Uri mapping [uri:/admin/*.do] info=admin project context=/admin group=lb-gipalbum debug=0 # Uri mapping [uri:/manager/*] info=manager project context=/manager group=lb-ext debug=0 # Uri mapping [uri:/*.jsp] info=default jsp project context=/ group=lb-ext debug=0 [uri:/*.do] info=default struts project context=/ group=lb-ext debug=0 [uri:/moto/*.osp] info=moto osp project context=/moto group=lb-ext debug=0 [uri:/moto/*.ost] info=moto ost project context=/moto group=lb-ext debug=0 -- end workers.properties server.xml - !-- Example Server Configuration File -- !-- Note that component elements are nested corresponding to their parent-child relationships with each other -- !-- A Server is a singleton element that represents the entire JVM, which may contain one or more Service instances. The Server listens for a shutdown command on the indicated port. Note: A Server is not itself a Container, so you may not define subcomponents such as Valves or Loggers at this level. -- Server port=8052 shutdown=SHUTDOWN debug=0 !-- Comment these entries out to disable JMX MBeans support -- !-- You may also configure custom components (e.g. Valves/Realms) by including your own mbean-descriptor file(s), and setting the descriptors attribute to point to a ';' seperated list of paths (in the ClassLoader sense) of files to add to the default list. e.g. descriptors=/com/myfirm/mypackage/mbean-descriptor.xml -- Listener className=org.apache.catalina.mbeans.ServerLifecycleListener debug=0/ Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener debug=0/ !-- Global JNDI resources -- GlobalNamingResources !-- Test entry for demonstration purposes -- Environment name=simpleValue type=java.lang.Integer value=30/ !-- Editable user database that can also be used by UserDatabaseRealm to authenticate users -- Resource name=UserDatabase auth=Container type=org.apache.catalina.UserDatabase description=User database that can be updated and saved /Resource ResourceParams name=UserDatabase parameter namefactory/name valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value /parameter parameter namepathname/name valueconf/tomcat-users.xml/value /parameter /ResourceParams /GlobalNamingResources !-- A Service is a collection of one or more Connectors that share a single Container (and therefore the web applications visible within that Container). Normally, that Container is an Engine, but this is not required. Note: A Service is not itself a Container, so you may not define subcomponents such as Valves or Loggers at this level. -- !-- Define the Tomcat Stand-Alone Service -- Service name=Tomcat-Standalone !-- A Connector represents an endpoint by which requests are received and responses are returned. Each Connector passes requests on to the associated Container (normally an Engine) for processing. By default, a non-SSL
RE: Problem with context.xml and deploying
Thanks for your reaction, but I don't think that bug is related to my problem. This problem is specific to 4.1.x when using a custom context.xml file which forces Tomcat to rewrite the server.xml file. Unfortunately it kind of skips the keystorePass property when rewriting the the server.xml file. Should I report this as a bug? Allan On Tue, 2003-08-19 at 14:17, Shapira, Yoav wrote: Howdy, See Jan Luehe's comment on bug 19610 here: http://issues.apache.org/bugzilla/show_bug.cgi?id=19610 Yoav Shapira Millennium ChemInformatics -Original Message- From: Allan Schweitz [mailto:[EMAIL PROTECTED] Sent: Monday, August 18, 2003 4:03 PM To: [EMAIL PROTECTED] Subject: Problem with context.xml and deploying Hi, I have currently written an application which I deploy using the manager app. I have split up the server.xml into an application specific context.xml file and a more generic server.xml file. In the server.xml I have specified a connector for https (SSL) and in there I have specified some properties of which one is the keystorePass property. When I deploy my application Tomcat rewrites the server.xml but forgets to rewrite the keystorePass property. As a result tomcat fails to start again when I try to restart it and I have to overwrite the rewritten server.xml every time I restart Tomcat. To me this looks and sounds like a bug, but I might have missed something. Can anyone help me out here? Thanks in advance, Allan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Manager Component configuration
It's in the docs ;-) http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/manager.html saveOnRestart=false should do the job HTH, Yann Does anyone have any examples of Manager Component configuration (which I believe is nested within the Context tags) ? I am using Tomcat 5.0.6 and want to disable the (default) saving of session data that occurs when Tomcat is shutdown. thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
build mod_jk2 ?
Hi, I have Tomacat 4.1.27 , and apache 2.0.35 on HP-UX 11.0 Where can I found the procedure and the source to build mod_jk2 ? Thanks in advance
RE: Globally defined JNDI DataSource (was: JNDI DataSource Realm)
Do you have a ResourceLink defined within your context(s) pointing back to your globally-defined Resource? For example: ResourceLink name=jdbc/Auth global=jdbc/Auth type=javax.sql.DataSource / I can't think of anything else right now. Thanks, Scott Stewart [Manager, Software Development] [EMAIL PROTECTED] ClearSky Mobile Media, Inc. 56 E. Pine Street Suite 200 Orlando, FL 32801 USA -Original Message- From: Madere, Colin [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 19, 2003 12:38 PM To: 'Tomcat Users List' Subject: RE: Globally defined JNDI DataSource (was: JNDI DataSource Realm) (Renamed subject/topic since the DataSource Realm part works now, just the normal JNDI DataSource for my code gives the name jdbc not bound error) Yes, driver is in /commmon/lib. I'm quite experienced using JDBC access from servlets, just not with JNDI. As far as how I'm instantiating, isn't it supposed to be the same no matter if it's defined in the Context or Globally? Here it is anyway, same result with commented out string and other: -- javax.naming.Context ctx = new InitialContext(); // DS = (DataSource)ctx.lookup(java:comp/env/jdbc/Auth); DS = (DataSource)ctx.lookup( jdbc/Auth ); Conn = DS.getConnection(); -- Both give same error, but the commented out one works when the Resource is in the DefaultContext. Also, all the surrounding/supporting code of this has worked for years in production as a regular JDBC connection. If anyone thinks they can help but this is getting too jumbled, I'll repost with configs and skeleton code. Let me know, I'd love for this to be a config problem only :) -Original Message- From: Scott Stewart [mailto:[EMAIL PROTECTED] Sent: Monday, August 18, 2003 7:28 AM To: 'Tomcat Users List' Subject: RE: JNDI DataSource Realm Where is your JDBC driver .jar file located? It should be in TOMCAT-HOME/common/lib. Also, how are you instantiating your DataSource object within your code? Thanks, Scott Stewart [Manager, Software Development] [EMAIL PROTECTED] ClearSky Mobile Media, Inc. 56 E. Pine St. Suite 200 Orlando, FL 32801 USA -Original Message- From: Madere, Colin [mailto:[EMAIL PROTECTED] Sent: Friday, August 15, 2003 3:44 PM To: 'Tomcat Users List' Subject: RE: JNDI DataSource Realm Ok, so changing the dataSourceName attribute in the Realm config (as you suggest which contradicts the HOWTO) to the short name I've given my resource makes the Realm auth work with the globally defined datasource. Yay! However, when trying to connect to the datasource (moved the jdbc/Auth resource from DefaultContext tag to GlobalNamingResources tag), my servlet application still gives the same Name jdbc is not bound in this Context error. You mention not having to put a resource-ref in the context specific web.xml file, and I assume your suggestion to put ResourceLink tag in the Context (in my case putting it in the DefaultContext tag so it works, or should, for all autodeployed contexts) is what you mean removes the need for the those aforementioned entries. However, it doesn't appear to work (as it _does_ work when I move the whole Resource/ResourceParams tags into the DefaultContext tag. Don't want to do this as I will have multiple virtual hosts using the same resource...) Doubt it's of importance, but adding the resource-ref you suggest is not necessary produces the elusive Cannot load JDBC driver class 'null' error, which I believe is unrelated. Any more ideas why my app would not see the global resource as defined below as a global resource and then resource-linked in the default context? -Original Message- From: Scott Stewart [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 13, 2003 5:27 PM To: 'Tomcat Users List' Subject: RE: JNDI DataSource Realm I posted this awhile back (for MySQL), but here it is again. Also, when you define your DataSource in this manner, you do not need the resource-ref node in your context-specific web.xml files. The global DataSource definition !-- Global JNDI resources -- GlobalNamingResources !-- Editable user database that can also be used by JNDI DatabaseRealm to authenticate users -- Resource name=jdbc/MySQLConnectPool auth=Container type=javax.sql.DataSource / ResourceParams name=jdbc/MySQLConnectPool parameter nameusername/name value/value /parameter parameter namepassword/name value/value /parameter parameter namedriverClassName/name valuecom.mysql.jdbc.Driver/value /parameter parameter
RE: build mod_jk2 ?
# cd /usr/local/src # wget http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk2/release/v2.0. 2/src/jakarta-tomcat-connectors-jk2-2.0.2-src.tar.gz # gunzip -dc jakarta-tomcat-connectors-jk2-2.0.2-src.tar.gz | tar xf - # cd jakarta-tomcat-connectors-jk2-2.0.2-src/jk/native2 # ./configure --with-apxs2=/usr/local/apache2/bin/apxs # make # cd ../build/jk2/apache2 # ls -la -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 20 August 2003 11:59 To: [EMAIL PROTECTED] Subject: build mod_jk2 ? Hi, I have Tomacat 4.1.27 , and apache 2.0.35 on HP-UX 11.0 Where can I found the procedure and the source to build mod_jk2 ? Thanks in advance - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
control own servlets with jmx
hello, i want to control my own servlets the same way tomcat does in the admin-section. how do i do that ? the best solution would be that my servlets implements some interface and i have some methods to access remotely in the servlet class. i first tried to register this servlet in the registry, but i figured out some problems: when jmx tries to load my servlet-class it fails because it doesn't find it. having a closer look to it i found out that there are two ways to register: 1. server.createMBean(mbeanName,mbeanObjectName); then jmx tries to load with an own classloader - but no classloaders are in it 2. server.createMBean(mbeanName,mbeanObjectName,null); then jmx tries to load with the tomcat classloader, but only with that one which accesses the common/lib-directory. my servlet is - as usual - in web-inf/ so i can load classes which are in the common/lib-directory - that works - by the way ! to get a server i'm using the Registry-object from the commons-project - i thought that maybe this is the way to get the right server object, because tomcat uses this one as well - i'm using tomcat 4.1.27 on windows xp. so i have a problem understanding how this could work, because normally i want to access a class already instantiated - a servlet - via jmx. but even my approach doesn't help in this case. thanks, jan
RE: Manager Component configuration
Thanks. I did look at the docs first but didn't see the saveOnRestart attribute (!). Adding this between the context tags for my app had the desired effect. Manager className=org.apache.catalina.session.PersistentManager saveOnRestart=false Store className=org.apache.catalina.session.FileStore/ /Manager -Original Message- From: news [mailto:[EMAIL PROTECTED] Behalf Of Yann Cébron Sent: 20 August 2003 10:44 To: [EMAIL PROTECTED] Subject: Re: Manager Component configuration It's in the docs ;-) http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/manager.html saveOnRestart=false should do the job HTH, Yann Does anyone have any examples of Manager Component configuration (which I believe is nested within the Context tags) ? I am using Tomcat 5.0.6 and want to disable the (default) saving of session data that occurs when Tomcat is shutdown. thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Installing Tomcat as a Service
On August 20, 2003 04:19 am, Stuart Stephen wrote: Hi all, How might I go about installing Tomcat as a service in RedHat 9.0. I've never installed a service under linux manually before and I'm not sure what to do. I can't find the appropriate documentation in the manuals for either Tomcat or RedHat. I must be looking in the wrong places :O( UNRELATED: Also, If I wanted to install a java program as a service, how might I do this? Is this a similar process? Regards, Stuart man chkconfig man serviceconf man init For a Java program, write a wrapper shell script like Tomcat authors did with catalina.sh. Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: About heap size, gc and newsize
Howdy, Don't think about GC settings as correct or not, as that's too absolute. There's a huge gray area in between that you should experiment with. The settings below aren't likely to be optimal as they leave a big chunk (50%) of the heap fixed and for the young generation, yet you're not collecting the young generation any more actively than usual. Yoav Shapira Millennium ChemInformatics -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 19, 2003 10:22 PM To: [EMAIL PROTECTED] Subject: About heap size, gc and newsize Hi all. I am trying to get gc to reclaim more regularly by clearing short live HttpRequest. Is this syntax corrrect, doesn't seem to do much whichever way I tweak it : (catalina.sh) ... JAVA_OPTS=-Xms256m -Xmx256m -XX:NewSize=128m -XX:MaxNewSize=128m TIA :-) This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to send back data without to wait for the complete page.
Howdy, Flush the output writer whenever you feel like it: its contents will be sent to the browser even while your servlet is still processing. Yoav Shapira Millennium ChemInformatics -Original Message- From: Unternaehrer Stefano [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 20, 2003 3:56 AM To: Tomcat Users List; [EMAIL PROTECTED] Subject: R: How to send back data without to wait for the complete page. Thank you Mike. Yes I could write a please wait and than display all the result. But I would prefer the replay piece by piece, when possible. Look at this example: http://www.chvk.ch/ this is not in english but easy to use.. this is a meta-catalog which permit you to search a book on different libraries. Just type for example cinema in the Titel field (title) and click Starten (start search). You will receive a search result which composed of different html tables, one for each library. As you can see, first comes quickly then others appears later. That's GREAT! I want do that!! :-) Best regards, Stefano -Messaggio originale- Da: Mike Cherichetti (Renegade Internet) [mailto:[EMAIL PROTECTED] Inviato: mercoledì, 20. agosto 2003 08:22 A: Tomcat Users List Oggetto: RE: How to send back data without to wait for the complete page. Stefano, You would probably be better off creating a thread to run this lengthy process in the background and have your Servlet send back a please wait response and refresh automatically after several seconds to check the status until it completes and you can display all of the results. If you're set on doing it though, look for a way to manually flush output from a JSP. I'm not sure how to do that or if you can (I'm sure you probably can, I just haven't ever had the need to do it). But, be careful if you're displaying these rows in a table. Netscape (I'm not sure if this holds true for newer Gecko powered versions) for example won't render a table until it's received the whole thing. Hope that helps, Mike -Original Message- From: Unternaehrer Stefano [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 20, 2003 1:42 AM To: [EMAIL PROTECTED] Subject: How to send back data without to wait for the complete page. Hello all. Hope the subject explains what I mean. I even don't know how to call that, so cannot search it in archives, and don't know if this behaviour can be setted for a specific jsp page or at tomcat configuration level. I have a page wich requires some time to be executed, you can imagine to receive a table with different rows, where every row require some time to be prepared. I would like that the used doesn't need to wait for the last row to be ready before to see something, but instead that it will see the first rows as soon as possible, than others following when ready. Is this possible with tomcat? I'm using version 3.2.1 but can upgrade when required. Thank you and best regards, Stefano --- Stefano Unternaehrer IT System Administrator Sistema bibliotecario ticinese Bellinzona Ticino Switzerland [EMAIL PROTECTED] www.sbt.ti.ch (091 814 1513) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: changing class file and reloading question
Howdy, Someone already answered your main question, but... It wouldn't be so bad to do that if it wasn't for the fact that tomcat takes ages to read my servlet every time it's restarted. You might want to find out why tomcat is taking ages to read your servlet -- that shouldn't be the case and I haven't run across this behavior before. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: maxProcessors problem
Howdy, It seems that TC4 has some algorithm which tags objects (read HttpRequests) as long- or short-lived. Please do tell where you got that impression? ;) At 70+ connections per second, I guess most of your HttpRequests would be short lived, which means the gc will reclaim them first, but not until the heap is exhausted. Not true. They will be reclaimed when possible according to the selected GC algorithm So it might help to allocate more to the short lived requests to force gc to reclaim more often, like this: -XX:NewSize=448m -XX:MaxNewSize=448m This is wrong reasoning, won't force short-lived objects to be reclaimed more often, and you should use a profiler to see that yourself before putting it in a production system ;) The server has 2 GB physical memory and 4 GB swap file. During peak times I'm hitting between 60 and 75 requests per second and it is using pretty close to all of the memory. I've seen the JVM using ~ 830 MB watching top. Don't confuse heap usage with top output, as their variance can be significant (10-20%). top output will always be more than the current heap, as it includes stack, symbol table, translation table, thread, and OS-internal overhead. The ration of top output to heap allocation is very application and OS-specific. Use the Runtime's class freeMemory() and totalMemory() to get a measure of the heap itself. I've set CATALINA_OPTS to use -Xmx896m and -Xms384m. That works fine with maxProcessors set to 384. Problem is, if I set -Xmx higher or maxProcessors higher, I get he OutOfMemoryError. Do you actually get up to 384 processors? Are they all active? Are any hanging? Can you easily reproduce the OutOfMemoryError with JMeter or another stress-testing tool? First off, I'm using RedHat Linux 7.3, IBM JDK 1.4.1, and Tomcat 4.1.24 You might want to update to 4.1.27 ;) I'm trying to get Tomcat to handle a lot of traffic (4-5 million hits per day) and bumping up against a problem I for life of me can't figure out. So, I'm hoping someone else on this list has run into this problem and can help me out! Basically, I can't set maxProcessors higher than 384. If I do, Tomcat We have a system with 512 maxProcessors, using 1G heap, and it's been running fine in production for a couple of months now (stopping only to update tomcat from 4.1.24 to 4.1.27). It's handled up to about 400 concurrent requests, but I picked 512 as the maxProcessors value to leave some overhead for peak times. So 384 is not a magical bottleneck, at least for us, not can I find any code references that would suggest that it is ;) What about your thread limits? All the limits controlled by ulimit? Could it be you're hitting those (the resource constraints part of your error message) as opposed to running out of memory? Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: minProcessors/max Processors question
Howdy, We are not sure as to why this is happening. I read somewhere that minProcessors/maxProcessors is only for the request processing threads and not for the total number of threads created by tomcat. If this is the What you read is correct. case then, how do we cap the total number of threads being created by Tomcat ? I am concerned that we may run out of memory if this continues. You can't strictly cap the total number of threads created by tomcat, as most of them are not under your control. That's the same as any app server. However, you can take some measurements to reduce the number of threads: - Don't have reloadable contexts if you don't need them - Remove the examples webapp and context Any insights will be appreciated. If you're worried about the number of threads, you're in a good spot. There are a several things that would crash first under a heavy load, before the number of threads becomes an issue ;) Don't use the linux top command as an accurate measurement of the number of threads in the VM, as the JVM thread to OS thread mapping can be more than one to one. Use ulimit or whatever your system's equivalent is to raise the max number of threads allowed for the user that runs tomcat. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Installing Tomcat as a Service
Hi, Check this: http://www.jpackage.org They have the rpm version of tomcat, that will make all the hard work for you. Regards. Manolo Ramirez T. Stuart Stephen wrote: Hi all, How might I go about installing Tomcat as a service in RedHat 9.0. I've never installed a service under linux manually before and I'm not sure what to do. I can't find the appropriate documentation in the manuals for either Tomcat or RedHat. I must be looking in the wrong places :O( UNRELATED: Also, If I wanted to install a java program as a service, how might I do this? Is this a similar process? Regards, Stuart - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Referencing Tomcat JNDI datasource
Hello, I am using Tomcat 4.1.18 and have setup a JNDI datasource for database connection pooling. I would like to reference this datasource from another application that is not running under Tomcat. In searching the mailing list archive and other forums I found dated information that indicated that this was not possible that I would have to use another database connection pooling utility such as DbConnectionBroker from Javaexchange.com. Is this still the case with the latest versions of Tomcat? Has anyone used DbConnectionBroker to provide database connection pooling with Tomcat and in a stand alone application? Any suggestions on other ways to use a database connection pool with Tomcat and from a stand alone application? Thanks, Don - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Exception processing JAR
We are using the jregex package in our application, and when tomcat starts it causes this error in the tomcat logs, can anyone suggest a reason for it? The same error has been seen on other machines with different JAR, but the same exception. we are using tomcat 4.1.24 java 1.4 winNT 2003-08-20 14:28:09 ContextConfig[crisp] Exception processing JAR at resource path /WEB-INF/lib/jregex.jar javax.servlet.ServletException: Exception processing JAR at resource path /WEB-INF/lib/jregex.jar at org.apache.catalina.startup.ContextConfig.tldScanJar(ContextConfig.java:930) at org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.java:868) at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:647) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:243) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3567) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardHost.start(StandardHost.java:738) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347) at org.apache.catalina.core.StandardService.start(StandardService.java:497) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2190) at org.apache.catalina.startup.Catalina.start(Catalina.java:512) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) - Root Cause - java.io.FileNotFoundException at org.apache.naming.resources.DirContextURLConnection.getInputStream(DirContextURLConnection.java:344) at sun.net.www.protocol.jar.URLJarFile.retrieve(URLJarFile.java:161) at sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:42) at sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:78) at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:85) at sun.net.www.protocol.jar.JarURLConnection.getJarFile(JarURLConnection.java:69) at org.apache.catalina.startup.ContextConfig.tldScanJar(ContextConfig.java:906) at org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.java:868) at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:647) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:243) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3567) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardHost.start(StandardHost.java:738) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347) at org.apache.catalina.core.StandardService.start(StandardService.java:497) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2190) at org.apache.catalina.startup.Catalina.start(Catalina.java:512) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) Thanks in advance. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: About heap size, gc and newsize
I guess the real question is why are you concerned with when the requests are GC'd. Left to it's own devices, GC usually only happens when the JVM is using almost all of the allocated memory. Therefore, the more memory allocated, the longer till GC and the longer GC will last. If you are trying to get it to run more often so that it takes less time, take a look at 1.4.2. --- Bill Barker [EMAIL PROTECTED] wrote: At least in Tomcat, the HttpRequests aren't short-lived ;-). If you are using Sun's JVM, then I'd try -Xincgc first (otherwise, consult your vendor's docs for the correct option). In many cases it hurts performance, but in some it improves it dramatically. Your mileage may vary ;-). [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi all. I am trying to get gc to reclaim more regularly by clearing short live HttpRequest. Is this syntax corrrect, doesn't seem to do much whichever way I tweak it : (catalina.sh) ... JAVA_OPTS=-Xms256m -Xmx256m -XX:NewSize=128m -XX:MaxNewSize=128m TIA :-) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] = Norris Shelton Software Engineer Sun Certified Java 1.1 Programmer Appriss, Inc. ICQ# 26487421 AIM NorrisEShelton YIM norrisshelton __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Réf. : RE: build mod_jk2 ?
OK, Thanks but when I do configure I have the follwing error : # ./configure --with-apx2=/opt/apache2/bin/apxs .. checking for mkdir... /usr/bin/mkdir no apxs given no apxs2 given checking for tomcat33 location... not provided checking for tomcat40 location... not provided checking for tomcat41 location... not provided checking for JDK location (please wait)... /opt/java from environment checking Java platform... checking Java platform... checking os_type directory... hp-ux configure: error: Cannot find any WebServer Can you help me ? Stuart Stephen [EMAIL PROTECTED] 20/08/2003 13:28 Veuillez répondre à Tomcat Users List Pour : Tomcat Users List [EMAIL PROTECTED] cc : Objet : RE: build mod_jk2 ? # cd /usr/local/src # wget http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk2/release/v2.0. 2/src/jakarta-tomcat-connectors-jk2-2.0.2-src.tar.gz # gunzip -dc jakarta-tomcat-connectors-jk2-2.0.2-src.tar.gz | tar xf - # cd jakarta-tomcat-connectors-jk2-2.0.2-src/jk/native2 # ./configure --with-apxs2=/usr/local/apache2/bin/apxs # make # cd ../build/jk2/apache2 # ls -la -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 20 August 2003 11:59 To: [EMAIL PROTECTED] Subject: build mod_jk2 ? Hi, I have Tomacat 4.1.27 , and apache 2.0.35 on HP-UX 11.0 Where can I found the procedure and the source to build mod_jk2 ? Thanks in advance - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Installing Tomcat as a Service
I already have done the hard work of intergrating apache and tomcat together in the desired way. I now need to install the services. Going to the RPM is a backward step for me now. Ideally i'd like to understand how the services are installed under the linux os now. I'll still have to research it to get the Java applications started as services. -Original Message- From: Manolo Ramirez T. [mailto:[EMAIL PROTECTED] Sent: 20 August 2003 15:02 To: Tomcat Users List Subject: Re: Installing Tomcat as a Service Hi, Check this: http://www.jpackage.org They have the rpm version of tomcat, that will make all the hard work for you. Regards. Manolo Ramirez T. Stuart Stephen wrote: Hi all, How might I go about installing Tomcat as a service in RedHat 9.0. I've never installed a service under linux manually before and I'm not sure what to do. I can't find the appropriate documentation in the manuals for either Tomcat or RedHat. I must be looking in the wrong places :O( UNRELATED: Also, If I wanted to install a java program as a service, how might I do this? Is this a similar process? Regards, Stuart - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Installing Tomcat as a Service
Thanks for the reply, I've tried creating a script in the /etc/init.d directory and then running the chkconfig --add script-name and this hasn't worked for me. I'm getting an error saying that: service service-name does not support chkconfig I must still be doing something wrong? The script has the same permissions showing in the ls -l list? -Original Message- From: Paul Yunusov [mailto:[EMAIL PROTECTED] Sent: 20 August 2003 13:24 To: Tomcat Users List Subject: Re: Installing Tomcat as a Service On August 20, 2003 04:19 am, Stuart Stephen wrote: Hi all, How might I go about installing Tomcat as a service in RedHat 9.0. I've never installed a service under linux manually before and I'm not sure what to do. I can't find the appropriate documentation in the manuals for either Tomcat or RedHat. I must be looking in the wrong places :O( UNRELATED: Also, If I wanted to install a java program as a service, how might I do this? Is this a similar process? Regards, Stuart man chkconfig man serviceconf man init For a Java program, write a wrapper shell script like Tomcat authors did with catalina.sh. Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Apache-Tomcat-Struts 404 Not Found
Don't the JkMount lines need to be inside the VirtualHost tags? --- Johan Wasserman - CPX Mngd Services [EMAIL PROTECTED] wrote: Nope, that didn't solve the problem. But let it be known that I'm not realy a guru when it comes to configuring this lot. Heres some extracts: httpd.conf- VirtualHost * ServerAdmin [EMAIL PROTECTED] ServerName localhost ErrorLog logs/local-error.log CustomLog logs/local-access.log common /VirtualHost VirtualHost * ServerAdmin [EMAIL PROTECTED] DocumentRoot C:\Apache\Tomcat 5.0\webapps\itdiv ServerName www.itdiv.com ErrorLog logs/www.itdiv.com-error.log CustomLog logs/www.itdiv.com-access.log common /VirtualHost ### Tomcat 5 Connector include C:/Apache/Tomcat 5.0/conf/mod_jk.conf mod_jk.conf- # JkMount /* ajp13 JkMount /*.do ajp13 JkMount /*.jsp ajp13 JkMount /servlet/* ajp13 http://localhost/struts-example/logon.do - results in a 404. http://localhost:8080/struts-example/logon.do - works! http://www.itdiv.com/logon.do - results in a 404. http://www.itdiv.com:8080/logon.do- works! Regards, and thanks. Johan. -Original Message- From: Johan Wasserman - CPX Mngd Services Sent: Wednesday, August 20, 2003 7:42 AM To: Tomcat Users List Subject: RE: Apache-Tomcat-Struts 404 Not Found Thanks John, no I didn't. But I did have JkMount /* ajp13, wouldn't that do it? I'll try specifying it the way you suggest. Thanks again. Johan. -Original Message- From: John Turner [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 19, 2003 10:30 PM To: Tomcat Users List Subject: Re: Apache-Tomcat-Struts 404 Not Found Tomcat 4 and Tomcat 5 configuration with mod_jk are the same. Do you have something like this in your httpd.conf file? JkMount /*.do ajp13 John Johan Wasserman - CPX Mngd Services wrote: Hi, I got Tomcat and Apache configured according to documentation (still referencing TC4x) I found on the web. It seemed to work fine but while testing struts I found that the actions (*do) resulted in a 404 Not found. When I test via Tomcat only (localhost:8080) it works fine. I have probably only been looking in the wrong places but cannot seem to find documentation or a download area for mod_jk to do a config on the following versions: Tomcat v. 5.0.3 Apache v. 2.0.46 So, my curent versions are configured using Tomcat v 4x documentation (and mod_jk). Have anyone done this successfully on the newer versions, and where can I download the required bin's and doc's? Thanks! Johan. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] = Choose the Sprite when the Coke is placed before you... __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Connecting to MySql. Cannot load JDBC driver class 'null'
Hi there, I hope this to be useful to somebody. I installed Tomcat 4.1.24 y MySql 3.23 en Linux Red Hat 8.0 Followed the steps within jakarta page: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-how to.html in order to get connected to my database. However, I found the next error: Cannot load JDBC driver class 'null'. After some troubleshooting, I finnaly got with two problem causes: 1. For some reason, Mysql's JDBC Driver tries to connect to localhost.localdomain. Which means, that when you specify into the connection string (in my case) jdbc:mysql://localhost:3306/DBPrueba java tries always to connect to localhost.localdomain. I solved this problem assigning permission to the Database in Mysql for my test user, only that this time for different domain: GRANT ALL PRIVILEGES ON DBPrueba.* TO 'administrator'@'localhost.localdomain' IDENTIFIED BY 'passwd'; 2. Tha Database version I'm using doesn't recognize the default parameter used by Resource within server.xml, to setup JDBC driver manager. Which for I had to modifify the next lines: parameter namedriverClassName/name valueorg.gjt.mm.mysql.Driver/value /parameter for these ones: parameter namedriverName/name valueorg.gjt.mm.mysql.Driver/value /parameter The steps I made here are an adition over the manual found in Tomcat web page. For further reference, please follow th link shown in this mail. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Exception processing JAR
Try to set paths and context paths in your server.xml with / instead of \'s. Tim Davidson [EMAIL PROTECTED] 20-08-2003 14:49 Please respond to Tomcat Users List To: [EMAIL PROTECTED] cc: Subject:Exception processing JAR We are using the jregex package in our application, and when tomcat starts it causes this error in the tomcat logs, can anyone suggest a reason for it? The same error has been seen on other machines with different JAR, but the same exception. we are using tomcat 4.1.24 java 1.4 winNT 2003-08-20 14:28:09 ContextConfig[crisp] Exception processing JAR at resource path /WEB-INF/lib/jregex.jar javax.servlet.ServletException: Exception processing JAR at resource path /WEB-INF/lib/jregex.jar at org.apache.catalina.startup.ContextConfig.tldScanJar(ContextConfig.java:930) at org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.java:868) at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:647) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:243) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3567) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardHost.start(StandardHost.java:738) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347) at org.apache.catalina.core.StandardService.start(StandardService.java:497) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2190) at org.apache.catalina.startup.Catalina.start(Catalina.java:512) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) - Root Cause - java.io.FileNotFoundException at org.apache.naming.resources.DirContextURLConnection.getInputStream(DirContextURLConnection.java:344) at sun.net.www.protocol.jar.URLJarFile.retrieve(URLJarFile.java:161) at sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:42) at sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:78) at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:85) at sun.net.www.protocol.jar.JarURLConnection.getJarFile(JarURLConnection.java:69) at org.apache.catalina.startup.ContextConfig.tldScanJar(ContextConfig.java:906) at org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.java:868) at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:647) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:243) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3567) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardHost.start(StandardHost.java:738) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347) at org.apache.catalina.core.StandardService.start(StandardService.java:497) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2190) at org.apache.catalina.startup.Catalina.start(Catalina.java:512) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324)
Processing .html files like JSPs
In the app I'm working on there's a number JSP files that actually have the extension .html. Is there a way to configure Tomcat to treat these files just as if they had the standard .jsp extension, or do I need to rely on Apache rewrite rules? I'm using Tomcat 4.1.27 on Linux. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
high memory usage ....
Hi, I believe many other of you have encountered the high memory usage with tomcat? Is there a way to decrease the amount the java processes use? Furthermore, all the java processes are started under user root. Is there a way to start the java processes under another user? Any particular version of java and/or tomcat adviced to deal with these problems? I guess auditing the java applications which are written is also very nice to do and fixup some memory leaks if they're there? Bye, Mipam. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem
hi all, i m having follwing problem pls help me out ASAP as its really urgent C:\tomcat\work\Standalone\localhost\callreg\passcall_jsp.java:58: package callreg does not exist callreg.URLBean db = null; An error occurred at line: 2 in the jsp file: /passcall.jsp Generated servlet error: C:\tomcat\work\Standalone\localhost\callreg\passcall_jsp.java:60: package callreg does not exist db = (callreg.URLBean) pageContext.getAttribute(db, PageContext.APPLICATION_SCOPE); An error occurred at line: 2 in the jsp file: /passcall.jsp Generated servlet error: C:\tomcat\work\Standalone\localhost\callreg\passcall_jsp.java:63: package callreg does not exist db = (callreg.URLBean) java.beans.Beans.instantiate(this.getClass().getClassLoader(), callreg.URLBean); and my dir structure is: c:/tomcat/webapps/callreg/web-inf/calsses/callreg/URLBean.class c:/tomcat/webapps/callreg/web-inf/lib/tds.jar and i am includeing jsp as jsp:useBean id=db scope=application class=callreg.URLBean / and connecting as Class.forName(db.getDriver()); Connection con=DriverManager.getConnection(db.getUrl(),db.getUser(),db.getPassword()); thanx in advance rgrds Shaman ___ Meet your old school or college friends from 1 Million + database... Click here to reunite www.batchmates.com/rediff.asp - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: About heap size, gc and newsize
Howdy, Left to it's own devices, GC usually only happens when the JVM is using almost all of the allocated memory. Therefore, the more memory allocated, the longer till GC and the longer GC will last. ;( ;( This is a common wrong assumption people have about Java's modern GC algorithms. In fact, they run all the time, even when not configured to use the incremental (or train) collector. With all the default VM settings, GC scanning and reclaiming for a typical application will happen often, long before the heap is largely allocated, frequently more than once a second. This is pretty easy to see if you enable -verbose:gc flag to the JVM. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
apache2, mod_jk2, tomcat4.1.27: server has been restarted or reset this connection
Hello all! i have setup apache2 with mod_jk2 and tomcat4.1.27 and all works fine, but the following log messages is written to the mod_jk log file: 19.08.2003 16:43:05 org.apache.jk.common.ChannelSocket processConnection INFO: server has been restarted or reset this connection 19.08.2003 16:43:05 org.apache.jk.common.ChannelSocket processConnection INFO: server has been restarted or reset this connection 19.08.2003 16:43:05 org.apache.jk.common.ChannelSocket processConnection INFO: server has been restarted or reset this connection 19.08.2003 16:43:05 org.apache.jk.common.ChannelSocket processConnection as i can see this log message is written on every request, so i can change the log level or if there is a real problem would appreciate solving the problem. is this a real problem? and if yes, does anybody know whats the problem? i have tried several things with WORKER.sockt_keepalive and WORKER.socket_timeout, but things don't change... thx, Chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Processing .html files like JSPs
The quick way (but there are other ways too) In $TOMCAT_HOME/conf/web.xml servlet-mapping servlet-namejsp/servlet-name url-pattern*.jsp/url-pattern /servlet-mapping ADD servlet-mapping servlet-namejsp/servlet-name url-pattern*.html/url-pattern /servlet-mapping -Tim [EMAIL PROTECTED] wrote: In the app I'm working on there's a number JSP files that actually have the extension .html. Is there a way to configure Tomcat to treat these files just as if they had the standard .jsp extension, or do I need to rely on Apache rewrite rules? I'm using Tomcat 4.1.27 on Linux. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: CVS with tomcat
Thank you Can you give an example of ant source whick reload and deploy to a tomcat server? It can help me. Thanks Paul Sundling wrote: I'm not sure why you'd want to have it deployed automatically. You can probably do it with ant and cruise control? With ant, you can create targets that reload your app or deploy it to a tomcat server. That's what I do currently and it even integrates well with eclipse! If you really want to do it automatically I heard cruise control does that sort of functionality, but I'm not sure about having it look for changes in CVS. SuniX wrote: Hi Is there a way to use CVS with tomcat ? i want my tomcat server to check a cvs project and deployed it automaticaly. (cvs server and tomcat server in the same machine running on a debian testing) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problem
Howdy, Import the bean class in your JSP. Make sure the directory name is classes not calsses. Give your message a better subject than Problem or Urgent. And read the FAQ. Yoav Shapira Millennium ChemInformatics -Original Message- From: shaman jain [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 20, 2003 9:50 AM To: Stuart MacPherson Cc: [EMAIL PROTECTED] Subject: Problem hi all, i m having follwing problem pls help me out ASAP as its really urgent C:\tomcat\work\Standalone\localhost\callreg\passcall_jsp.java:58: package callreg does not exist callreg.URLBean db = null; An error occurred at line: 2 in the jsp file: /passcall.jsp Generated servlet error: C:\tomcat\work\Standalone\localhost\callreg\passcall_jsp.java:60: package callreg does not exist db = (callreg.URLBean) pageContext.getAttribute(db, PageContext.APPLICATION_SCOPE); An error occurred at line: 2 in the jsp file: /passcall.jsp Generated servlet error: C:\tomcat\work\Standalone\localhost\callreg\passcall_jsp.java:63: package callreg does not exist db = (callreg.URLBean) java.beans.Beans.instantiate(this.getClass().getClassLoader(), callreg.URLBean); and my dir structure is: c:/tomcat/webapps/callreg/web-inf/calsses/callreg/URLBean.class c:/tomcat/webapps/callreg/web-inf/lib/tds.jar and i am includeing jsp as jsp:useBean id=db scope=application class=callreg.URLBean / and connecting as Class.forName(db.getDriver()); Connection con=DriverManager.getConnection(db.getUrl(),db.getUser(),db.getPassword ()); thanx in advance rgrds Shaman ___ Meet your old school or college friends from 1 Million + database... Click here to reunite www.batchmates.com/rediff.asp - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Installing Tomcat as a Service
Stuart, You basically need to write a wrapper .sh script to tart tomcat and put it into the init.d directory. The init.d directory varies with the linux distro but common places a /etc/init.d and /etc/rc.d/init.d. Then you need to create sym links to start/stop it on the various run levels. I refer you to your documention on services under RedHat. I believe that somebody mentioned that there is a catalin.sh script that works as a service, so you may not need to write one. In most of the RedHat distros that I have used, there is a script in the init.d directory named httpd that takes care of stopping and starting apache as a service. I would look at the other scripts in init.d for information on how to write one. James --- Stuart Stephen [EMAIL PROTECTED] wrote: I already have done the hard work of intergrating apache and tomcat together in the desired way. I now need to install the services. Going to the RPM is a backward step for me now. Ideally i'd like to understand how the services are installed under the linux os now. I'll still have to research it to get the Java applications started as services. -Original Message- From: Manolo Ramirez T. [mailto:[EMAIL PROTECTED] Sent: 20 August 2003 15:02 To: Tomcat Users List Subject: Re: Installing Tomcat as a Service Hi, Check this: http://www.jpackage.org They have the rpm version of tomcat, that will make all the hard work for you. Regards. Manolo Ramirez T. Stuart Stephen wrote: Hi all, How might I go about installing Tomcat as a service in RedHat 9.0. I've never installed a service under linux manually before and I'm not sure what to do. I can't find the appropriate documentation in the manuals for either Tomcat or RedHat. I must be looking in the wrong places :O( UNRELATED: Also, If I wanted to install a java program as a service, how might I do this? Is this a similar process? Regards, Stuart - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] = Choose the Sprite when the Coke is placed before you... __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: high memory usage ....
I believe many other of you have encountered the high memory usage with tomcat? Is there a way to decrease the amount the java processes use? yes, take a close look at the Tomcat configuration reference (Connectors) Furthermore, all the java processes are started under user root. Is there a way to start the java processes under another user? This has been discussed approx. 2874438 times on this list ;-) Any particular version of java and/or tomcat adviced to deal with these problems? In general, memory comsumption is likely to decrease with newer JDKs. I also noted a noticeably startup speed improvement using 1.4.2 - but YMMV depending on deployment needs/restrictions. It might also be worth trying JDKs from different vendors. Regarding TC versions: always try to stay as up to date as possible - there are lot of continuos improvements regarding speed, stability, memory consumption and of cause fixed bugs. Additionally, TC5 has seen a lot of improvements regarding its inner workings resulting in better overall speed and less memory consumption. I guess auditing the java applications which are written is also very nice to do and fixup some memory leaks if they're there? There a lot of different tools (commercial and OSS) available, just do a search on google. Yann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: high memory usage ....
on Wed, 20 Aug 2003 15:55:50 +0200 (MET DST) Mipam [EMAIL PROTECTED] wrote: Hi, [..] Furthermore, all the java processes are started under user root. Actually it's not up to java or tomcat. Is there a way to start the java processes under another user? su user -c path_to_executable or login as user and then run the code. Also it's possible but unprobable that your java is suided (no way!) Any particular version of java and/or tomcat adviced to deal with these problems? No, you rather should experiment with options liek (sun java) -Xm* and/or gc options I guess auditing the java applications which are written is also very nice to do and fixup some memory leaks if they're there? IMO it's hard to make a real memory leak in java. Regards, Rufio - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: That ever-popular 'wrong version:46, expected 45' message
John Corrigan wrote Haven't seen/heard anything about this error, but it looks to me like maybe you have an older version of servlet.jar in your ext directory That does not seem to be ther problem. There is only one servlet.jar, right where it should be in the Tomcat common lib Jon Wingfield wrote: The 46 and 45 are magic numbers that the java compiler puts into byte-code. It looks like you are trying to compile with a older (and incompatible) version of javac than the servlet classes were compiled against. I've seen this before when an installation of Oracle added jdk1.1.8 when I was already using version 1.3... That's pretty much what I guessed myself, but I when I checked the java version number. I found H:\BrilliantlyImaginativeDirectoryName\java -version java version 1.4.1_04 java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_04-b01) Java HotSpot(TM) Client VM (build 1.4.1_04-b01, mixed mode) This is the version of Java the Installation Wizard alledged that it was using when I isnatlled Tomcat -- in fact, it is the only version of Java on this paritcular machine. Has anyone ever made a list of exactly which versions of the Tomcat serlet.jar are compatible with whichversions of Java? Is there even documentation that describes which versions of javac the mystical version numbers '46' and ' 45 refer to? Paul Gazis - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: apache2, mod_jk2, tomcat4.1.27: server has been restarted or reset this connection
Chris, where do I get mod_jk2 (binery) and some kind of documentation to tell me how to set up. I have Tomcat v. 5.0.3 Apache v. 2.0.46 but the setup does not work too well. Thanks. Johan. -Original Message- From: Chris Joelly [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 20, 2003 3:43 PM To: [EMAIL PROTECTED] Subject: apache2, mod_jk2, tomcat4.1.27: server has been restarted or reset this connection Hello all! i have setup apache2 with mod_jk2 and tomcat4.1.27 and all works fine, but the following log messages is written to the mod_jk log file: 19.08.2003 16:43:05 org.apache.jk.common.ChannelSocket processConnection INFO: server has been restarted or reset this connection 19.08.2003 16:43:05 org.apache.jk.common.ChannelSocket processConnection INFO: server has been restarted or reset this connection 19.08.2003 16:43:05 org.apache.jk.common.ChannelSocket processConnection INFO: server has been restarted or reset this connection 19.08.2003 16:43:05 org.apache.jk.common.ChannelSocket processConnection as i can see this log message is written on every request, so i can change the log level or if there is a real problem would appreciate solving the problem. is this a real problem? and if yes, does anybody know whats the problem? i have tried several things with WORKER.sockt_keepalive and WORKER.socket_timeout, but things don't change... thx, Chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Installing Tomcat as a Service
Sounds like your problem can be easily solved by reading the manpage, as the previous email from Paul suggests. man chkconfig will tell you exactly why service service-name does not support chkconfig you need specially formatted comments starting with something like # chkconfig : 2345 80 20 -Original Message- From: Stuart Stephen [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 20, 2003 10:57 AM To: Tomcat Users List Subject: RE: Installing Tomcat as a Service Thanks for the reply, I've tried creating a script in the /etc/init.d directory and then running the chkconfig --add script-name and this hasn't worked for me. I'm getting an error saying that: service service-name does not support chkconfig I must still be doing something wrong? The script has the same permissions showing in the ls -l list? -Original Message- From: Paul Yunusov [mailto:[EMAIL PROTECTED] Sent: 20 August 2003 13:24 To: Tomcat Users List Subject: Re: Installing Tomcat as a Service On August 20, 2003 04:19 am, Stuart Stephen wrote: Hi all, How might I go about installing Tomcat as a service in RedHat 9.0. I've never installed a service under linux manually before and I'm not sure what to do. I can't find the appropriate documentation in the manuals for either Tomcat or RedHat. I must be looking in the wrong places :O( UNRELATED: Also, If I wanted to install a java program as a service, how might I do this? Is this a similar process? Regards, Stuart man chkconfig man serviceconf man init For a Java program, write a wrapper shell script like Tomcat authors did with catalina.sh. Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Installing Tomcat as a Service
Sounds like your problem can be easily solved by reading the manpage, as the previous email from Paul suggests. man chkconfig will tell you exactly why service service-name does not support chkconfig The whole point of chkconfig is to manage the installing of the service for you ( e.g. symlinks to init.d/yourscript from different run levels) You need specially formatted comments in your scripts, starting with something like # chkconfig : 2345 80 20 - the manpage has an example. -Original Message- From: Stuart Stephen [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 20, 2003 10:57 AM To: Tomcat Users List Subject: RE: Installing Tomcat as a Service Thanks for the reply, I've tried creating a script in the /etc/init.d directory and then running the chkconfig --add script-name and this hasn't worked for me. I'm getting an error saying that: service service-name does not support chkconfig I must still be doing something wrong? The script has the same permissions showing in the ls -l list? -Original Message- From: Paul Yunusov [mailto:[EMAIL PROTECTED] Sent: 20 August 2003 13:24 To: Tomcat Users List Subject: Re: Installing Tomcat as a Service On August 20, 2003 04:19 am, Stuart Stephen wrote: Hi all, How might I go about installing Tomcat as a service in RedHat 9.0. I've never installed a service under linux manually before and I'm not sure what to do. I can't find the appropriate documentation in the manuals for either Tomcat or RedHat. I must be looking in the wrong places :O( UNRELATED: Also, If I wanted to install a java program as a service, how might I do this? Is this a similar process? Regards, Stuart man chkconfig man serviceconf man init For a Java program, write a wrapper shell script like Tomcat authors did with catalina.sh. Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: high memory usage ....
Howdy, Yann Cébron [mailto:[EMAIL PROTECTED], said: Regarding TC versions: always try to stay as up to date as possible - there are lot of continuos improvements regarding speed, stability, memory consumption and of cause fixed bugs. Additionally, TC5 has seen a lot of improvements regarding its inner workings resulting in better overall speed and less memory consumption. Have you benchmarked tomcat 5.x vs. 4.1.x to come up with the above speed and memory consumption claims? I'd be very curious to see your benchmarks. Thanks, Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: That ever-popular 'wrong version:46, expected 45' message
Howdy, in fact, it is the only version of Java on this paritcular machine. Has anyone ever made a list of exactly which versions of the Tomcat serlet.jar are compatible with whichversions of Java? Is there even documentation that describes which versions of javac the mystical version numbers '46' and ' 45 refer to? I think it's roughly: 46 - JDK 1.2.2 47 - JDK 1.3.0 48 - JDK 1.4.0 You can use BCEL (http://jakarta.apache.org/bcel/) to confirm/correct the above (I'm only about 50% sure of the above) if you'd like. This error comes up when you're trying to run classes compiled in a newer JVM than the one you're running. If you compile the classes yourself on this machine and there's only one JVM on this machine, I'm stumped ;) If neither of those is true, make sure your only JVM on this machine is the latest JVM possible. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: That ever-popular 'wrong version:46, expected 45' message
You have a old version of the tools.jar file. Get rid of it. Larry - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Processing .html files like JSPs
Look for the line '!-- The mapping for the JSP servlet --' in your default web.xml and add this underneath: servlet-mapping servlet-namejsp/servlet-name url-pattern*.html/url-pattern /servlet-mapping A better solution of course would be to rename the files so that they have a .jsp extension... -chris -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 20, 2003 12:09 PM To: [EMAIL PROTECTED] Subject: Processing .html files like JSPs In the app I'm working on there's a number JSP files that actually have the extension .html. Is there a way to configure Tomcat to treat these files just as if they had the standard .jsp extension, or do I need to rely on Apache rewrite rules? I'm using Tomcat 4.1.27 on Linux. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Getting mod_auth_sspi to work with TC 4.1.18?
Title: Getting mod_auth_sspi to work with TC 4.1.18? Hello Chris, I was also trying to make mod_sspi work with mod_jk did you have any luck doing this? Any help would be greatly appreciated. Thank you, Anthony DeLisle - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Processing .html files like JSPs
It should have some setting in your web.xml to configure you context: exact syntax, I'm unsure. Look for context documentation. Shawn Zernik Internetwork Consulting www.internetworkconsulting.net -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 20, 2003 11:09 AM To: [EMAIL PROTECTED] Subject: Processing .html files like JSPs In the app I'm working on there's a number JSP files that actually have the extension .html. Is there a way to configure Tomcat to treat these files just as if they had the standard .jsp extension, or do I need to rely on Apache rewrite rules? I'm using Tomcat 4.1.27 on Linux. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat Userdatabase
I installed the last binary build on my system, however, I need access to the manager web application, but I don't know the username/password. Where can I find this, or what is this password in general? Sjoerd van Leent - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat Userdatabase
I installed the last binary build on my system, however, I need access to the manager web application, but I don't know the username/password. Where can I find this, or what is this password in general? Sjoerd van Leent - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: That ever-popular 'wrong version:46, expected 45' message
Larry Meadors writes: You have a old version of the tools.jar file. Get rid of it. I checked yesterday after looking through old message on this archive and I don't see how that can be the problem. I have precisely two copies of the tools.jar file, one in my j2sdk1.4.2, and one in my Tomcat4.1.27 directory. Each is 4.85 M, and contains 1373 (or whatever) entries. They are, as far as I can tell, new, current, and entirely identical. If they aren't -- if I have missed some subtle difference -- which one should be consigned to oblivion? Paul Gazis - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Starting tomcat from init scripts (HP/UX)
Since nobody has responded does this mean nobody has any more ideas on the problem or am I getting the You idiot. The answer is staring you in the face. silent treatment? If it is the latter, I will admit being an idiot if someone will enlighten me. If it is the former, I want to say thank you for the help I have received to this point because I am farther along then I was, and if I figure out a solution short of a cron entry I'll post it. Thanks again for the help. Carey -Original Message- From: Lott, Carey Sent: Friday, August 15, 2003 11:18 AM To: 'Tomcat Users List' Subject: RE: Starting tomcat from init scripts (HP/UX) Ok, I finally got the script to execute correctly and I got the familiar output: Using CATALINA_BASE: /bto/appl/apache/jakarta-tomcat-4.0.4 Using CATALINA_HOME: /bto/appl/apache/jakarta-tomcat-4.0.4 Using CATALINA_TMPDIR: /bto/appl/apache/jakarta-tomcat-4.0.4/temp Using JAVA_HOME: /opt/java1.4 But tomcat still isn't starting, and I am not receiving any other errors. Also the script executes fine when I do it from command line. I have placed the start/stop script in /sbin/init.d/. I have made the script be last to start and first to stop. I couldn't get the script to recognize the env variables when they were in the rc.config.d directory, so I placed them directly in the script which seems to have worked, but the process still isn't starting. Can anybody give me any other ideas as to what could be wrong or what I could try? Any ideas how I can get a better error information? Below is the start/stop script - /sbin/init.d/tomcat. Can you see anything missing? Thanks in advance for everybody's input and help. #!/sbin/sh # Start/Stop for Tomcat Java Servlet Container # PATH=/sbin:/usr/sbin:/usr/bin export PATH ## Source global configuration file ##. /etc/rc.config # Needed variables CATALINA_HOME=/bto/appl/apache/jakarta-tomcat-4.0.4 export CATALINA_HOME JAVA_HOME=/opt/java1.4 export JAVA_HOME CLASSPATH=/bto/appl/apache/jakarta-tomcat-4.0.4/common/lib/servlet.jar:/opt/ java1.4/jre/lib/rt.jar:/opt/java1.4/lib/tools.jar:/opt/java1.4/lib/dt.jar:/o pt/java1.4/lib/htmlconverter.jar:/opt/java1.4/jre/lib/charsets.jar:/opt/java 1.4/jre/lib/javaplugin.jar:/opt/java1.4/jre/lib/ext/dnsns.jar:/opt/java1.4/j re/lib/ext/localedata.jar:/opt/java1.4/jre/lib/ext/ldapsec.jar:/opt/java1.4/ jre/lib/jce.jar:/opt/java1.4/jre/lib/jsse.jar:.:/bto/appl/apache/jakarta-tom cat-4.0.4/webapps/esd/WEB-INF/classes:/bto/appl/apache/jakarta-tomcat-4.0.4/ webapps/esd/WEB-INF/lib:/bto/appl/apache/htdocs/esd/java:/bto/sys/oracle/pro duct/8.0.6/jdbc/lib/classes111.zip export CLASSPATH case $1 in start_msg) echo Starting Tomcat ;; 'start') /bto/appl/apache/jakarta-tomcat-4.0.4/bin/catalina.sh start /bto/appl/apache/jakarta-tomcat-4.0.4/logs/bootlogstart.txt 21 ;; stop_msg) echo Stopping Tomcat ;; 'stop') /bto/appl/apache/jakarta-tomcat-4.0.4/bin/catalina.sh stop /bto/appl/apache/jakarta-tomcat-4.0.4/logs/bootlogstop.txt 21 ;; esac exit 0; signature nameCarey Lott/name posWeb Tools Support/pos orgInfrastructure Storage Tools Support/org companyEDS/company accountBellSouth/account phone404-529-6676/phone email[EMAIL PROTECTED]/email ipager[EMAIL PROTECTED]/ipager /signature disclaimer * The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers. /disclaimer -Original Message- From: Morgan Pyne [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 3:54 AM To: Tomcat Users List Subject: RE: Starting tomcat from init scripts (HP/UX) Have a look at /usr/share/doc/start_up.txt or /usr/share/doc/start_up.ps on a HP-UX 11.00 machine for details of how to write a startup script conforming to HP-UX's standards (for issuing messages at startup and shutdown via the 'start_msg' and 'stop_msg' parameters, honouring the settings in /etc/rc.config.d etc...). You can use any of the scripts in /sbin/init.d as a basis - modify one as appropriate and get it to simply call catalina.sh. We also modified our catalina.sh to check which userid was calling the script. If it was root it would sudo to the non-privileged user that Tomcat ran under ('tomcat'). If it was userid 'tomcat' calling it it would simply continue. If it was anyone else, it would exit with an error message. This way we get Tomcat started as a non-privileged user starting automatically on boot. Regards, Morgan -Original Message-
Quickly get Tomcat running with Apache on Solaris?
Solaris 9 has Apache and Tomcat loaded by default. I got Apache running but Tomcat needed more work. So I tried to download it from Jakarta at: http://apache.oregonstate.edu/jakarta/tomcat-4/binaries/ I gunzipped it and un-tarred it. Then I did what it said to do in the docs... * Unpack the binary distribution into a convenient location so that the distribution resides in its own directory (conventionally named jakarta-tomcat-4.0). For the purposes of the remainder of this document, the symbolic name ${catalina.home} is used to refer to the full pathname of the release directory. (2) Start Up Tomcat 4.0 There are two techniques by which Tomcat 4.0 can be started: * Via an environment variable: - Set an environment variable CATALINA_HOME to the path of the directory into which you have installed Tomcat 4.0. - Execute the shell command: %CATALINA_HOME%\bin\startup (Windows) $CATALINA_HOME/bin/startup.sh (Unix) * By modifying your current working directory: - Execute the following shell commands: cd %CATALINA_HOME%\bin (Windows) startup (Windows) cd $CATALINA_HOME/bin (Unix) ./startup.sh(Unix) NOW - It won't run. I'm not even sure it was a Solaris Binary. This is what I get in the catalina.out file: $ cat catalina.out Exception in thread main java.lang.NoClassDefFoundError: org/apache/catalina/startup/Bootstrap Whats the easiest way to get Tomcat running with Apache on Solaris 9? Thanks! __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JK directives in httpd.conf
Hello all. I've the same problem descrived in http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk2/vhosthowto.html when the ajp13 connector can't find a virtual host that matches a uri, and i want to allow tomcat to serve all jsp pages without checking the servername because this is what did before apache. But i got errors in log, and Internal Server Error in web: msgAjp.receive(): Bad signature 0 0 channelSocket.receive(): Bad header workEnv.processCallbacks() Error reading reply ajp13.service() ajpGetReply recoverable error 12 ajp13.service() Error forwarding ajp13:localhost:8013 1 0 mod_jk.handler() Error connecting to tomcat 12 Here's my vhosts.conf NameVirtualHost 10.162.120.22 VirtualHost 10.162.120.22 DocumentRoot /usr/local/datos/www/www.diarioinformacion.com ServerName www.diarioinformacion.com:80 ErrorLog /var/log/apache/www.diarioinformacion.com-error.log Location /*.jsp JkUriSet worker ajp13:localhost:8009 /Location /VirtualHost NameVirtualHost 10.162.120.42 VirtualHost 10.162.120.42 DocumentRoot /usr/local/datos/www/www.laopiniondezamora.es ServerName www.laopiniondezamora.es:80 ErrorLog /var/log/apache/www.laopiniondezamora.es-error.log Location /*.jsp JkUriSet worker ajp13:localhost:8010 /Location /VirtualHost And here's my workers2.properties: [shm] file=/usr/local/software/apache/logs/shm.file size=1048576 [channel.socket:localhost:8009] port=8009 host=127.0.0.1 [channel.socket:localhost:8010] port=8010 host=127.0.0.1 [ajp13:localhost:8009] channel=channel.socket:localhost:8009 [ajp13:localhost:8010] channel=channel.socket:localhost:8010 [uri:www.diarioinformacion.com/*.jsp] group=ajp13:localhost:8009 [uri:proinf02.renr.es/*.jsp] group=ajp13:localhost:8009 [uri:10.162.120.22/*.jsp] group=ajp13:localhost:8009 [uri:www.laopiniondezamora.es/*.jsp] group=ajp13:localhost:8010 [uri:10.162.130.41/*.jsp] group=ajp13:localhost:8010 [uri:prozam02.renr.es/*.jsp] group=ajp13:localhost:8010 [uri:10.162.120.42/*.jsp] group=ajp13:localhost:8010 [uri:213.0.95.41/*.jsp] group=ajp13:localhost:8010 Thanks a lot. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Userdatabase
Try in conf/tomcat-users.xml. - Original Message - From: Sjoerd van Leent [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, August 20, 2003 8:58 PM Subject: RE: Tomcat Userdatabase I installed the last binary build on my system, however, I need access to the manager web application, but I don't know the username/password. Where can I find this, or what is this password in general? Sjoerd van Leent - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Userdatabase
you can set it in tomcat-users.xml, e.g.: ?xml version='1.0' encoding='utf-8'? tomcat-users role rolename=manager/ role rolename=admin/ user username=user password=pass roles=admin,manager/ /tomcat-users On Wednesday 20 August 2003 3:45 pm, Sjoerd van Leent wrote: I installed the last binary build on my system, however, I need access to the manager web application, but I don't know the username/password. Where can I find this, or what is this password in general? Sjoerd van Leent - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Pablo Mayrgundter Director of Applications and Services www.reeltwo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat Userdatabase
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/manager-howto.html -chris -Original Message- From: Sjoerd van Leent [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 20, 2003 3:45 PM To: 'Tomcat Users List' Subject: Tomcat Userdatabase I installed the last binary build on my system, however, I need access to the manager web application, but I don't know the username/password. Where can I find this, or what is this password in general? Sjoerd van Leent - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Userdatabase
Hi Sjoerd, It's in /tomcat/conf/tomcat-users.xml should look like this: ## ?xml version='1.0' encoding='utf-8'? tomcat-users role rolename=tomcat/ role rolename=role1/ role rolename=manager/ role rolename=admin/ user username=tomcat password=tomcat roles=tomcat,admin,manager/ user username=role1 password=tomcat roles=role1/ user username=both password=tomcat roles=tomcat,role1/ /tomcat-users ### then restart tomcat and voila! you're in :-) kind regards, Luke On Thu, 2003-08-21 at 05:15, Sjoerd van Leent wrote: I installed the last binary build on my system, however, I need access to the manager web application, but I don't know the username/password. Where can I find this, or what is this password in general? Sjoerd van Leent - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- when my computer smiles, I'm happy Luke Vanderfluit Mobile: 0421 276 282 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: maxProcessors problem
Have you verified that at the time of the Out of Memory errors that the JVM is somewhere near 896M RAM? How about when it starts up and there is little or no traffic? Is it at or above (probably above) 384M? It usually has 160 MB to 220 MB of memory allocated (these figures are from top, so room for some error). The system is under pretty heavy traffic when it starts up. I have maxProcessors set to 384 and minProcessors set to 50. Since you have free system RAM left, then it sounds like your 896M is too small for the load. Problem is, if I increase -Xmx and don't touch anything else, I get this OutOfMemoryError too. The system has 1.2 GB to 1.4 GB of memory free when this error occurs. Do you load balance Tomcats across machines? Or are you running all these users against one Tomcat? Just one Tomcat and MySQL on the server. Thanks, Mike -Original Message- From: Ben Ricker [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 20, 2003 10:18 AM To: [EMAIL PROTECTED] Subject: RE: maxProcessors problem On Tue, 2003-08-19 at 16:59, Mike Cherichetti (Renegade Internet) wrote: Doh! My mistake...I am thinking of the variable name *I* use in a script that passes this to CATALINA_OPTS. I am really sorry for that confusion. Have you verified that at the time of the Out of Memory errors that the JVM is somewhere near 896M RAM? How about when it starts up and there is little or no traffic? Is it at or above (probably above) 384M? Since you have free system RAM left, then it sounds like your 896M is too small for the load. Do you load balance Tomcats across machines? Or are you running all these users against one Tomcat? If you could spell out the setup in a bit more detail, I might be able to help you figure it out and possibly how to fix it. Ben Ricker Wellinx, Inc. Are you saying that I should use JAVA_OPTS instead of CATALINA_OPTS? I've set CATALINA_OPTS to use -Xmx896m and -Xms384m already. Problem is, if I raise -Xmx or maxProcessors, I get the OutOfMemoryError and Tomcat stops creating request processors. Thanks, Mike -Original Message- From: Ben Ricker [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 19, 2003 11:18 AM To: Tomcat Users Subject: Re: maxProcessors problem On Mon, 2003-08-18 at 15:42, Mike Cherichetti (Renegade Internet) wrote: java.lang.OutOfMemoryError: JVMCI015:OutOfMemoryError, cannot create anymore threads due to memory or resource constraints There is the cheese right there. You need to WAY up your Java System memory heap using JAVA_OPTS. See this post on the archives: http://mikal.org/interests/java/tomcat/archive/view?mesg=53417. All the available options are in the Java docs. Ben Ricker at java.lang.Thread.start(Native Method) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.init(ThreadPool. java:582) at org.apache.tomcat.util.threads.ThreadPool.openThreads(ThreadPool.java:460) at org.apache.tomcat.util.threads.ThreadPool.runIt(ThreadPool.java:293) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:536) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:619) at java.lang.Thread.run(Thread.java:568) Now, I know that the JVM has plenty of memory left that it can be allocated and the system has plenty of free memory, so I'm not sure it's really a memory issue. As I said, Tomcat still runs and the memory allocated to the JVM increases, it just doesn't have nearly enough request processors created at the point this error happens to deal with all of the traffic. I've tried playing around with ulimit settings, but those didn't have any impact. I've also tried the Sun JVM and it did the same thing. Has anyone run into this problem or something like it before? Any help would be greatly appreciated! Thanks, Mike - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Exception get SSL attributes - SSLPeerUnverifiedException: peer notauthenticated.
Hi there, Since upgrading from Tomcat4.1.24 to 4.1.27 I have been seeing these again in the catalina.out log. I seem to rememeber this being present in a previous build (4.1.13 prehaps). I'm running JDK1.3.1_06 with JSSE extensions. This dosn't seem to be causing any problems - just a 20MB log file per day!! [WARN] Http11Processor - -Exception getting SSL attributes javax.net.ssl.SSLPeerUnverifiedException: peer not authenticatedjavax.net.ssl.SSLPeerUnverifiedException: peer not authenticated at com.sun.net.ssl.internal.ssl.SSLSessionImpl.getPeerCertificateChain(DashoA6275) at org.apache.tomcat.util.net.jsse.JSSESupport.getX509Certificates(JSSESupport.java:113) at org.apache.tomcat.util.net.jsse.JSSESupport.getPeerCertificateChain(JSSESupport.java:161) at org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:748) at org.apache.coyote.Response.action(Response.java:222) at org.apache.coyote.tomcat4.CoyoteAdapter.postParseRequest(CoyoteAdapter.java:321) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:221) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:601) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619) at java.lang.Thread.run(Thread.java:479) Kind Regards, Chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat cannot find subclass
I am having a problem with Tomcat 3.3, running on Solaris 8. I have written a framework for asking questions and getting responses through a browser. The package is called com.stortek.ilm.userresponse. The classes live in a .jar file which resides in $TOMCAT_HOME/lib/apps. One of the classes in that package, ServletSelectAnswerFormatter, generates an HTML select. I get the options by invoking a method designed to be overridden in a subclass. My current project has such a subclass, CountryServletSelectAnswerFormatter, which resides in WEB-INF/classes/com/stortek/ilm/userresponse for the correct context. When the servlet runs, I get a ClassNotFoundException: Class not found: com.stortek.ilm.userresponse.CountrySelectServletAnswerFormat ter Does anyone know what is wrong? Is it possible to subclass part of a framework, and store the subclass and its parent this way? Thank you for any help you can provide. -- Jim McMaster mailto:[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
mod_jk2 load balancing as a RAID 0+1 analog
Hi all, Here is my configuration: Front-ent - Apache 2.0.47/mod_jk2/ajp13. 4 instances of JBoss 3.2.1/Jetty 4.2.11 with identical ear applications are configured as 2 pairs of fail-over clusters with distributable/ webapp. node1+node2 creates a first fail-over cluster. node3+node4 creates a second fail-over cluster. Initial http request can go to any of these 4 nodes. After that mod_jk2 should redirect subsequent requests inside the initial fail-over cluster, and only if both nodes in that cluster fail, try to redirect to another nodes. The problem here is that I do not know is it possible to configure mod_jk2 (workers2.properties) to redirect this way. Any ideas are highly appreciated. Thanks, Vlad - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat cannot find subclass
Have you tried placing your library in WEB-INF/lib? There is probably a classloader issue at work. -Original Message- From: James C. McMaster (Jim) [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 20, 2003 4:23 PM To: [EMAIL PROTECTED] Subject: Tomcat cannot find subclass I am having a problem with Tomcat 3.3, running on Solaris 8. I have written a framework for asking questions and getting responses through a browser. The package is called com.stortek.ilm.userresponse. The classes live in a .jar file which resides in $TOMCAT_HOME/lib/apps. One of the classes in that package, ServletSelectAnswerFormatter, generates an HTML select. I get the options by invoking a method designed to be overridden in a subclass. My current project has such a subclass, CountryServletSelectAnswerFormatter, which resides in WEB-INF/classes/com/stortek/ilm/userresponse for the correct context. When the servlet runs, I get a ClassNotFoundException: Class not found: com.stortek.ilm.userresponse.CountrySelectServletAnswerFormat ter Does anyone know what is wrong? Is it possible to subclass part of a framework, and store the subclass and its parent this way? Thank you for any help you can provide. -- Jim McMaster mailto:[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat cannot find subclass
Yes, the jar was in WEB-INF/lib, and I took it out in case that was a problem. There was no change in the result when I did. I also suspect a ClassLoader issue. What I would like to know is why? When I subclass a member of a framework, do I have to put my project-unique subclass in the same jar as the common classes? If so, that really sucks. -- Jim McMaster mailto:[EMAIL PROTECTED] In message [EMAIL PROTECTED], Mike Curwen said: Have you tried placing your library in WEB-INF/lib? There is probably a classloader issue at work. -Original Message- From: James C. McMaster (Jim) [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 20, 2003 4:23 PM To: [EMAIL PROTECTED] Subject: Tomcat cannot find subclass I am having a problem with Tomcat 3.3, running on Solaris 8. I have written a framework for asking questions and getting responses through a browser. The package is called com.stortek.ilm.userresponse. The classes live in a .jar file which resides in $TOMCAT_HOME/lib/apps. One of the classes in that package, ServletSelectAnswerFormatter, generates an HTML select. I get the options by invoking a method designed to be overridden in a subclass. My current project has such a subclass, CountryServletSelectAnswerFormatter, which resides in WEB-INF/classes/com/stortek/ilm/userresponse for the correct context. When the servlet runs, I get a ClassNotFoundException: Class not found: com.stortek.ilm.userresponse.CountrySelectServletAnswerFormat ter Does anyone know what is wrong? Is it possible to subclass part of a framework, and store the subclass and its parent this way? Thank you for any help you can provide. -- Jim McMaster mailto:[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Installing Tomcat as a Service
On August 20, 2003 10:56 am, Stuart Stephen wrote: Thanks for the reply, I've tried creating a script in the /etc/init.d directory and then running the chkconfig --add script-name and this hasn't worked for me. I'm getting an error saying that: service service-name does not support chkconfig I must still be doing something wrong? The script has the same permissions showing in the ls -l list? It's not about permissions, it's about the format of the script. From the chkconfig man page: - RUNLEVEL FILES Each service which should be manageable by chkconfig needs two or more commented lines added to its init.d script. The first line tells chkconfig what runlevels the service should be started in by default, as well as the start and stop priority levels. If the service should not, by default, be started in any runlevels, a - should be used in place of the runlevels list. The second line contains a description for the service, and may be extended across multiple lines with backslash continuation. For example, random.init has these three lines: # chkconfig: 2345 20 80 # description: Saves and restores system entropy pool for \ # higher quality random number generation. This says that the random script should be started in levels 2, 3, 4, and 5, that its start priority should be 20, and that its stop priority should be 80. You should be able to figure out what the description says; the \ causes the line to be continued. The extra space in front of the line is ignored. - Make sure your script has this line and ALL three numbers are present (read above to figure out what they are): # chkconfig: 2345 20 80 Paul -Original Message- From: Paul Yunusov [mailto:[EMAIL PROTECTED] Sent: 20 August 2003 13:24 To: Tomcat Users List Subject: Re: Installing Tomcat as a Service On August 20, 2003 04:19 am, Stuart Stephen wrote: Hi all, How might I go about installing Tomcat as a service in RedHat 9.0. I've never installed a service under linux manually before and I'm not sure what to do. I can't find the appropriate documentation in the manuals for either Tomcat or RedHat. I must be looking in the wrong places :O( UNRELATED: Also, If I wanted to install a java program as a service, how might I do this? Is this a similar process? Regards, Stuart man chkconfig man serviceconf man init For a Java program, write a wrapper shell script like Tomcat authors did with catalina.sh. Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: That ever-popular 'wrong version:46, expected 45' message
the one in tomcat [EMAIL PROTECTED] 08/20/03 2:07 PM Larry Meadors writes: You have a old version of the tools.jar file. Get rid of it. I checked yesterday after looking through old message on this archive and I don't see how that can be the problem. I have precisely two copies of the tools.jar file, one in my j2sdk1.4.2, and one in my Tomcat4.1.27 directory. Each is 4.85 M, and contains 1373 (or whatever) entries. They are, as far as I can tell, new, current, and entirely identical. If they aren't -- if I have missed some subtle difference -- which one should be consigned to oblivion? Paul Gazis - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tomcat4.1 apache2 jk2 problem
!-- Server Configuration File for Tomcat 4.0 on Debian You can find more complete examples in /usr/share/doc/tomcat4/examples/. -- !-- A Server is a singleton element that represents the entire JVM, which may contain one or more Service instances. The Server listens for a shutdown command on the indicated port. Note: A Server is not itself a Container, so you may not define subcomponents such as Valves or Loggers at this level. -- Server port=8005 shutdown=SHUTDOWN debug=0 !-- A Service is a collection of one or more Connectors that share a single Container (and therefore the web applications visible within that Container). Normally, that Container is an Engine, but this is not required. Note: A Service is not itself a Container, so you may not define subcomponents such as Valves or Loggers at this level. -- !-- Define the Tomcat Stand-Alone Service -- Service name=Tomcat-Standalone !-- A Connector represents an endpoint by which requests are received and responses are returned. Each Connector passes requests on to the associated Container (normally an Engine) for processing. By default, a non-SSL HTTP/1.1 Connector is established on port 8180. You can also enable an SSL HTTP/1.1 Connector on port 8443 by following the instructions below and uncommenting the second Connector entry. SSL support requires the following steps (see the SSL Config HOWTO in the Tomcat 4.0 documentation bundle for more detailed instructions): * Download and install JSSE 1.0.2 or later, and put the JAR files into $JAVA_HOME/jre/lib/ext. * Execute: $JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA with a password value of changeit for both the certificate and the keystore itself. By default, DNS lookups are enabled when a web application calls request.getRemoteHost(). This can have an adverse impact on performance, so you can disable it by setting the enableLookups attribute to false. When DNS lookups are disabled, request.getRemoteHost() will return the String version of the IP address of the remote client. -- !-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 -- Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=8009 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8443 acceptCount=10 debug=0 connectionTimeout=0 useURIValidationHack=false protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler/ Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=8180 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8443 acceptCount=10 debug=0 connectionTimeout=2/ !-- Note : To disable connection timeouts, set connectionTimeout value to -1 -- !-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8180 -- !-- Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=8180 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8443 acceptCount=10 debug=0 connectionTimeout=2/ -- !-- Define an SSL HTTP/1.1 Connector on port 8443 -- !-- Connector className=org.apache.catalina.connector.http.HttpConnector port=8443 minProcessors=5 maxProcessors=75 enableLookups=true acceptCount=10 debug=0 scheme=https secure=true Factory className=org.apache.catalina.net.SSLServerSocketFactory clientAuth=false protocol=TLS/ /Connector -- !-- Define an AJP 1.3 Connector on port 8009 -- !-- Debian specific note: If you enable this connector you must disable it in the tomcat (Tomcat 3.x) package. The package for the Apache connector module is libapache-mod-jk -- !-- Connector className=org.apache.ajp.tomcat4.Ajp13Connector port=8009 minProcessors=5 maxProcessors=75 acceptCount=10 debug=0 address=127.0.0.1/ -- !-- Define a Proxied HTTP/1.1 Connector on port 8081 -- !-- See proxy documentation for more information about using this. -- !-- Connector className=org.apache.catalina.connector.http.HttpConnector port=8082 minProcessors=5 maxProcessors=75 enableLookups=true acceptCount=10 debug=0 connectionTimeout=6 proxyPort=80/ -- !-- Define a non-SSL HTTP/1.0 Test Connector on port 8082 -- !-- Connector className=org.apache.catalina.connector.http10.HttpConnector port=8083 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8443 acceptCount=10 debug=0/ -- !-- An Engine
RE: CVS with tomcat
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/manager-howto.html#Executing%20Manager%20Commands%20With%20Ant -Original Message- From: SuniX [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 20, 2003 1:37 PM To: Tomcat Users List Subject: Re: CVS with tomcat Thank you Can you give an example of ant source whick reload and deploy to a tomcat server? It can help me. Thanks Paul Sundling wrote: I'm not sure why you'd want to have it deployed automatically. You can probably do it with ant and cruise control? With ant, you can create targets that reload your app or deploy it to a tomcat server. That's what I do currently and it even integrates well with eclipse! If you really want to do it automatically I heard cruise control does that sort of functionality, but I'm not sure about having it look for changes in CVS. SuniX wrote: Hi Is there a way to use CVS with tomcat ? i want my tomcat server to check a cvs project and deployed it automaticaly. (cvs server and tomcat server in the same machine running on a debian testing) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat cannot find subclass
One of the classes in that package, ServletSelectAnswerFormatter, generates an HTML select. I get the options by invoking a method designed to be overridden in a subclass. My current project has such a subclass, CountryServletSelectAnswerFormatter, which resides in WEB-INF/classes/com/stortek/ilm/userresponse for the correct context. When the servlet runs, I get a ClassNotFoundException: Class not found: com.stortek.ilm.userresponse.CountrySelectServletAnswerFormat ter Is this mistyped? Above, you have CountrySelectServlet... not found, but you say it's actually called CountryServletSelect... (Servlet and Select are swapped), so it's right that it not be found. -- Pablo Mayrgundter Director of Applications and Services www.reeltwo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Quickly get Tomcat running with Apache on Solaris?
What's your CATALINA_HOME set to? Did you use GNU Tar to unpack it? (Solaris default tar will likely muck up the extract) -Original Message- From: Jim Chase [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 20, 2003 4:14 PM To: [EMAIL PROTECTED] Subject: Quickly get Tomcat running with Apache on Solaris? Solaris 9 has Apache and Tomcat loaded by default. I got Apache running but Tomcat needed more work. So I tried to download it from Jakarta at: http://apache.oregonstate.edu/jakarta/tomcat-4/binaries/ I gunzipped it and un-tarred it. Then I did what it said to do in the docs... * Unpack the binary distribution into a convenient location so that the distribution resides in its own directory (conventionally named jakarta-tomcat-4.0). For the purposes of the remainder of this document, the symbolic name ${catalina.home} is used to refer to the full pathname of the release directory. (2) Start Up Tomcat 4.0 There are two techniques by which Tomcat 4.0 can be started: * Via an environment variable: - Set an environment variable CATALINA_HOME to the path of the directory into which you have installed Tomcat 4.0. - Execute the shell command: %CATALINA_HOME%\bin\startup (Windows) $CATALINA_HOME/bin/startup.sh (Unix) * By modifying your current working directory: - Execute the following shell commands: cd %CATALINA_HOME%\bin (Windows) startup (Windows) cd $CATALINA_HOME/bin (Unix) ./startup.sh(Unix) NOW - It won't run. I'm not even sure it was a Solaris Binary. This is what I get in the catalina.out file: $ cat catalina.out Exception in thread main java.lang.NoClassDefFoundError: org/apache/catalina/startup/Bootstrap Whats the easiest way to get Tomcat running with Apache on Solaris 9? Thanks! __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Starting tomcat from init scripts (HP/UX)
1 - You classpath is probably wrong - it should be tiny to allow dynamic classloading so classes may be reloaded 2 - Try using startup.sh, here is an easy way: cd /bto/appl/apache/jakarta-tomcat-4.0.4 bin/startup.sh instead of catalina.sh. 3 - Temporarily - hack the startup scripts to print crap to standard out so you can trap the error messages for more information 4 - There should be error messages somewhere - but do the above since they can't seem to be found -Tim Lott, Carey wrote: Since nobody has responded does this mean nobody has any more ideas on the problem or am I getting the You idiot. The answer is staring you in the face. silent treatment? If it is the latter, I will admit being an idiot if someone will enlighten me. If it is the former, I want to say thank you for the help I have received to this point because I am farther along then I was, and if I figure out a solution short of a cron entry I'll post it. Thanks again for the help. Carey -Original Message- From: Lott, Carey Sent: Friday, August 15, 2003 11:18 AM To: 'Tomcat Users List' Subject: RE: Starting tomcat from init scripts (HP/UX) Ok, I finally got the script to execute correctly and I got the familiar output: Using CATALINA_BASE: /bto/appl/apache/jakarta-tomcat-4.0.4 Using CATALINA_HOME: /bto/appl/apache/jakarta-tomcat-4.0.4 Using CATALINA_TMPDIR: /bto/appl/apache/jakarta-tomcat-4.0.4/temp Using JAVA_HOME: /opt/java1.4 But tomcat still isn't starting, and I am not receiving any other errors. Also the script executes fine when I do it from command line. I have placed the start/stop script in /sbin/init.d/. I have made the script be last to start and first to stop. I couldn't get the script to recognize the env variables when they were in the rc.config.d directory, so I placed them directly in the script which seems to have worked, but the process still isn't starting. Can anybody give me any other ideas as to what could be wrong or what I could try? Any ideas how I can get a better error information? Below is the start/stop script - /sbin/init.d/tomcat. Can you see anything missing? Thanks in advance for everybody's input and help. #!/sbin/sh # Start/Stop for Tomcat Java Servlet Container # PATH=/sbin:/usr/sbin:/usr/bin export PATH ## Source global configuration file ##. /etc/rc.config # Needed variables CATALINA_HOME=/bto/appl/apache/jakarta-tomcat-4.0.4 export CATALINA_HOME JAVA_HOME=/opt/java1.4 export JAVA_HOME CLASSPATH=/bto/appl/apache/jakarta-tomcat-4.0.4/common/lib/servlet.jar:/opt/ java1.4/jre/lib/rt.jar:/opt/java1.4/lib/tools.jar:/opt/java1.4/lib/dt.jar:/o pt/java1.4/lib/htmlconverter.jar:/opt/java1.4/jre/lib/charsets.jar:/opt/java 1.4/jre/lib/javaplugin.jar:/opt/java1.4/jre/lib/ext/dnsns.jar:/opt/java1.4/j re/lib/ext/localedata.jar:/opt/java1.4/jre/lib/ext/ldapsec.jar:/opt/java1.4/ jre/lib/jce.jar:/opt/java1.4/jre/lib/jsse.jar:.:/bto/appl/apache/jakarta-tom cat-4.0.4/webapps/esd/WEB-INF/classes:/bto/appl/apache/jakarta-tomcat-4.0.4/ webapps/esd/WEB-INF/lib:/bto/appl/apache/htdocs/esd/java:/bto/sys/oracle/pro duct/8.0.6/jdbc/lib/classes111.zip export CLASSPATH case $1 in start_msg) echo Starting Tomcat ;; 'start') /bto/appl/apache/jakarta-tomcat-4.0.4/bin/catalina.sh start /bto/appl/apache/jakarta-tomcat-4.0.4/logs/bootlogstart.txt 21 ;; stop_msg) echo Stopping Tomcat ;; 'stop') /bto/appl/apache/jakarta-tomcat-4.0.4/bin/catalina.sh stop /bto/appl/apache/jakarta-tomcat-4.0.4/logs/bootlogstop.txt 21 ;; esac exit 0; signature nameCarey Lott/name posWeb Tools Support/pos orgInfrastructure Storage Tools Support/org companyEDS/company accountBellSouth/account phone404-529-6676/phone email[EMAIL PROTECTED]/email ipager[EMAIL PROTECTED]/ipager /signature disclaimer * The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers. /disclaimer -Original Message- From: Morgan Pyne [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 3:54 AM To: Tomcat Users List Subject: RE: Starting tomcat from init scripts (HP/UX) Have a look at /usr/share/doc/start_up.txt or /usr/share/doc/start_up.ps on a HP-UX 11.00 machine for details of how to write a startup script conforming to HP-UX's standards (for issuing messages at startup and shutdown via the 'start_msg' and 'stop_msg' parameters, honouring the settings in /etc/rc.config.d etc...). You can use any of the scripts in /sbin/init.d as a basis - modify one as
Re: tomcat4.1 apache2 jk2 problem
Pieter Laeremans [EMAIL PROTECTED] writes: Ok, my jk2.properties and worker.properties files did get stripped here is there contents: jk2.properties __ # list of needed handlers. handler.list=apr,channelSocket,channelUnix,request # Set the default port for the channelSocket channelSocket.port=8009 # State where the UNIX domain socket is located channelUnix.file=/usr/share/tomcat4/work/jk2.socket # Dynamic library #serverRoot=/usr/local/apache2 #apr.NativeSo=/usr/local/tomcat/lib/libjkjni.so /etc/apache2/conf/workers2.properties _ # Shared memory handling. Needs to be set. [shm] file=/tmp/shm.file #size=1048576 size=104 # Example socket channel, explicitly set port and host. [channel.socket:localhost:8009] port=8009 host=127.0.0.1 # Example UNIX domain socket [channel.un:/usr/share/tomcat4/work/jk2.socket] tomcatId=localhost:8009 debug=0 # define the worker [ajp13:localhost:8009] channel=channel.un:/usr/share/tomcat4/work/jk2.socket # To use the TCP/IP socket instead, just comment out the above # line, and uncomment the one below #channel=channel.socket:localhost:8009 # Announce a status worker [status:status] # Uri mapping [uri:/examples/*] #worker=ajp13:localhost:8009 worker=ajp13:/usr/share/tomcat4/work/jk2.socket [uri:/status/*] worker=status:status [uri:/tomcat-docs/*] #worker=ajp13:localhost:8009 worker=ajp13:/usr/share/tomcat4/work/jk2.socket - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat cannot find subclass
Unlike Tomcat 4, Tomcat 3 uses a delegating ClassLoader. This means that jars in lib/apps can't see classes in WEB-INF/classes. Also, as long as the jar is in lib/apps, Tomcat 3 will load classes from there in preference to the same jar in WEB-INF/lib. James C. McMaster (Jim) [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Yes, the jar was in WEB-INF/lib, and I took it out in case that was a problem. There was no change in the result when I did. I also suspect a ClassLoader issue. What I would like to know is why? When I subclass a member of a framework, do I have to put my project-unique subclass in the same jar as the common classes? If so, that really sucks. -- Jim McMaster mailto:[EMAIL PROTECTED] In message [EMAIL PROTECTED], Mike Curwen said: Have you tried placing your library in WEB-INF/lib? There is probably a classloader issue at work. -Original Message- From: James C. McMaster (Jim) [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 20, 2003 4:23 PM To: [EMAIL PROTECTED] Subject: Tomcat cannot find subclass I am having a problem with Tomcat 3.3, running on Solaris 8. I have written a framework for asking questions and getting responses through a browser. The package is called com.stortek.ilm.userresponse. The classes live in a .jar file which resides in $TOMCAT_HOME/lib/apps. One of the classes in that package, ServletSelectAnswerFormatter, generates an HTML select. I get the options by invoking a method designed to be overridden in a subclass. My current project has such a subclass, CountryServletSelectAnswerFormatter, which resides in WEB-INF/classes/com/stortek/ilm/userresponse for the correct context. When the servlet runs, I get a ClassNotFoundException: Class not found: com.stortek.ilm.userresponse.CountrySelectServletAnswerFormat ter Does anyone know what is wrong? Is it possible to subclass part of a framework, and store the subclass and its parent this way? Thank you for any help you can provide. -- Jim McMaster mailto:[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem, can't get response form tomcat after some requests
Hi All, I have installed tomcat4.1.27, apache2.0.47, modjk2.02, and j2se1.4.2 on Linux 9. I have compiled Apache, mod_jk2 from the source. After several requests from JMeter, tomcat simply holds up, no more requests can be processed by tomcat. I can't stop tomcat unless I kill the tomcat process. I have restarted apache, it doesn't help. I found some CLOSE_WAIT after I restart apache. I have killed tomcat, all CLOSE_WAITs are gone. Same thing is repeating again and again after I start tomcat. I can't figure out the problem. I have posted my configuration here. Can any one find where I am doing mistake? I am straggling since few days. Help would be appreciated. Thanks in advance. Regards, Srinivas workers.properties # only at beginnin. In production uncomment it out [logger.apache2] level=DEBUG [uriMap:] info=Maps the requests. Options: debug debug=0 [config:] file=${serverRoot}/conf/workers2.properties debug=0 debugEnv=0 #[shm] f#ile=${serverRoot}/logs/jk2.shm #size=1048576 #debug=0 #disabled=0 [lb:lb-gipalbum] info=GIPALBUM load balancer. debug=0 [lb:lb-ext] info=EXT load balancer. debug=0 # define the GIPALBUM worker [channel.socket:192.168.1.211:8091] info=Ajp13 forwarding over socket to GIPALBUM debug=0 tomcatId=gipablum-tc lb_factor=1 group=lb-gipalbum disabled=0 # define the EXT worker [channel.socket:192.168.1.211:8092] info=Ajp13 forwarding over socket to EXT debug=0 tomcatId=ext-tc lb_factor=1 group=lb-ext disabled=0 # define the status worker [status:] info=Status worker, displays runtime informations # Uri mapping for status worker [uri:/jkstatus/*] info=Display status information and checks the config file for changes. group=status: # Uri mapping [uri:/admin/*.jsp] info=admin project context=/admin group=lb-gipalbum debug=0 # Uri mapping [uri:/admin/*.do] info=admin project context=/admin group=lb-gipalbum debug=0 # Uri mapping [uri:/manager/*] info=manager project context=/manager group=lb-ext debug=0 # Uri mapping [uri:/*.jsp] info=default jsp project context=/ group=lb-ext debug=0 [uri:/*.do] info=default struts project context=/ group=lb-ext debug=0 [uri:/moto/*.osp] info=moto osp project context=/moto group=lb-ext debug=0 [uri:/moto/*.ost] info=moto ost project context=/moto group=lb-ext debug=0 -- end workers.properties server.xml - !-- Example Server Configuration File -- !-- Note that component elements are nested corresponding to their parent-child relationships with each other -- !-- A Server is a singleton element that represents the entire JVM, which may contain one or more Service instances. The Server listens for a shutdown command on the indicated port. Note: A Server is not itself a Container, so you may not define subcomponents such as Valves or Loggers at this level. -- Server port=8052 shutdown=SHUTDOWN debug=0 !-- Comment these entries out to disable JMX MBeans support -- !-- You may also configure custom components (e.g. Valves/Realms) by including your own mbean-descriptor file(s), and setting the descriptors attribute to point to a ';' seperated list of paths (in the ClassLoader sense) of files to add to the default list. e.g. descriptors=/com/myfirm/mypackage/mbean-descriptor.xml -- Listener className=org.apache.catalina.mbeans.ServerLifecycleListener debug=0/ Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener debug=0/ !-- Global JNDI resources -- GlobalNamingResources !-- Test entry for demonstration purposes -- Environment name=simpleValue type=java.lang.Integer value=30/ !-- Editable user database that can also be used by UserDatabaseRealm to authenticate users -- Resource name=UserDatabase auth=Container type=org.apache.catalina.UserDatabase description=User database that can be updated and saved /Resource ResourceParams name=UserDatabase parameter namefactory/name valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value /parameter parameter namepathname/name valueconf/tomcat-users.xml/value /parameter /ResourceParams /GlobalNamingResources !-- A Service is a collection of one or more Connectors that share a single Container (and therefore the web applications visible within that Container). Normally, that Container is an Engine, but this is not required. Note: A Service is not itself a Container, so you may not define subcomponents such as Valves or Loggers at this level. -- !-- Define the Tomcat Stand-Alone Service -- Service name=Tomcat-Standalone !-- A Connector represents an endpoint by which requests are received and responses are
Tomcat 4.1 DefaultContext Bug?
I have spent the last three days trying everything to move from 4.0 to 4.1. The problem is with the datasources. When the resource is in a specific Context everything works, but when its in the DefaultContext I am getting a java.sql.SQLException: Cannot load JDBC driver class 'null' The server.xml has a resource defined: Resource name=jdbc/foo auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/foo parameternameuser/namevaluefoo/value/parameter parameternamepassword/namevaluebar/value/parameter parameternamedriverClassName/name valueorg.postgresql.Driver/value/parameter parameternameurl/name valuejdbc:postgresql://localhost/foo/value/parameter /ResourceParams My web.xml now has: resource-ref descriptionFoo Database/description res-ref-namejdbc/foo/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref The driver is there - since I it works when the Context is specific. The problem however is that a Context that is specified will block unpacking of a war. There are some issues with using the war directly without unpacking - so I need to define the datasource in the DefaultContext. However this isn't working. Simply changing from DefaultContext to Context solves the problem - proving that it is the DefaultContext which doesn't appear to work. Help :) Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 4.1 DefaultContext Bug?
Specifically what problems do you have when running the app as a war file ? Peter Harrison wrote: I have spent the last three days trying everything to move from 4.0 to 4.1. The problem is with the datasources. When the resource is in a specific Context everything works, but when its in the DefaultContext I am getting a java.sql.SQLException: Cannot load JDBC driver class 'null' The server.xml has a resource defined: Resource name=jdbc/foo auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/foo parameternameuser/namevaluefoo/value/parameter parameternamepassword/namevaluebar/value/parameter parameternamedriverClassName/name valueorg.postgresql.Driver/value/parameter parameternameurl/name valuejdbc:postgresql://localhost/foo/value/parameter /ResourceParams My web.xml now has: resource-ref descriptionFoo Database/description res-ref-namejdbc/foo/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref The driver is there - since I it works when the Context is specific. The problem however is that a Context that is specified will block unpacking of a war. There are some issues with using the war directly without unpacking - so I need to define the datasource in the DefaultContext. However this isn't working. Simply changing from DefaultContext to Context solves the problem - proving that it is the DefaultContext which doesn't appear to work. Help :) Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Server.xml
Hi, We are using tomcat 4.1.24. The server.xml has configuration for http and https. Now if user wants to disable http and use only https, is there a way to do that in server.xml. One way is to comment the config of http is server.xml But we don't want to pursure in this direction. Is there any property we can set in server.xml to disable htpp or https based on user preferece. Please help me on this. Thanks Much in Advance, Sarika - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
classpath issues and system properties
Hi, I am using tomcat 4.1.24. I have a couple of questions. 1. Online documentation about class loader says, System class loader operates on CLASSPATH. I have included j2ee.jar in my CLASSPATH, but tomcat is not picking it up. Why is it so? 2. When I use tomcat, system property java.naming.factory.initial is initialized to org.apache.naming.java.javaURLContextFactory. Where did the system pick this property from? How can I override this setting? I initialized JNDI context with environment having java.naming.factory.initial as com.sun.enterprise.naming.SerialInitContextFactory but ultimately org.apache.naming.java.javaURLContextFactory is set to java.naming.factory.initial. How can I avoid this? I would appreciate if anybody can help me with these issues. I am really struggling for a week. tia, Srinivas = I am not afraid of losing. But I don't like it. __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Installing Tomcat as a Service
I use the following script on RedHat 7.3 (I save this as /etc/rc.d/init.d/tomcat): #!/bin/bash # # Startup script for the Tomcat Web Server # # chkconfig: 345 84 16 # description: Tomcat is a World Wide Web server. It is used to serve \ # HTML, JSP, and servlets, and CGI if needed. # processname: java case $1 in start) $CATALINA_HOME/bin/startup.sh ;; stop) $CATALINA_HOME/bin/shutdown.sh ;; *) echo $Usage: tomcat {start|stop} exit 1 esac exit 0 I then do the following with chkconfig: chkconfig --add tomcat chkconfig --level 345 tomcat on chkconfig --list tomcat If that still doesn't work, ensure that you've set CATALINA_HOME and JAVA_HOME in /etc/profile. Hope that helps, Mike -Original Message- From: Stuart Stephen [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 20, 2003 10:57 AM To: Tomcat Users List Subject: RE: Installing Tomcat as a Service Thanks for the reply, I've tried creating a script in the /etc/init.d directory and then running the chkconfig --add script-name and this hasn't worked for me. I'm getting an error saying that: service service-name does not support chkconfig I must still be doing something wrong? The script has the same permissions showing in the ls -l list? -Original Message- From: Paul Yunusov [mailto:[EMAIL PROTECTED] Sent: 20 August 2003 13:24 To: Tomcat Users List Subject: Re: Installing Tomcat as a Service On August 20, 2003 04:19 am, Stuart Stephen wrote: Hi all, How might I go about installing Tomcat as a service in RedHat 9.0. I've never installed a service under linux manually before and I'm not sure what to do. I can't find the appropriate documentation in the manuals for either Tomcat or RedHat. I must be looking in the wrong places :O( UNRELATED: Also, If I wanted to install a java program as a service, how might I do this? Is this a similar process? Regards, Stuart man chkconfig man serviceconf man init For a Java program, write a wrapper shell script like Tomcat authors did with catalina.sh. Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 5.0.7 Host default Context docBase
Hi Trying to run a Tomcat 4.1.24 web app using Tomcat 5.0.7. Host and context parameters : Host name=edevis debug=0 appBase=c:/edevis unpackWARs=true autoDeploy=true Valve className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=edevis_access_log.suffix=.txt pattern=common resolveHosts=false/ Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=edevis_log. suffix=.txt timestamp=true/ Context path= docBase=c:/edevis reloadable=true workDir=c:/edevis/work/org/apache/jsp/ /Host Whatever I put in this virtual host default context docBase (c:/edevis, or .) , when I start tomcat, I get : 20 août 2003 17:28:30 org.apache.commons.digester.Digester startElement GRAVE: Begin event threw exception java.io.IOException: Syntaxe du nom de fichier, de répertoire ou de volume incorrecte at java.io.WinNTFileSystem.canonicalize0(Native Method) at java.io.Win32FileSystem.canonicalize(Win32FileSystem.java:352) at java.io.File.getCanonicalPath(File.java:513) at java.io.File.getCanonicalFile(File.java:534) at org.apache.catalina.startup.SetDocBaseRule.begin(SetDocBaseRule.java:137) at org.apache.commons.digester.Rule.begin(Rule.java:200) at org.apache.commons.digester.Digester.startElement(Digester.java:1273) at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source) at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.commons.digester.Digester.parse(Digester.java:1548) at org.apache.catalina.startup.Catalina.load(Catalina.java:512) at org.apache.catalina.startup.Catalina.load(Catalina.java:550) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:260) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:393) and tomcat doesn't want to start If i suppress Context path= docBase=c:/edevis . , I don't have any error, but the web app doesn't run. The jakarta docs don't show any difference about virtual hosts and default contexts between 4.1.x and 5.0.x Dom
RE: Tomcat 5.0.7 Host default Context docBase
Looks like it is complaining about the path. Have you tried using C:\edevis instead of C:/edevis for your appBase and docBase? -Original Message- From: Dominique Batard [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 20, 2003 8:45 AM To: Tomcat Users List Subject: Tomcat 5.0.7 Host default Context docBase Hi Trying to run a Tomcat 4.1.24 web app using Tomcat 5.0.7. Host and context parameters : Host name=edevis debug=0 appBase=c:/edevis unpackWARs=true autoDeploy=true Valve className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=edevis_access_log.suffix=.txt pattern=common resolveHosts=false/ Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=edevis_log. suffix=.txt timestamp=true/ Context path= docBase=c:/edevis reloadable=true workDir=c:/edevis/work/org/apache/jsp/ /Host Whatever I put in this virtual host default context docBase (c:/edevis, or .) , when I start tomcat, I get : 20 août 2003 17:28:30 org.apache.commons.digester.Digester startElement GRAVE: Begin event threw exception java.io.IOException: Syntaxe du nom de fichier, de répertoire ou de volume incorrecte at java.io.WinNTFileSystem.canonicalize0(Native Method) at java.io.Win32FileSystem.canonicalize(Win32FileSystem.java:352) at java.io.File.getCanonicalPath(File.java:513) at java.io.File.getCanonicalFile(File.java:534) at org.apache.catalina.startup.SetDocBaseRule.begin(SetDocBaseRule.java:137) at org.apache.commons.digester.Rule.begin(Rule.java:200) at org.apache.commons.digester.Digester.startElement(Digester.java:1273) at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source) at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unkno wn Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatc her.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.commons.digester.Digester.parse(Digester.java:1548) at org.apache.catalina.startup.Catalina.load(Catalina.java:512) at org.apache.catalina.startup.Catalina.load(Catalina.java:550) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:260) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:393) and tomcat doesn't want to start If i suppress Context path= docBase=c:/edevis . , I don't have any error, but the web app doesn't run. The jakarta docs don't show any difference about virtual hosts and default contexts between 4.1.x and 5.0.x Dom - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Error when I start Jakarta-tomcat(Cont) - Error when I load file
Hi all, Thanks for your advices. The error is that files startup.sh and shutdown.sh are not executable. Now I can start Tomcat. But I meet the following problem: - I use the mysql supported already by Redhat Linux 7.3 O/S to store my database. - The jakarta-tomcat-3.2.4 is used to be the server. - I use mysql-connector-java-3.0.6-stable-bin.jar for connection between mysql and JSP. - I put the my web application in the directory: jakarta-tomcat-3.2.4/webapps/myapp. - I put the mysql-connector-java-3.0.6-stable-bin.jar in directories: jakarta-tomcat-3.2.4/lib, and jakarta-tomcat-3.2.4/webapps/myapp/WEB-INF/lib - I create a properties file (myprop.prop contains DBURL, DBUserName, DBPassword, and DBDriver) and put it at directories: jakarta-tomcat-3.2.4/bin, and jakarta-tomcat-3.2.4/conf. After I start mysqlserver and tomcat, I type on the Mozilla browse: http://localhost:8080/myapp, the browser display my web page. When I link to a URL that call the JSP program: import java.io.FileInputStream; import java.io.IOException; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.util.Enumeration; import java.util.Properties; public class MyData { private Connection connection; private Statement statement; public MyData() throws ClassNotFoundException,SQLException{ String DBDriver=null; String url=null; String username=null; String password=null; Properties props = new Properties(); String pFile=myprop.prop; try { props.load(new FileInputStream(pFile)); } catch(IOException e) { System.err.println(Failed to load property file); } ... I get the following massage Failed to load property file. Please help me! Thank you very much. LuongPhan --- Bill Barker [EMAIL PROTECTED] wrote: Correct. You need to do 'ls -lL /bin/sh' to be sure. However, if the link is there, I'd guess that what it links to is probably there. More likely, Tomcat's 'startup.sh' script isn't executable (e.g. you used the .zip download, or copied from a Windows machine). victor pereira [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] (lrwxrwxrwx). -- that makes it a symbolic link i believe but if the file the sym link is pointing to is not executeable you wont be able to excute Cheers Vic - Original Message - From: Luong Phan [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, August 19, 2003 9:52 PM Subject: Re: Error when I start Jakarta-tomcat(Cont) Hi all, The file /bin/sh exists, and is executable (lrwxrwxrwx). I still get the error massage when I start jakarta-tomcat. Please help me! LuongPhan --- Reinhard Moosauer [EMAIL PROTECTED] wrote: Hello, seems like /bin/sh does not exist. I saw the same problem in another mail today. Please check if /bin/sh exists and is executable. It really should! regards, Reinhard Am Dienstag, 19. August 2003 11:05 schrieb Luong Phan: Hi all, I am having problem starting TOMCAT, I installed j2sdk1.4.2 and jakarta-tomcat-3.2.4 on the Redhat Linux 7.3. Those two directories are located at the /usr/java. I set the envoroment variables in the /.bash_profile as the following: JAVA_HOME=/usr/java/j2sdk1.4.2 TOMCAT_HOME=/usr/java/jakarta-tomcat-3.2.4 CLASSPATH=$JAVA_HOME/lib/tools.jar:$TOMCAT_HOME/lib/servlet.jar export JAVA_HOME TOMECAT_HOME CLASSPATH Every time I try [EMAIL PROTECTED] root]# $TOMCAT_HOME/bin/startup.sh I get the massage: bash:/usr/java/jakarta-tomcat-3.2.4/bin/startup.sh:/bin/sh bad interpreter: Permision denied Please help me! LuongPhan __ Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo. http://search.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo. http://search.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Exception get SSL attributes - SSLPeerUnverifiedException: peer not authenticated.
I just ported the patch from the j-t-c HEAD. Yes, the error is harmless (except for the disk space it takes up :). TC 4.1.28 should be quieter. If you need it sooner, then you can grab it from the CVS and re-compile. Chris Massam [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi there, Since upgrading from Tomcat4.1.24 to 4.1.27 I have been seeing these again in the catalina.out log. I seem to rememeber this being present in a previous build (4.1.13 prehaps). I'm running JDK1.3.1_06 with JSSE extensions. This dosn't seem to be causing any problems - just a 20MB log file per day!! [WARN] Http11Processor - -Exception getting SSL attributes javax.net.ssl.SSLPeerUnverifiedException: peer not authenticatedjavax.net.ssl.SSLPeerUnverifiedException: peer not authenticated at com.sun.net.ssl.internal.ssl.SSLSessionImpl.getPeerCertificateChain(DashoA62 75) at org.apache.tomcat.util.net.jsse.JSSESupport.getX509Certificates(JSSESupport. java:113) at org.apache.tomcat.util.net.jsse.JSSESupport.getPeerCertificateChain(JSSESupp ort.java:161) at org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:748) at org.apache.coyote.Response.action(Response.java:222) at org.apache.coyote.tomcat4.CoyoteAdapter.postParseRequest(CoyoteAdapter.java: 321) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:221) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:601) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne ction(Http11Protocol.java:392) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:619) at java.lang.Thread.run(Thread.java:479) Kind Regards, Chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: maxProcessors problem
Not true. They will be reclaimed when possible according to the selected GC algorithm Aha, are there actually different reclamation algorithms that I can select from ?? I mean, like some parameter in catalina.sh ?? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]