Re: Tomcat error: It is not available the ServletAction
Christopher Schultz-2 wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chuck, On 4/1/2009 11:45 AM, Caldarale, Charles R wrote: From: bladu [mailto:ego...@hotmail.com] Subject: Re: Tomcat error: It is not available the ServletAction I have correct some bugs in the struts-config.xml (references to classes that don`t exist), but the problem still remains. The error message generated by struts shows a *parsing* error - meaning you likely have something wrong with the syntax of your struts config rather than the values of any fields. Try running that XML file through a syntax checker to see if you can find it. Some Struts users have reported the following causes to this problem: 1. An actual XML parsing error 2. Java version mismatch 3. xerces.jar version mismatch or overlap What version of Java are you running? Do you have xerces.jar in your webapp's lib directory? What version of Tomcat are you using? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknT0n4ACgkQ9CaO5/Lv0PB0PQCgsB4liiFvjm+FL7APhBAnxYAW k+wAn3EQluZ1WdeEDF3bnxr6+++9gEV4 =k7yc -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org Hi, Version of Java ---jdk1.5.0_17 Do you have xerces.jar in your webapp's lib directory? ---Yes, int he application deployed and also in the WAR I have xerces-1.2.3.jar What version of Tomcat are you using? ---jakarta-tomcat-5.0.28 Regards -- View this message in context: http://www.nabble.com/Tomcat-error%3A-It-is-not-available-the-ServletAction-tp22805251p22841693.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat error: It is not available the ServletAction
Christopher Schultz-2 wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chuck, On 4/1/2009 11:45 AM, Caldarale, Charles R wrote: From: bladu [mailto:ego...@hotmail.com] Subject: Re: Tomcat error: It is not available the ServletAction I have correct some bugs in the struts-config.xml (references to classes that don`t exist), but the problem still remains. The error message generated by struts shows a *parsing* error - meaning you likely have something wrong with the syntax of your struts config rather than the values of any fields. Try running that XML file through a syntax checker to see if you can find it. Some Struts users have reported the following causes to this problem: 1. An actual XML parsing error 2. Java version mismatch 3. xerces.jar version mismatch or overlap What version of Java are you running? Do you have xerces.jar in your webapp's lib directory? What version of Tomcat are you using? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknT0n4ACgkQ9CaO5/Lv0PB0PQCgsB4liiFvjm+FL7APhBAnxYAW k+wAn3EQluZ1WdeEDF3bnxr6+++9gEV4 =k7yc -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org Hi, Version of Java ---jdk1.5.0_17 Do you have xerces.jar in your webapp's lib directory? ---Yes, int he application deployed and also in the WAR I have xerces-1.2.3.jar What version of Tomcat are you using? ---jakarta-tomcat-5.0.28 Regards -- View this message in context: http://www.nabble.com/Tomcat-error%3A-It-is-not-available-the-ServletAction-tp22805251p22841851.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
How to configure SSL for particular application
Hi Friends, I configured SSL(https) in server.xml , and i have three applications in my tomcat and now my problem is i need to access only application through https and remaining through http protocol,but here three application are accessible by https protocol. So please help me how to configure to particular application for SSL. Ex: I deleployed A,B,C applications in tomcat. in need to access only application A through https, and remaining applications should be restrict (i.e., remaining should be through http protocl). Thanks and Regards -- Siva -- View this message in context: http://www.nabble.com/How-to-configure-SSL-for-particular-application-tp22844749p22844749.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
IPv6 configuration for tomcat 6
Hi, How do we configure tomcat on IPv6 machine? What changes need to be done? What are the exact changes in server.xml file? (where and in which format the ipv6 ip should be specified?) we are using tomcat 6.0.18 Thanks, Tomcat user !
Re: CPU usage with APR and connectionTimeout impact
Funny, according to the documentation there exists no connectionTimeout attribute for the apr connector. Setting the value to '0' could mean all sorts of behavior, no way to know for sure short of checking the code. (it could mean the connector will not wait for the uri line at all) I can't comment about a correct value for your application. Setting it to a low value will have the connector thread return to the pool faster on connections where the peer has gone to lunch after the initial connection. This only matters if you have a large number of such peers. I'm sure one of the veterans here can clear this up for you. Hello, In my project, we are using Tomcat 6.0.18, with APR 1.2.12 and tc native 1.1.14 on an Redhat OS (Linux kernel 2.6.18). There is a behavior that I can't explain: -with connectionTimeout=0, the process tomcat uses a huge percentage of CPU, even if there is no traffic. but we doesn't observe any problem and the response time is good. -with connectionTimeout=5000, the process tomcat uses a normal percentage of CPU, when there is no traffic. -without APR and with connectionTimeout=0, the process tomcat uses a normal percentage of CPU when there is no traffic. After different searches on the web, tomcat manual and mailing lists, I don't find the reason of the link between CPU usage and connectionTimeout/keepAliveTimeout with APR. With the previous release of Tomcat (5.5) and APR, we have a similar CPU usage (without traffic, high CPU load) and when we modify another parameter (firstReadTimeout), the behavior also changes in the same way. I know there is no real trouble, but I'm curious and prudent: I don't like to do something, when I don't understand what is hidden behind. Could somebody explain to me why Tomcat/APR has these behaviors? Is there a performance risk to set connectionTimeout to 5000? Thank you for your answers. Yann - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Illegal access: this web application instance has beenstoppedalready
Thnx for the help it is now working. The cause was either fixed by correcting improper JSF syntax or rebooting. Cheers Caldarale, Charles R wrote: From: Paulchwd [mailto:paulc...@sympatico.ca] Subject: RE: Illegal access: this web application instance has beenstoppedalready Any additional information / ideas / shots in the dark are greatly appreciated There's these interesting little comments in the doc concerning auto-deployment: When using automatic deployment, the docBase defined by an XML Context file should be outside of the appBase directory. If this is not the case difficulties may be experienced deploying the web application or the application may be deployed twice. Finally, note that if you are defining contexts explicitly, you should probably turn off automatic application deployment. Otherwise, your context will be deployed twice each, and that may cause problems for your app. http://tomcat.apache.org/tomcat-6.0-doc/config/host.html#Automatic%20Application%20Deployment You could experiment with turning off the autoDeploy attribute in your Host element (assuming you can find it in NetBeans). - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://www.nabble.com/Illegal-access%3A-this-web-application-instance-has-been-stopped-already-tp22817324p22846544.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: CPU usage with APR and connectionTimeout impact
From: Taylan Develioglu [mailto:tdevelio...@ebuddy.com] Subject: Re: CPU usage with APR and connectionTimeout impact according to the documentation there exists no connectionTimeout attribute for the apr connector. Which documentation is that? Note that the HTTP connector attributes apply when running in APR mode. Quoting from the APR-specific doc: The following attributes are supported in the HTTP APR connector in addition to the ones supported in the regular HTTP connector: What's not clear in the doc is that many of the HTTP attributes also apply to the NIO version of the protocol handler. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: CPU usage with APR and connectionTimeout impact
Hello, The parameters connectionTimeout and keepAliveTimeout are not on the APR side. They are attributes of AJP and HTTP connectors. Setting the value to 0 means no timeout (according to some mail exchange I found in tomcat mailing list). No timeout is default value of this attribute. My question is also: why a connector attribute has a so subtential impact on tomcat cpu usage, when APR is used? And for the peers going to lunch after the initial connection, it's true: we have a large number of such peers. Thank you for your help. And the help of one of the veterans will be very appreciated. Regards Taylan Develioglu a écrit : Funny, according to the documentation there exists no connectionTimeout attribute for the apr connector. Setting the value to '0' could mean all sorts of behavior, no way to know for sure short of checking the code. (it could mean the connector will not wait for the uri line at all) I can't comment about a correct value for your application. Setting it to a low value will have the connector thread return to the pool faster on connections where the peer has gone to lunch after the initial connection. This only matters if you have a large number of such peers. I'm sure one of the veterans here can clear this up for you. Hello, In my project, we are using Tomcat 6.0.18, with APR 1.2.12 and tc native 1.1.14 on an Redhat OS (Linux kernel 2.6.18). There is a behavior that I can't explain: -with connectionTimeout=0, the process tomcat uses a huge percentage of CPU, even if there is no traffic. but we doesn't observe any problem and the response time is good. -with connectionTimeout=5000, the process tomcat uses a normal percentage of CPU, when there is no traffic. -without APR and with connectionTimeout=0, the process tomcat uses a normal percentage of CPU when there is no traffic. After different searches on the web, tomcat manual and mailing lists, I don't find the reason of the link between CPU usage and connectionTimeout/keepAliveTimeout with APR. With the previous release of Tomcat (5.5) and APR, we have a similar CPU usage (without traffic, high CPU load) and when we modify another parameter (firstReadTimeout), the behavior also changes in the same way. I know there is no real trouble, but I'm curious and prudent: I don't like to do something, when I don't understand what is hidden behind. Could somebody explain to me why Tomcat/APR has these behaviors? Is there a performance risk to set connectionTimeout to 5000? Thank you for your answers. Yann - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: How to configure SSL for particular application
From: SivaKumarl [mailto:sivakum...@naradaproducts.com] Subject: How to configure SSL for particular application i need to access only application through https and remaining through http protocol Read section 12 of the servlet spec. Configure a transport-guarantee of CONFIDENTIAL in the WEB-INF/web.xml of the webapp to be protected. You cannot prevent use of HTTPS for the other webapps, but you can require its use for the ones you want. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat error: It is not available the ServletAction
From: bladu [mailto:ego...@hotmail.com] Subject: Re: Tomcat error: It is not available the ServletAction When you send the same message four times, you become extremely annoying - don't do that. Do you have xerces.jar in your webapp's lib directory? ---Yes, int he application deployed and also in the WAR I have xerces-1.2.3.jar Remove the xerces*.jar from wherever you have it - those classes are part of the 1.5 JRE/JDK. Having them in your webapp causes classloading confusion. What version of Tomcat are you using? ---jakarta-tomcat-5.0.28 Which has not been supported for quite some time. Please use a 5.5 or preferably a 6.0 version. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
SSL is not working in Java Mobile Applications
Hi Friends I am developing java mobile application using XHTML-MP,i generate a key store file and configured in Tomcat Server.xml it is working fine in browsers but while accessing through mobile i am getting error screen Security error:Untrusted Server certificate . I checked with remaining https urls they are working fine in mobile, Please suggest to generate keystore file for mobiles and how access in mobiles. Thanks and Regards Siva -- View this message in context: http://www.nabble.com/SSL-is-not-working-in-Java-Mobile-Applications-tp22847973p22847973.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: CPU usage with APR and connectionTimeout impact
You're right. I missed it. APR has the same attributes as the HTTP connector. I think a seperate overview of attributes per connector would be clearer. The HTTP connectionTimeout description states: - The number of milliseconds this *Connector* will wait, after accepting a connection, for the request URI line to be presented. The default value is 6 (i.e. 60 seconds). '0' is not explicitly defined as a special value. According to the description it would mean a wait period of 0 milliseconds for the uri to be presented. This would make the connector practically useless. Caldarale, Charles R wrote: From: Taylan Develioglu [mailto:tdevelio...@ebuddy.com] Subject: Re: CPU usage with APR and connectionTimeout impact according to the documentation there exists no connectionTimeout attribute for the apr connector. Which documentation is that? Note that the HTTP connector attributes apply when running in APR mode. Quoting from the APR-specific doc: The following attributes are supported in the HTTP APR connector in addition to the ones supported in the regular HTTP connector: What's not clear in the doc is that many of the HTTP attributes also apply to the NIO version of the protocol handler. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to debug Error: listenerStart?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chuck, On 4/1/2009 6:02 PM, Caldarale, Charles R wrote: From: Dan Armbrust [mailto:daniel.armbrust.l...@gmail.com] Subject: Re: How to debug Error: listenerStart? Why doesn't tomcat log a stack trace It does, in the log associated with the Host of interest: Yup, although Chuck's example is a missing filter, not a missing listener. The code is right here, in StandardContext.listenerStart: try { Class clazz = loader.loadClass(listeners[i]); results[i] = clazz.newInstance(); // Annotation processing if (!getIgnoreAnnotations()) { getAnnotationProcessor().processAnnotations(results[i]); getAnnotationProcessor().postConstruct(results[i]); } } catch (Throwable t) { getLogger().error (sm.getString(standardContext.applicationListener, listeners[i]), t); ok = false; } If the class wasn't found, it'll be logged here, and listenerStart returns false. Given the behavior of listenerStart, it could probably just propagate the exception instead of starting-up all the listeners, then failing to load the entire application. That would allow StandardContext.start() to give you a single error message /including/ a stack trace. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknUw74ACgkQ9CaO5/Lv0PA7ywCfYowmHfUIqPm1SGzxosYfm+Es efoAoIHgujllFs9UXbr77pssHre+iJNU =743V -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: CPU usage with APR and connectionTimeout impact
On Thu, Apr 2, 2009 at 3:37 PM, Taylan Develioglu tdevelio...@ebuddy.com wrote: I think a seperate overview of attributes per connector would be clearer. +1 Somebody got some time to change it in the TC trunk and cis able to reate a bugzilla-RFE with a patch? Any volunteers welcome ;) Rgds Gregor -- just because your paranoid, doesn't mean they're not after you... gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2 gpgp-key available @ http://pgpkeys.pca.dfn.de:11371 @ http://pgp.mit.edu:11371/ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat error: It is not available the ServletAction
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Bladu, On 4/2/2009 2:42 AM, bladu wrote: Version of Java ---jdk1.5.0_17 Okay. Do you have xerces.jar in your webapp's lib directory? ---Yes, int he application deployed and also in the WAR I have xerces-1.2.3.jar OMG that version is like 10 years old. They've been on Xerces 2.x for a looong time. The current version is 2.9.1. This is likely to be the problem. Does your application use XML parsing itself and rely on that old version of Xerces? You may have a problem, then. If you don't do XML parsing within your own application's code, consider upgrading to a recent version of Xerces. I'm sure Struts will be a whole lot happier with that. What version of Tomcat are you using? ---jakarta-tomcat-5.0.28 This version of Tomcat has been abandoned. You should upgrade to 5.5 or (even better) 6.0 as soon as possible. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknUxL0ACgkQ9CaO5/Lv0PBBlwCfVfx+8Hj8fnwivOliGsT1pJ9J tPcAoJe/OtlcPS4BNgue829gcri+SI57 =XQjR -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: CPU usage with APR and connectionTimeout impact
From: Taylan Develioglu [mailto:tdevelio...@ebuddy.com] Subject: Re: CPU usage with APR and connectionTimeout impact I think a seperate overview of attributes per connector would be clearer. Strongly agree with that. Patches? The HTTP connectionTimeout description states: - The number of milliseconds this *Connector* will wait, after accepting a connection, for the request URI line to be presented. The default value is 6 (i.e. 60 seconds). '0' is not explicitly defined as a special value. For the Java connectors, the connectionTimeout value is used in Socket.setSoTimeout(), where the API doc states A timeout of zero is interpreted as an infinite timeout. Looks like the APR implementation may well interpret zero somewhat differently, resulting in a CPU overheating test... - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: SSL is not working in Java Mobile Applications
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Siva, On 4/2/2009 9:34 AM, SivaKumarl wrote: I am developing java mobile application using XHTML-MP,i generate a key store file and configured in Tomcat Server.xml it is working fine in browsers but while accessing through mobile i am getting error screen Security error:Untrusted Server certificate. Perhaps your mobile devices don't have the latest set of top-level and/or intermediate CA certs installed. I checked with remaining https urls they are working fine in mobile, Please suggest to generate keystore file for mobiles and how access in mobiles. What type of SSL cert do you have? Do you have one of the newfangled EV certs? If so, it's possible your clients are missing the right certs from the CA that build the proper trust chain. Your only possibility in that case would be to get an older-style certificate which uses an older (and more wide-spread) CA cert. Try doing this: 1. Visit your website using a browser and bring up the details for the SSL certificate so you can see the chain of certs from the top-level (something like VeriSign or Thawte) all the way down to yours. 2. Do the same thing with /another/ site that appears to work on your mobile device. 3. Compare the two certificate chains to see what the differences are. Do you find any differences? If you can't tell, post back with all the details. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknUxuwACgkQ9CaO5/Lv0PBLwQCgmAzfkvz3bCPX5p+CRUn0/cnm gSwAoIzpbQgfFT0fIaDVBQLnN05/a2s/ =6uAb -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to debug Error: listenerStart?
On Wed, Apr 1, 2009 at 5:02 PM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: Dan Armbrust [mailto:daniel.armbrust.l...@gmail.com] Subject: Re: How to debug Error: listenerStart? Why doesn't tomcat log a stack trace It does, in the log associated with the Host of interest: Any thoughts on if this is a bug, a specific problem with my tomcat installation, or a design decision that I don't agree with? It's simply your failure to look in the appropriate log file, rather than the console. - Chuck Actually, it's not. The stack trace is not present in _any_ log file that Tomcat is creating, in my instance of Tomcat. So, I seem to have a secondary problem that is messing up Tomcats logging configuration. Any idea what I should check, to figure out why I don't have a Host log file? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat error: It is not available the ServletAction
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chuck, On 4/2/2009 9:08 AM, Caldarale, Charles R wrote: From: bladu [mailto:ego...@hotmail.com] Subject: Re: Tomcat error: It is not available the ServletAction When you send the same message four times, you become extremely annoying - don't do that. Agreed. I saw one of Bladu's other messages first and replied to it instead of the one that was actually part of this thread, so it's disconnected, now. I suspect a Xerces version mismatch. His version is old. Do you have xerces.jar in your webapp's lib directory? ---Yes, int he application deployed and also in the WAR I have xerces-1.2.3.jar Remove the xerces*.jar from wherever you have it - those classes are part of the 1.5 JRE/JDK. Having them in your webapp causes classloading confusion. I disagree. We have applications that provide their own XML parsers and everything works fine. Apache Cocoon, for instance, ships with xercesImpl-2.9.1.jar (actual Xerces) along with xml-apis-1.3.04.jar (the org.w3c.*, org.xml.* and javax.xml.* interfaces, etc.) provided as part of the webapp's libraries. These work without conflict on Tomcat 5.5.26. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknUyGMACgkQ9CaO5/Lv0PDQlACgnQBxEedsljyuyUyGv51pt/yu sQwAoMKYq/Go5An4r9PZHcscn+YJDkxY =VHUF -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: How to debug Error: listenerStart?
From: Christopher Schultz [mailto:ch...@christopherschultz.net] Subject: Re: How to debug Error: listenerStart? Yup, although Chuck's example is a missing filter, not a missing listener. The OP's original problem *was* a missing filter: http://marc.info/?l=tomcat-userm=123862274508212w=2 - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
RE: How to debug Error: listenerStart?
From: Dan Armbrust [mailto:daniel.armbrust.l...@gmail.com] Subject: Re: How to debug Error: listenerStart? Actually, it's not. Very odd. Sorry for the comment. Any idea what I should check, to figure out why I don't have a Host log file? Have you added Host elements to your server.xml? If so, you'll need to add the appropriate entries to logging.properties. Post your server.xml and logging.properties so we can take a look at them. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to debug Error: listenerStart?
Any idea what I should check, to figure out why I don't have a Host log file? Correction. I have a Host log file - but it is always blank. Size 0. I tried the starting it up with a missing filter, and a missing listener, and neither case gives me anything in the Host log file. I haven't made any changes to Tomcats default logging configuration. Tomcat does print this to the console as it starts up: log4j:WARN No appenders could be found for logger (org.apache.catalina.startup.TldConfig). log4j:WARN Please initialize the log4j system properly. Perhaps thats related. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How2 Disable PUT response in OPTIONS method
Thanks markt-2. The idea of using a ServletFilter is a good one but will not work because the application (we've inherited) does not have a single entry point (dispatch/front-controller) yuck. So I'd have to patch it several places. What I wound up doing was making a little custom valve (HttpMethodValve) and added it to the Engine in our server.xml. The valve allows only the methods specified (see allow=), gives a 403 otherwise, and reports only the allow(ed) methods in response to OPTIONS. Dropped this little jar in tomcat/lib and rock-n-roll. Engine name=Catalina defaultHost=localhost Valve className=org.apache.catalina.valves.AccessLogValve .. / Valve className=org.apache.catalina.valves.HttpMethodValve allow=GET,POST,OPTIONS/ Host name=localhost / /Engine markt-2 wrote: joeweder wrote: I have PUTs disabled but they are still being published as supported in response to the OPTIONS method. Which is correct as per the HTTP spec. Allow: GET, HEAD, POST, PUT, DELETE, TRACE, OPTIONS Server: Apache-Coyote/1.1 Actually doing a PUT returns a 403. But in-house security scanner just looks at response from the OPTIONS method. Then your security scanner needs to be fixed. Is there any way to get Tomcat 6 from responding to the OPTIONS that it supports the PUT? You would need to provide your own DefaultServlet implementation. You should be able to take Tomcat's and override the appropriate method. Alternatively, you should be able to achieve the same effect with a Filter and a wrapped response. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://www.nabble.com/How2-Disable-PUT-response-in-OPTIONS-method-tp22786288p22849145.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to debug Error: listenerStart?
How are you running Tomcat? IDEs (e.g. Eclipse) often reset the logging if you start Tomcat inside the IDE; For me, using the MyEclipse plugin in Eclipse completely suppresses everything but catalina.out. If I need the other logs, I start Tomcat from its ~bin/ startup.sh (I have a vanilla download from the Apache site). On Apr 2, 2009, at 10:09 AM, Dan Armbrust wrote: On Wed, Apr 1, 2009 at 5:02 PM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: Dan Armbrust [mailto:daniel.armbrust.l...@gmail.com] Subject: Re: How to debug Error: listenerStart? Why doesn't tomcat log a stack trace It does, in the log associated with the Host of interest: Any thoughts on if this is a bug, a specific problem with my tomcat installation, or a design decision that I don't agree with? It's simply your failure to look in the appropriate log file, rather than the console. - Chuck Actually, it's not. The stack trace is not present in _any_ log file that Tomcat is creating, in my instance of Tomcat. So, I seem to have a secondary problem that is messing up Tomcats logging configuration. Any idea what I should check, to figure out why I don't have a Host log file? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to debug Error: listenerStart?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 4/2/2009 10:03 AM, Caldarale, Charles R wrote: From: Christopher Schultz [mailto:ch...@christopherschultz.net] Subject: Re: How to debug Error: listenerStart? Yup, although Chuck's example is a missing filter, not a missing listener. The OP's original problem *was* a missing filter: http://marc.info/?l=tomcat-userm=123862274508212w=2 I trust error messages more than I trust posters' assertions: SEVERE: Error listenerStart That's definitely a listener that won't start, not a filter. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknUy5IACgkQ9CaO5/Lv0PBr1wCgwAaxTFA2kdk/l/58NSJlpjrN YhIAoLmqGuITlHOdZCSaU1/sCefG37Wt =VVf3 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How2 Disable PUT response in OPTIONS method
joeweder wrote: Thanks markt-2. The idea of using a ServletFilter is a good one but will not work because the application (we've inherited) does not have a single entry point (dispatch/front-controller) yuck. So I'd have to patch it several places. You can map filters to /* Mark What I wound up doing was making a little custom valve (HttpMethodValve) and added it to the Engine in our server.xml. The valve allows only the methods specified (see allow=), gives a 403 otherwise, and reports only the allow(ed) methods in response to OPTIONS. Dropped this little jar in tomcat/lib and rock-n-roll. Engine name=Catalina defaultHost=localhost Valve className=org.apache.catalina.valves.AccessLogValve .. / Valve className=org.apache.catalina.valves.HttpMethodValve allow=GET,POST,OPTIONS/ Host name=localhost / /Engine markt-2 wrote: joeweder wrote: I have PUTs disabled but they are still being published as supported in response to the OPTIONS method. Which is correct as per the HTTP spec. Allow: GET, HEAD, POST, PUT, DELETE, TRACE, OPTIONS Server: Apache-Coyote/1.1 Actually doing a PUT returns a 403. But in-house security scanner just looks at response from the OPTIONS method. Then your security scanner needs to be fixed. Is there any way to get Tomcat 6 from responding to the OPTIONS that it supports the PUT? You would need to provide your own DefaultServlet implementation. You should be able to take Tomcat's and override the appropriate method. Alternatively, you should be able to achieve the same effect with a Filter and a wrapped response. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to debug Error: listenerStart?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dan, On 4/2/2009 10:21 AM, Dan Armbrust wrote: I haven't made any changes to Tomcats default logging configuration. Tomcat does print this to the console as it starts up: log4j:WARN No appenders could be found for logger (org.apache.catalina.startup.TldConfig). log4j:WARN Please initialize the log4j system properly. This indicates that you /have/ made changes to Tomcat's default logging configuration. Tomcat doesn't use log4j by default. Do you have log4j*.jar in server/lib or common/lib? If so, try moving it out of the way and bouncing Tomcat. Tomcat should use its standard logging configuration if log4j is not present. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknUzHEACgkQ9CaO5/Lv0PAlmACfR8tOjRWnVV8WAWmrIvyBP7ha 24wAnRvmgfWT1YRF7QIhBxa/ErunfhDe =1Tno -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to debug Error: listenerStart?
Here is the non-commented out bits of my server.xml: ?xml version=1.0 encoding=UTF-8? Server port=8005 shutdown=SHUTDOWN !--Listener className=org.apache.catalina.core.AprLifecycleListener /-- Listener className=org.apache.catalina.mbeans.ServerLifecycleListener / Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener / Listener className=org.apache.catalina.storeconfig.StoreConfigLifecycleListener/ GlobalNamingResources Environment name=simpleValue type=java.lang.Integer value=30/ Resource name=UserDatabase auth=Container type=org.apache.catalina.UserDatabase description=User database that can be updated and saved factory=org.apache.catalina.users.MemoryUserDatabaseFactory pathname=conf/tomcat-users.xml / /GlobalNamingResources Service name=Catalina !-- Define a non-SSL HTTP/1.1 Connector on port 8080 -- Connector port=8080 maxHttpHeaderSize=8192 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false redirectPort=8443 acceptCount=100 connectionTimeout=2 disableUploadTimeout=true / Connector port=8009 enableLookups=false redirectPort=8443 protocol=AJP/1.3 / Engine name=Catalina defaultHost=localhost Realm className=org.apache.catalina.realm.UserDatabaseRealm resourceName=UserDatabase/ Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false /Host /Engine /Service /Server My logging.properties file is exactly what came with tomcat 5.5.25. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: How2 Disable PUT response in OPTIONS method
From: joeweder [mailto:joewe...@gmail.com] Subject: Re: How2 Disable PUT response in OPTIONS method The idea of using a ServletFilter is a good one but will not work because the application does not have a single entry point (dispatch/front-controller) ??? I'm confused; filters are configured in WEB-INF/web.xml, and require no changes to the webapp's servlets. Why do you think you'd have to modify the webapp itself? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat error: It is not available the ServletAction
From: Christopher Schultz [mailto:ch...@christopherschultz.net] Subject: Re: Tomcat error: It is not available the ServletAction Apache Cocoon, for instance, ships with xercesImpl-2.9.1.jar (actual Xerces) along with xml-apis-1.3.04.jar (the org.w3c.*, org.xml.* and javax.xml.* interfaces, etc.) provided as part of the webapp's libraries. O.k., good to know. Have the class names changed since the version the OP is using was delivered? The various mailing lists are littered with stories of class conflict problems due to having multiple XML parser jars visible in a given classloader's path, especially on a 1.5 or newer JRE. Note that the Tomcat 5.5 compatibility package for running with a 1.4 JRE consists primarily of the Xerces implementation and XML API definition jars, which are built-in to 1.5; leaving the compatibility package installed when switching from a 1.4 to a 1.5 JRE definitely does cause problems. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
Re: How to debug Error: listenerStart?
Dan Armbrust wrote: [...] Actually, it's not. The stack trace is not present in _any_ log file that Tomcat is creating, in my instance of Tomcat. So, I seem to have a secondary problem that is messing up Tomcats logging configuration. Any idea what I should check, to figure out why I don't have a Host log file? Sorry, no. The mysteries related to Tomcat logging are only disclosed to 1st-class Tomcat Gurus and System Packaging High-Priests. They are not disclosed to us mere mortals. ;-) This being said, you may want to have a look at how your Tomcat is being started (meaning the startup script(s)), and see if they haven't done some high-level redirection of STDOUT/STDERR to SYSLOG or something. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to debug Error: listenerStart?
log4j:WARN No appenders could be found for logger (org.apache.catalina.startup.TldConfig). log4j:WARN Please initialize the log4j system properly. This indicates that you /have/ made changes to Tomcat's default logging configuration. Tomcat doesn't use log4j by default. Do you have log4j*.jar in server/lib or common/lib? If so, try moving it out of the way and bouncing Tomcat. Tomcat should use its standard logging configuration if log4j is not present. Hmm. I don't know how. I have a documented, rigid set of steps that I go through after downloading a new version of Tomcat. The only changes that I make to tomcat are: Add sample modjk2 scripts. Remove example apps. Remove Host manager. Replace Root application. comment out the AprLifecycleListener from server.xml Add activation.jar and mail.jar to the common/lib folder. (This is due to a packaging issue in one of our webapps that I haven't had a chance to fix yet) And thats it. There is no log4j present in tomcat's library folders. Log4j _is_ present in the war files that I deploy, however. I guess maybe I should walk through this step by step, and see _when_ tomcat gets confused about which logging system to use. Though I have a hunch that it has something to do with activation.jar or mail.jar. I've never liked the fact that I've been putting those in Tomcat's library folder. I'll start there, I guess. Thanks, Dan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: How to debug Error: listenerStart?
From: Christopher Schultz [mailto:ch...@christopherschultz.net] Subject: Re: How to debug Error: listenerStart? SEVERE: Error listenerStart That's definitely a listener that won't start, not a filter. The OP has just posted a second retraction... - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
Re: CPU usage with APR and connectionTimeout impact
On Tue, Mar 31, 2009 at 2:40 PM, yann grostete yann.grost...@alcatel-lucent.fr wrote: -with connectionTimeout=0, the process tomcat uses a huge percentage of CPU, even if there is no traffic. but we doesn't observe any problem and the response time is good. Please use a timeout value 0. Allowing 0 is a (minor) bug, as it enables non blocking mode on the socket. Also, no timeout ( 0) is asking for trouble. Rémy - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: How to debug Error: listenerStart?
From: Dan Armbrust [mailto:daniel.armbrust.l...@gmail.com] Subject: Re: How to debug Error: listenerStart? My logging.properties file is exactly what came with tomcat 5.5.25. What are you using on the command line to start Tomcat? In particular, what is the value of the following system properties? java.util.logging.manager java.util.logging.config.file The default values are org.apache.juli.ClassLoaderLogManager and ${catalina.base}/conf/logging.properties, respectively. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: How to debug Error: listenerStart?
From: Dan Armbrust [mailto:daniel.armbrust.l...@gmail.com] Subject: Re: How to debug Error: listenerStart? Add sample modjk2 scripts. The mod_jk2 package was deprecated many years ago; you should not be using it. Log4j _is_ present in the war files that I deploy, however. The log4j message may be coming from the webapp, not Tomcat. Look at the system properties of your running Tomcat to see what logging mechanism it thinks it's using. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Session Replication in Cluster
Hello all, I've built a very simple 2-member Tomcat cluster for testing, but I am unable to get the session replication quite right. The problem is when I fail one member of the cluster. The behavior I was expecting is that the other cluster member would take over the session ids for the failed member. However it is appending it's own jvmRoute value to the session id, and thus setting a new cookie. Details: I have 2 cluster members, itchy and scratchy, running on the same physical server, and CATALINA_BASE is /var/tomcat/itchy and /var/tomcat/scratchy respectively. Tomcat 6.0.18 binaries, etc. are at /usr/local/tomcat. Using mod_jk 1.2.27 on Apache 2.2.11 (Apache is also on the same server). I am using sticky sessions. Here are the access logs for the 2 members from a short failover experiment (note I'm including the session ID in the 2nd field). The session starts on scratchy. From scratchy_access_log.2009-04-02.txt: 192.168.200.177 E5BF3FFA9AEE1E3AB0DD4A96BA5E4011.scratchy - [02/Apr/2009:10:19:55 -0400] GET / HTTP/1.1 200 14612 192.168.200.177 E5BF3FFA9AEE1E3AB0DD4A96BA5E4011.scratchy - [02/Apr/2009:10:20:14 -0400] GET /about/ HTTP/1.1 200 19507 At 10:21:39 AM I do a kill -9 on the scratchy instance. Now the traffic goes to the other cluster member as expected. From itchy_access_log.2009-04-02.txt: 192.168.200.177 E5BF3FFA9AEE1E3AB0DD4A96BA5E4011.itchy - [02/Apr/2009:10:22:11 -0400] GET /about/publications/ HTTP/1.1 200 18263 192.168.200.177 E5BF3FFA9AEE1E3AB0DD4A96BA5E4011.itchy - [02/Apr/2009:10:22:32 -0400] GET /about/changes/ HTTP/1.1 200 12736 Note however that the new member's jvmRoute value is now appended to the session id. I thought is was supposed to stay exactly the same after failover. Additional details can be found as follows: server.xml for itchy - see: http://gillnet.mdibl.org/~mcmorran/itchy-server.xml.txt server.xml for scratchy - see: http://gillnet.mdibl.org/~mcmorran/scratchy-server.xml.txt context.xml (identical) - see: https://gillnet.mdibl.org/~mcmorran/context.xml.txt workers.properties: https://gillnet.mdibl.org/~mcmorran/workers.properties I've also included the catalina.out file for both, from startup and through the test at: https://gillnet.mdibl.org/~mcmorran/itchy-catalina.out https://gillnet.mdibl.org/~mcmorran/scratchy-catalina.out I'd appreciate any advice on where I went wrong. Thanks and best wishes, Roy -- Roy McMorran Systems Administrator MDI Biological Laboratory mcmor...@mdibl.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to debug Error: listenerStart?
Yup, although Chuck's example is a missing filter, not a missing listener. The OP's original problem *was* a missing filter: http://marc.info/?l=tomcat-userm=123862274508212w=2 I trust error messages more than I trust posters' assertions: SEVERE: Error listenerStart That's definitely a listener that won't start, not a filter. Well, it turned out I had some of both. Sorry if I caused confusion. One of my webapps was missing a listener, and one was missing both a listener and a filter, due to a packaging issue in my build scripts. Dan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
acceptCount in Tomcat 5.x and 6.x?
Does the acceptCount setting that is part of the AJP connector in the server.xml file still exist in Tomcat 5.x and Tomcat 6.x? I see a lot of references to it in Tomcat 4.x, but I have not run across it in 5 or 6. We have this setting defined in our tomcat 6 installation, but I think it is a relic from some previous tomcat 4 configuration. Thanks
Re: CPU usage with APR and connectionTimeout impact
Thanks all for your help and explanations. So we will try to find the best value 0 for connectionTimeout in our application. Best regards, Yann Rémy Maucherat a écrit : On Tue, Mar 31, 2009 at 2:40 PM, yann grostete yann.grost...@alcatel-lucent.fr wrote: -with connectionTimeout=0, the process tomcat uses a huge percentage of CPU, even if there is no traffic. but we doesn't observe any problem and the response time is good. Please use a timeout value 0. Allowing 0 is a (minor) bug, as it enables non blocking mode on the socket. Also, no timeout ( 0) is asking for trouble. Rémy - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat error: It is not available the ServletAction
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chuck, On 4/2/2009 10:30 AM, Caldarale, Charles R wrote: From: Christopher Schultz [mailto:ch...@christopherschultz.net] Subject: Re: Tomcat error: It is not available the ServletAction Apache Cocoon, for instance, ships with xercesImpl-2.9.1.jar (actual Xerces) along with xml-apis-1.3.04.jar (the org.w3c.*, org.xml.* and javax.xml.* interfaces, etc.) provided as part of the webapp's libraries. O.k., good to know. Have the class names changed since the version the OP is using was delivered? The various mailing lists are littered with stories of class conflict problems due to having multiple XML parser jars visible in a given classloader's path, especially on a 1.5 or newer JRE. Xerces 1 implements somewhat older versions of the XML spec(s), while Xerces 2 implements all the new stuff (which isn't all that different... it's still XML 1.0). The implementation is completely different, but the interfaces are largely the same names. The XML APIs themselves have changed somewhat, and I think /that/ is where the problems occur. It's not Xerces specific, of course, because it's the org.w3c.*, org.xml.*, and javax.xml.* interfaces and classes that have changed. IMO, Sun and the W3C really boned the XML API path. I think the reason Xerces works within the application's ClassLoader is because of the backward way that webapp ClassLoaders work (load local before parent). When Xerces is/is not available to the boot classloader as well as the main classloader, that's when problems occur (which is why you need to bundle the parser with Tomcat 5.5 on a 1.4-level JVM). Note that the Tomcat 5.5 compatibility package for running with a 1.4 JRE consists primarily of the Xerces implementation and XML API definition jars, which are built-in to 1.5; leaving the compatibility package installed when switching from a 1.4 to a 1.5 JRE definitely does cause problems. Since this is at the top-level (i.e. not using a webapp-style ClassLoader), confusion can occur when versions are not matched (and they are almost always mismatched). - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknU1cUACgkQ9CaO5/Lv0PBefACfXYT1GHDzwoV1xgek0hXqZLIn 00wAn0bXFF4GysDxj+uo1/NiXqmV6WcG =tNYW -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to debug Error: listenerStart?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dan, On 4/2/2009 11:02 AM, Dan Armbrust wrote: Yup, although Chuck's example is a missing filter, not a missing listener. The OP's original problem *was* a missing filter: http://marc.info/?l=tomcat-userm=123862274508212w=2 I trust error messages more than I trust posters' assertions: SEVERE: Error listenerStart That's definitely a listener that won't start, not a filter. Well, it turned out I had some of both. Sorry if I caused confusion. No problem. Chuck and I are just trying to decide who is righter :) One of my webapps was missing a listener, and one was missing both a listener and a filter, due to a packaging issue in my build scripts. This can definitely cause confusion. I think we can find a solution for you. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknU1s8ACgkQ9CaO5/Lv0PAspQCfUXFNJDgP0BI4BK75p+zRIBeg p5YAoKyZGGjXvdemNdnBEH/KUzNUEXF+ =jgGK -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
How to produce a Comet EventType.READ from the clint side?
Hello, Recently I started to develop a web application that is based on the Comet Architecture. After a lot of research, I realize that there is a lack of documentation and tutorials about how to build simple Comet applications on Tomcat. The tomcat Advanced IO documentation previews the way that the server handles the incoming different type events, but doesn’t explain how to produce these events from the client side (ex. IE, Firefox). The snippet below produces such an event. function newConnection(){ xhr = new XMLHttpRequest(); xhr.open('GET','/comet' ,true); xhr.send(null); } When I execute this function, a new event (EventType.Begin) arrives on the CometServlet. I am wondering if there is way to produce an (EventType.READ) event from the client side. The only way to produce (EventType.READ) events on the CometServlet was by the above java code, but I don’t know how to use it efficiently to accomplish my goal. Any suggestion? private static final String ENCODING = ISO-8859-1; private static final String DELIMITER = \r\n; private URL url; private InputStream inputStream; private OutputStream outputStream; private Socket socket; public static void main(String[] args) throws Exception { Post test = new Post(); test.test(); } private void test() throws Exception { url = new URL(http://localhost:8080/comet;); initConnection(); sendHeaders(); send(test1); Thread.sleep(2*1000); send(test2); sendLastChunk(); // block on read to keep app alive - server never sends response byte[] data = new byte[8192]; int result = inputStream.read(data); while (result0) { String s = new String(data,0,result); System.out.println(Received data:\n+s); result = inputStream.read(data); } { System.out.println(Received EOF); } } private void initConnection() throws IOException { int port = url.getPort(); port = (port 0) ? url.getDefaultPort() : port; try { socket = new Socket(url.getHost(), port); socket.setSoTimeout(Integer.MAX_VALUE); socket.setKeepAlive(true); inputStream = socket.getInputStream(); outputStream = socket.getOutputStream(); } catch (NoRouteToHostException nrthe) { System.out.println(host: + url.getHost()); nrthe.printStackTrace(); } } private void sendHeaders() throws IOException { String path = url.getPath(); StringBuffer outputBuffer = new StringBuffer(); outputBuffer.append(POST + path + HTTP/1.1 + DELIMITER); outputBuffer.append(Host: + url.getHost() + DELIMITER); outputBuffer.append(User-Agent: CometTest + DELIMITER); outputBuffer.append(Connection: keep-alive + DELIMITER); outputBuffer.append(Content-Type: text/plain + DELIMITER); outputBuffer.append(Transfer-Encoding: chunked + DELIMITER); outputBuffer.append(DELIMITER); byte[] outputBytes = outputBuffer.toString().getBytes(ENCODING); outputStream.write(outputBytes); outputStream.flush(); } private void send(String chunkData) throws IOException { byte[] chunkBytes = chunkData.getBytes(ENCODING); String hexChunkLength = Integer.toHexString(chunkBytes.length); StringBuffer outputBuffer = new StringBuffer(); outputBuffer.append(hexChunkLength); outputBuffer.append(DELIMITER); outputBuffer.append(chunkData); outputBuffer.append(DELIMITER); byte[] outputBytes = outputBuffer.toString().getBytes(ENCODING); outputStream.write(outputBytes); outputStream.flush(); } private void sendLastChunk() throws IOException { byte[] outputBytes = new String(0 + DELIMITER+DELIMITER).getBytes(ENCODING); outputStream.write(outputBytes); outputStream.flush(); } } _ Show them the way! Add maps and directions to your party invites. http://www.microsoft.com/windows/windowslive/products/events.aspx
Re: acceptCount in Tomcat 5.x and 6.x?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jim, On 4/2/2009 11:08 AM, Jim Goodspeed wrote: Does the acceptCount setting that is part of the AJP connector in the server.xml file still exist in Tomcat 5.x and Tomcat 6.x? It does not appear to be available at these levels. I see a lot of references to it in Tomcat 4.x, but I have not run across it in 5 or 6. We have this setting defined in our tomcat 6 installation, but I think it is a relic from some previous tomcat 4 configuration. I suspect it was removed because the web server is expected to configure the accept counts. You would want the number of AJP connections available on Tomcat to exactly match that of the web server. The web server is the component that would accept more requests than it has threads to actually process them. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknU2VIACgkQ9CaO5/Lv0PClMQCgsVQ0qZliw7T2+7iyvzwwYhoD RloAoL/cg6V9Df4WQIpaXJsVKCTY4Brx =g9nu -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to debug Error: listenerStart?
What are you using on the command line to start Tomcat? In particular, what is the value of the following system properties? java.util.logging.manager java.util.logging.config.file The default values are org.apache.juli.ClassLoaderLogManager and ${catalina.base}/conf/logging.properties, respectively. - Chuck I'm using the catalina.sh script that comes with tomcat, with the following modifications. I set JRE_HOME to the path of the JRE that I want tomcat to use. I set JAVA_OPTS with a bunch of memory / garbage collector options. Both of these variables are hard coded into the top of the catalina.sh script. The rest is untouched from stock. I added an echo to the catalina.sh script to print the JAVA_OPTS that is actually using: -server -Xss250k -Xms1200m -Xmx1200m -XX:MaxPermSize=128m -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/opt/foo/tomcat/bin/../../nn/log -Djava.net.preferIPv4Stack=true -Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false -Djava.awt.headless=true -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file=/opt/foo/tomcat/conf/logging.properties The logging properties appear to match what you expect. Dan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: tomcat 6 session replication issues
What is your multicast address and port used by Tomcat to discover members of the cluster? Your sever.xml has a note [10.x.x.x]. This does not look like a multicast address. http://tldp.org/HOWTO/Multicast-HOWTO-2.html From: Jimmy Phillips [mailto:jimmy.phillip...@yahoo.com] Sent: Thursday, April 02, 2009 11:21 AM To: users@tomcat.apache.org Subject: tomcat 6 session replication issues Hi, I've been having issues with tomcat session replication. I have a number of tomcat servers running in a cluster mode, behind an Apache load balancer. The tomcat version is 6.0.18 on CentOS 5.1. Running the cluster using the DeltaManager seems to be working fine, however when I try to use the BackupManager for session replication, I get the following entries in the logs: Apr 1, 2009 3:28:42 AM org.apache.catalina.tribes.transport.nio.NioReceiver socketTimeouts WARNING: Channel key is registered, but has had no interest ops for the last 3000 ms. (cancelled:false):sun.nio.ch.selectionkeyi...@62af9d74 last access:2009-04-01 03:28:35.969 Apr 1, 2009 3:28:42 AM org.apache.catalina.tribes.transport.nio.NioReceiver socketTimeouts WARNING: Channel key is registered, but has had no interest ops for the last 3000 ms. (cancelled:false):sun.nio.ch.selectionkeyi...@4c4947d3 last access:2009-04-01 03:28:35.969 Apr 1, 2009 3:29:04 AM org.apache.catalina.tribes.group.interceptors.TcpFailureDetector memberDisappeared INFO: Received memberDisappeared[org.apache.catalina.tribes.membership.MemberImpl[tcp:/ /{10, 99, 86, 47}:4000,{10, 99, 86, 47},4000, alive=1380182,id={-121 25 -2 -7 81 -1 76 3 -92 -20 122 69 67 102 -31 -15 }, payload={}, command={}, domain={}, ]] message. Will verify. Apr 1, 2009 3:29:04 AM org.apache.catalina.tribes.group.interceptors.TcpFailureDetector memberDisappeared INFO: Verification complete. Member still alive[org.apache.catalina.tribes.membership.MemberImpl[tcp://{10, 99, 86, 47}:4000,{10, 99, 86, 47},4000, alive=1380182,id={-121 25 -2 -7 81 -1 76 3 -92 -20 122 69 67 102 -31 -15 }, payload={}, command={}, domain={}, ]] Apr 1, 2009 3:29:04 AM org.apache.catalina.tribes.tipis.AbstractReplicatedMap heartbeat SEVERE: Unable to send AbstractReplicatedMap.ping message org.apache.catalina.tribes.ChannelException: Operation has timed out(6 ms.).; Faulty members:tcp://{10, 99, 86, 47}:4000; at org.apache.catalina.tribes.transport.nio.ParallelNioSender.sendMessage(P arallelNioSender.java:97) at org.apache.catalina.tribes.transport.nio.PooledParallelSender.sendMessag e(PooledParallelSender.java:53) at org.apache.catalina.tribes.transport.ReplicationTransmitter.sendMessage( ReplicationTransmitter.java:80) at org.apache.catalina.tribes.group.ChannelCoordinator.sendMessage(ChannelC oordinator.java:78) at org.apache.catalina.tribes.group.ChannelInterceptorBase.sendMessage(Chan nelInterceptorBase.java:75) at org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor.send Message(ThroughputInterceptor.java:61) at org.apache.catalina.tribes.group.ChannelInterceptorBase.sendMessage(Chan nelInterceptorBase.java:75) at org.apache.catalina.tribes.group.interceptors.MessageDispatchInterceptor .sendMessage(MessageDispatchInterceptor.java:73) at org.apache.catalina.tribes.group.ChannelInterceptorBase.sendMessage(Chan nelInterceptorBase.java:75) at org.apache.catalina.tribes.group.interceptors.TcpFailureDetector.sendMes sage(TcpFailureDetector.java:87) at org.apache.catalina.tribes.group.ChannelInterceptorBase.sendMessage(Chan nelInterceptorBase.java:75) at org.apache.catalina.tribes.group.GroupChannel.send(GroupChannel.java:216 ) at org.apache.catalina.tribes.group.GroupChannel.send(GroupChannel.java:175 ) at org.apache.catalina.tribes.group.RpcChannel.send(RpcChannel.java:89) at org.apache.catalina.tribes.tipis.AbstractReplicatedMap.ping(AbstractRepl icatedMap.java:253) at org.apache.catalina.tribes.tipis.AbstractReplicatedMap.heartbeat(Abstrac tReplicatedMap.java:793) at org.apache.catalina.tribes.group.GroupChannel.heartbeat(GroupChannel.jav a:153) at org.apache.catalina.tribes.group.GroupChannel$HeartbeatThread.run(GroupC hannel.java:661) Of course the above entry is just one of many, for the different hosts. Searching the mailing lists, I found this post http://markmail.org/message/jv4dykh7fdhr4mvp which looks like the same problem I am having. The outcome of that thread states that the problem is fixed by a patch in revision 618823, so I compiled a version of the current 6.x trunk (rev 759722) and deployed it to all the servers. However, the problem is still appearing. I've attached a copy of the current server.xml ( it is common to all tomcat instances ). I've done a thread dump on one of the servers when these errors started appearing, and the output is attached, thread_dump.txt (removed threads that were running by our
Re: Rotating catalina.out in tomcat 6.x
Since I can't get my development team to NOT log to catalina.out I just script it: cp -a $logdir/catalina.out $logdir/catalina.out-`date +%Y-%m-%d` $logdir/catalina.out On Tue, Mar 17, 2009 at 9:16 AM, Mark Thomas ma...@apache.org wrote: André Warnier wrote: Ghufran wrote: I am using tomcat 6.0.18 on RHEL 5. Please tell me how to rotate the catalina.out log file. Some simple nice polite innocent question like that, yet so perfect for triggering a huge ranting thread..;-) Or just ignoring it since the OP hijacked the thread. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: acceptCount in Tomcat 5.x and 6.x?
Can you tell me where in Apache I would configure the number of AJP connections? I'm using Apache 2.2.10 to load balance tomcat using mod_proxy. On Thu, Apr 2, 2009 at 11:27 AM, Christopher Schultz ch...@christopherschultz.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jim, On 4/2/2009 11:08 AM, Jim Goodspeed wrote: Does the acceptCount setting that is part of the AJP connector in the server.xml file still exist in Tomcat 5.x and Tomcat 6.x? It does not appear to be available at these levels. I see a lot of references to it in Tomcat 4.x, but I have not run across it in 5 or 6. We have this setting defined in our tomcat 6 installation, but I think it is a relic from some previous tomcat 4 configuration. I suspect it was removed because the web server is expected to configure the accept counts. You would want the number of AJP connections available on Tomcat to exactly match that of the web server. The web server is the component that would accept more requests than it has threads to actually process them. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknU2VIACgkQ9CaO5/Lv0PClMQCgsVQ0qZliw7T2+7iyvzwwYhoD RloAoL/cg6V9Df4WQIpaXJsVKCTY4Brx =g9nu -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat 6 session replication issues
The multicast address is in the Membership/ element. The 10x address in the Receiver/ element is actually a 10x network. From: Jorge Medina jmed...@e-dialog.com To: Tomcat Users List users@tomcat.apache.org Sent: Thursday, April 2, 2009 4:31:06 PM Subject: RE: tomcat 6 session replication issues What is your multicast address and port used by Tomcat to discover members of the cluster? Your sever.xml has a note [10.x.x.x]. This does not look like a multicast address. http://tldp.org/HOWTO/Multicast-HOWTO-2.html From: Jimmy Phillips [mailto:jimmy.phillip...@yahoo.com] Sent: Thursday, April 02, 2009 11:21 AM To: users@tomcat.apache.org Subject: tomcat 6 session replication issues Hi, I've been having issues with tomcat session replication. I have a number of tomcat servers running in a cluster mode, behind an Apache load balancer. The tomcat version is 6.0.18 on CentOS 5.1. Running the cluster using the DeltaManager seems to be working fine, however when I try to use the BackupManager for session replication, I get the following entries in the logs: Apr 1, 2009 3:28:42 AM org.apache.catalina.tribes.transport.nio.NioReceiver socketTimeouts WARNING: Channel key is registered, but has had no interest ops for the last 3000 ms. (cancelled:false):sun.nio.ch.selectionkeyi...@62af9d74 last access:2009-04-01 03:28:35.969 Apr 1, 2009 3:28:42 AM org.apache.catalina.tribes.transport.nio.NioReceiver socketTimeouts WARNING: Channel key is registered, but has had no interest ops for the last 3000 ms. (cancelled:false):sun.nio.ch.selectionkeyi...@4c4947d3 last access:2009-04-01 03:28:35.969 Apr 1, 2009 3:29:04 AM org.apache.catalina.tribes.group.interceptors.TcpFailureDetector memberDisappeared INFO: Received memberDisappeared[org.apache.catalina.tribes.membership.MemberImpl[tcp:/ /{10, 99, 86, 47}:4000,{10, 99, 86, 47},4000, alive=1380182,id={-121 25 -2 -7 81 -1 76 3 -92 -20 122 69 67 102 -31 -15 }, payload={}, command={}, domain={}, ]] message. Will verify. Apr 1, 2009 3:29:04 AM org.apache.catalina.tribes.group.interceptors.TcpFailureDetector memberDisappeared INFO: Verification complete. Member still alive[org.apache.catalina.tribes.membership.MemberImpl[tcp://{10, 99, 86, 47}:4000,{10, 99, 86, 47},4000, alive=1380182,id={-121 25 -2 -7 81 -1 76 3 -92 -20 122 69 67 102 -31 -15 }, payload={}, command={}, domain={}, ]] Apr 1, 2009 3:29:04 AM org.apache.catalina.tribes.tipis.AbstractReplicatedMap heartbeat SEVERE: Unable to send AbstractReplicatedMap.ping message org.apache.catalina.tribes.ChannelException: Operation has timed out(6 ms.).; Faulty members:tcp://{10, 99, 86, 47}:4000; at org.apache.catalina.tribes.transport.nio.ParallelNioSender.sendMessage(P arallelNioSender.java:97) at org.apache.catalina.tribes.transport.nio.PooledParallelSender.sendMessag e(PooledParallelSender.java:53) at org.apache.catalina.tribes.transport.ReplicationTransmitter.sendMessage( ReplicationTransmitter.java:80) at org.apache.catalina.tribes.group.ChannelCoordinator.sendMessage(ChannelC oordinator.java:78) at org.apache.catalina.tribes.group.ChannelInterceptorBase.sendMessage(Chan nelInterceptorBase.java:75) at org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor.send Message(ThroughputInterceptor.java:61) at org.apache.catalina.tribes.group.ChannelInterceptorBase.sendMessage(Chan nelInterceptorBase.java:75) at org.apache.catalina.tribes.group.interceptors.MessageDispatchInterceptor ..sendMessage(MessageDispatchInterceptor.java:73) at org.apache.catalina.tribes.group.ChannelInterceptorBase.sendMessage(Chan nelInterceptorBase.java:75) at org.apache.catalina.tribes.group.interceptors.TcpFailureDetector.sendMes sage(TcpFailureDetector.java:87) at org.apache.catalina.tribes.group.ChannelInterceptorBase.sendMessage(Chan nelInterceptorBase.java:75) at org.apache.catalina.tribes.group.GroupChannel.send(GroupChannel.java:216 ) at org.apache.catalina.tribes.group.GroupChannel.send(GroupChannel.java:175 ) at org.apache.catalina.tribes.group.RpcChannel.send(RpcChannel.java:89) at org.apache.catalina.tribes.tipis.AbstractReplicatedMap.ping(AbstractRepl icatedMap.java:253) at org.apache.catalina.tribes.tipis.AbstractReplicatedMap.heartbeat(Abstrac tReplicatedMap.java:793) at org.apache.catalina.tribes.group.GroupChannel.heartbeat(GroupChannel.jav a:153) at org.apache.catalina.tribes.group.GroupChannel$HeartbeatThread.run(GroupC hannel.java:661) Of course the above entry is just one of many, for the different hosts. Searching the mailing lists, I found this post http://markmail.org/message/jv4dykh7fdhr4mvp which looks like the same problem I am having. The outcome of that thread states that the problem is fixed by a patch in revision 618823, so I compiled a version of the current 6.x trunk (rev 759722) and
Tomcat 6.0.18 examples recompile ok but dont work!!
I installed Tomcat 6.0.18 on Mac OS X 10.5.6 (brand new iMac) Examples all worked fine. E.g the HelloWorldExample displays Hello World in my browser window. So I then recompile it just to check that this works using: javac HelloWorldExample.java It compiles fine. (My javac version is at 1.6.0_07) But when I reload in my browser I get HTTP Status 404. The requested resource is not available. I restarted Tomcat. No joy either... Anyone know what the heck is going on here...??? -- View this message in context: http://www.nabble.com/Tomcat-6.0.18-examples-recompile-ok-but-dont-work%21%21-tp22850460p22850460.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat 6.0.18 examples recompile ok but dont work!!
From: mdunford [mailto:martin.dunf...@gmail.com] Subject: Tomcat 6.0.18 examples recompile ok but dont work!! But when I reload in my browser I get HTTP Status 404. The requested resource is not available. I restarted Tomcat. No joy either... Are you running Tomcat with a 1.6 JRE? If not, your recompiled class won't be loadable. Where did you put the recompiled class file? What's in the logs? Uncomment the AccessLogValve in conf/server.xml for more information about what requests are coming in. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: How to debug Error: listenerStart?
From: Dan Armbrust [mailto:daniel.armbrust.l...@gmail.com] Subject: Re: How to debug Error: listenerStart? Both of these variables are hard coded into the top of the catalina.sh script. The rest is untouched from stock. As a side note, you can do this with a separate setenv.sh script to avoid modifying the released scripts. The logging properties appear to match what you expect. Agreed. Are you shutting down Tomcat gracefully before looking at the log file? At some point fairly recently, the log entries stopped making it to the file system until the process was terminated, whereas they used to appear pretty much immediately (at least on my Windows boxes; I don't have any active Linux projects at the moment). I don't know what changed (I suspect the JRE - haven't taken the time to go hunting), but it makes it difficult to monitor a running Tomcat. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: CPU 100% and restart...
Laura Bartolomé wrote: Hi again A few minutes ago we have these problems in our server: The CPU usage was increased up to 100% and we have to restart the server cause it didn't respond. Now we are looking for some information in stdout and we find the next just at time the server was at 100%. The last lines before restart the servers are like these... there are hundreds... ClientAbortException: java.net.SocketException: Software caused A ClientAbortException is exactly that: a client terminated a request before it was completed. Was your application delivering a big file (look in the access log to match the request at the same time)? Also, we have a modest tradition, whereby we invite posters to include their Tomcat, Java and OS versions by way of introduction. p Some idea? it could be possible??? Thanks a lot Laura - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Restarting Tomcat from Ant
Hi, I currently copy the Application files to CATALINA_HOME/webapps from Ant, and then run shutdown and startup. Is there a way to also restart the server from Ant? Thanks,
Re: Tomcat 5 and UTF-8
On Fri, Mar 27, 2009 at 5:34 PM, Christopher Schultz ch...@christopherschultz.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Oscar, On 3/27/2009 10:35 AM, Je suis la poubelle wrote: 1. In those mentioned web pages, I noticed that none of them explicitly specified the following HTML header: head meta http-equiv=Content-Type content=text/html; charset=utf-8 /head That's because setting a META tag that doesn't match reality is not really a good idea. I can set the charset to shift-js in the META tag but it doesn't mean the page is actually in Japanese. I don't see your point Setting charset/encoding is to specify computerized information. It's not just a matter of language. If setting charset in META tag doesn't mean anything to you, the same argument applies to setting charset in HTTP header. And what if another encoding is specified in HTML header, say ISO-8859-1? Which one would the browser use in priority? Nobody knows the answer! Actually, everybody knows the answer, because it's published in the HTML specification: http://www.w3.org/TR/html4/charset.html#h-5.2.2 To sum up, conforming user agents must observe the following priorities when determining a document's character encoding (from highest priority to lowest): 1. An HTTP charset parameter in a Content-Type field. 2. A META declaration with http-equiv set to Content-Type and a value set for charset. 3. The charset attribute set on an element that designates an external resource. Yes, yes, but this is the theoretical answer. Not in practice. When there's a bug, there's a bug. That's why I specify the encoding in both places. While it's not a terrible idea to specify the encoding in both places, you should consider the possibility that the META tag can be wrong. It's not only not a terrible idea, but a good habit to do so. Just like the principle of double check: what's the point of double check if everything works as expected? We do double check because in practice we are subject to errors. A good programmer should never leave anything to chance, that's why it's good to set charset in both HTTP header as well as in HTML header. 2. To make things easier for myself, I always save JSP files in UTF-8 encoding, and I always put this header as well: %@ page pageEncoding=utf-8 % Now everything's in UTF8 from A to Z. If you're following guidelines for i18n, you'll put your non-ASCII strings into property files and won't have to worry about the encoding of the JSP source file. Yes, but again, you're talking in theoretical viewpoint. What about if I want to create a small, quick and short JSP just for some tests? I won't go into changing everything. The simpler is to change one thing: my JSP file. Another situation: what if you don't have total access to all files? Well, if Tomcat is in your computer, it's taken as granted that you could do everything. But what about you're developping a JSP site and have it hosted in some Internet servers? Are you sure you still have all access? And as your link to HTTP recommendation says, some server might not send HTTP header. You'd better also set the charset in HTML header. One more example: you're doing the test in one JSP file in your corner. Everything works perfectly. Then you move the file to another server. In this situation, it's better to have the file self-contained. String sUTF8 = new String(sWrongEncoding.getBytes(iso-8859-1), UTF8); I think that should be rightString, not sUTF8, since the String object has no inherent encoding. Not true. Java string is inherently using UTF-16. If you're so picky on the name, you'd better call it latin1StringConvertedBackToUTF8BeforeConvertedBackToUTF16 but this is getting ridiculous
Re: How to debug Error: listenerStart?
I got a brand new copy of tomcat 5.5.25, and tested it. Some of the provided apps, such as balancer - create entries in the localhost log file. I used kdiff to compare the entire tomcat folder hierarchy to my tomcat distribution, and I can't find any significant difference that could cause my missing logs. I tried adding a missing listener to the balancer app. The error was properly logged. I tried deploying my war file (with a purposely broken listener) to the newly extracted, completely stock tomcat, and I see the same behaviour. No entries whatsoever in the localhost log file from my application, which failed to deploy. So, it would appear that something in my application - where I use log4j - is perhaps preventing the error from being logged by tomcat. What would be doing this? Something in my app is preventing this severe error from being passed up to tomcat to be logged - but then my app doesn't log it either - probably because it is stopped before it ever finishes deploying. There is obviously some interaction going on between my webapp and tomcat's logging system that I don't know about. Thanks, Dan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: CPU 100% and restart...
What Tomcat, Java and OS versions were they? -Original Message- From: Pid p...@pidster.com Sent: Apr 2, 2009 1:14 PM To: Tomcat Users List users@tomcat.apache.org Subject: Re: CPU 100% and restart... Laura Bartolomé wrote: Hi again A few minutes ago we have these problems in our server: The CPU usage was increased up to 100% and we have to restart the server cause it didn't respond. Now we are looking for some information in stdout and we find the next just at time the server was at 100%. The last lines before restart the servers are like these... there are hundreds... ClientAbortException: java.net.SocketException: Software caused A ClientAbortException is exactly that: a client terminated a request before it was completed. Was your application delivering a big file (look in the access log to match the request at the same time)? Also, we have a modest tradition, whereby we invite posters to include their Tomcat, Java and OS versions by way of introduction. p Some idea? it could be possible??? Thanks a lot Laura - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 5 and UTF-8
On Thu, Apr 2, 2009 at 7:30 PM, Je suis la poubelle laps...@gmail.com wrote: On Fri, Mar 27, 2009 at 5:34 PM, Christopher Schultz ch...@christopherschultz.net wrote: Setting charset/encoding is to specify computerized information. It's not just a matter of language. If setting charset in META tag doesn't mean anything to you, the same argument applies to setting charset in HTTP header. Well, this is the only argument I can agree upon. But encoding of HTML/XML is the story of which was there first: The hen or the egg? I'll give you an example based on our dreadful experiences with XML-parsing: Let's say, we have a stream looking like this: ?xml version=1.0 encoding=UTF-8? foobar/foo /xml However, the encoding of the whole stream is done in some wierd encoding you've never heard about. See, the parser needs to know about the encoding /in advance/ to be able to read the encoding from said stream. See the point? Actually, it's a good practice to put the encoding, but that's about it, and same goes for a META-TAG. Talking web, the only thing a parser can rely on is a HTTP-Header. And it's getting really nuts, when it comes to UTF-8: Talking about UTF-8 with or without BOM? Even the specs are not clear about that. In my oppinion, the whole character-set is a pain in the ass: I personally wish IETF came up with some specs saying something like the first n bytes of any stream have to be encoded in ASCII containg length and encoding-type of the rest of the stream. I put that on my whishlist for xmas. Rgds Gregor -- just because your paranoid, doesn't mean they're not after you... gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2 gpgp-key available @ http://pgpkeys.pca.dfn.de:11371 @ http://pgp.mit.edu:11371/ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to debug Error: listenerStart?
On Thu, Apr 2, 2009 at 7:30 PM, Dan Armbrust daniel.armbrust.l...@gmail.com wrote: What would be doing this? Something in my app is preventing this severe error from being passed up to tomcat to be logged - but then my app doesn't log it either - probably because it is stopped before it ever finishes deploying. Your app can't logg /before/ being deployed - that's Tomcat's responsibility. There is obviously some interaction going on between my webapp and tomcat's logging system that I don't know about. - Check out if you find a file like log4j.properties or log4j.xml within your Tomcat-subdirectories (not within you webapps!) and rename it - Check for a file named log4j*.jar and rename it - Check for a file logging.properties within your Tomcat-subdirectories (not within you webapps!) and rename it - Replace the renamed file logging.properties with one from a clean Tomcat-installation - Restart Tomcat Now if there's an error with the deployment, you should find that within Tomcat's logs. Rgds Gregor -- just because your paranoid, doesn't mean they're not after you... gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2 gpgp-key available @ http://pgpkeys.pca.dfn.de:11371 @ http://pgp.mit.edu:11371/ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: How to debug Error: listenerStart?
From: Dan Armbrust [mailto:daniel.armbrust.l...@gmail.com] Subject: Re: How to debug Error: listenerStart? There is obviously some interaction going on between my webapp and tomcat's logging system that I don't know about. Many Tomcat components associated with a specific webapp will use the webapp's logger. If your log4j initialization fails (which appeared to be the case), there may well be no where to put the messages. You can try removing the log4j usage from your webapp (probably too hard), or correct its initialization so that it is available. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Restarting Tomcat from Ant
try sshexec task http://ant.apache.org/manual/OptionalTasks/sshexec.html On Thu, Apr 2, 2009 at 6:23 PM, Mighty Tornado mighty.torn...@gmail.comwrote: Hi, I currently copy the Application files to CATALINA_HOME/webapps from Ant, and then run shutdown and startup. Is there a way to also restart the server from Ant? Thanks,
RE: Restarting Tomcat from Ant
From: Mighty Tornado [mailto:mighty.torn...@gmail.com] Subject: Restarting Tomcat from Ant Is there a way to also restart the server from Ant? Why don't you just use the startup and shutdown scripts that come with Tomcat? If you want to call them from within an ant script, use the exec task. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to debug Error: listenerStart?
On Thu, Apr 2, 2009 at 1:00 PM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: Dan Armbrust [mailto:daniel.armbrust.l...@gmail.com] Subject: Re: How to debug Error: listenerStart? There is obviously some interaction going on between my webapp and tomcat's logging system that I don't know about. Many Tomcat components associated with a specific webapp will use the webapp's logger. If your log4j initialization fails (which appeared to be the case), there may well be no where to put the messages. You can try removing the log4j usage from your webapp (probably too hard), or correct its initialization so that it is available. - Chuck I don't know if my log4j initialization is failing, or if there is just a gap in time where tomcat sees that my webapp is using log4j - but my webapp has not yet had a chance to init log4j - my webapp dynamically configures log4j with a pattern like this: LogManager.resetConfiguration(); PropertyConfigurator.configure(properties); fairly early in it's startup sequence. But, when I get a listenerStart error, I know that this code hasn't yet executed (due to a missing system.out message) This also seems to fit with that other warning I get during the startup: INFO: Deploying web application archive ap.war log4j:WARN No appenders could be found for logger (org.apache.commons.digester.Digester). log4j:WARN Please initialize the log4j system properly. logPath: /opt/NetProvision/nn/log/ The 4th line, above, is printed when my log4j sequence completes. So it would appear that something within my webapp tried to log using log4j, but log4j wasn't yet configured - hence the warning about the missing appender. What would I need to do to make log4j within my webapp have a temporary configuration which would log to the console until the point when my webapp executes it's dynamic configuration? I'll have to hunt through all of my 3rd party jar files... I wonder if one of them has a log4j config file that is being picked up. Thanks for all the feedback. I'm a whole lot closer to the real source of this problem than I was when I started tracking it down. Dan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Sun Webserver connector problem - nsapi_redirector
I would like to front Tomcat 6.0.14 with Sun WebServer 6.1 SP8. I have followed to a tee the instructions from http://tomcat.apache.org/connectors-doc/webserver_howto/nes.html Unfortunately, it seems like the directive: NameTrans fn=assign-name from=/examples(|/*) name=jknsapi is being completely ignored. I get the following error: “trying to GET /examples, send-file reports: HTTP4142: can't find /cfo/SUNWwbsvr-6.1SP8/docs/examples (File not found)”. It looks like Sun Webserver is looking for /examples folder in its docroot and not redirecting it to Tomcat. Any help will be appreciated. TIA. Dmitri -- View this message in context: http://www.nabble.com/Sun-Webserver-connector-problem---nsapi_redirector-tp22854897p22854897.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: How to debug Error: listenerStart?
From: Dan Armbrust [mailto:daniel.armbrust.l...@gmail.com] Subject: Re: How to debug Error: listenerStart? my webapp dynamically configures log4j with a pattern like this: LogManager.resetConfiguration(); PropertyConfigurator.configure(properties); I think that's too late - the logger needs to be ready first thing so that webapp-related log entries can be created during deployment. INFO: Deploying web application archive ap.war log4j:WARN No appenders could be found for logger (org.apache.commons.digester.Digester). log4j:WARN Please initialize the log4j system properly. Those are indications that usage of the logger has already commenced. So it would appear that something within my webapp tried to log using log4j I suspect it was Tomcat code using your logger, not your webapp code. What would I need to do to make log4j within my webapp have a temporary configuration which would log to the console until the point when my webapp executes it's dynamic configuration? Create a log4j.xml or log4j.properties file in WEB-INF/classes. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Sun Webserver connector problem - nsapi_redirector
From: dmitriz [mailto:dmit...@mycfo.com] Subject: Sun Webserver connector problem - nsapi_redirector I would like to front Tomcat 6.0.14 with Sun WebServer 6.1 SP8. I can't answer your question, but why would you want to do that? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
RE: Sun Webserver connector problem - nsapi_redirector
I'm required to run the application over secured socket. Tomcat's SSL implementation is not optimal. The application performs well over http, but when certificate is installed in Tomcat it runs extremely slow over https. I would like to install certificate on Sun Webserver and see if performance over SSL improves. But first, I need to have redirection working. Caldarale, Charles R wrote: From: dmitriz [mailto:dmit...@mycfo.com] Subject: Sun Webserver connector problem - nsapi_redirector I would like to front Tomcat 6.0.14 with Sun WebServer 6.1 SP8. I can't answer your question, but why would you want to do that? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. -- View this message in context: http://www.nabble.com/Sun-Webserver-connector-problem---nsapi_redirector-tp22854897p22855418.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: [OT] Tomcat error: It is not available the ServletAction
From: Christopher Schultz [mailto:ch...@christopherschultz.net] Subject: Re: Tomcat error: It is not available the ServletAction I think the reason Xerces works within the application's ClassLoader is because of the backward way that webapp ClassLoaders work (load local before parent). If you don't mind pursuing this a bit more, I still have some concerns about how this can work reliably. Let's focus on the xml-apis.jar for now, which contains numerous classes that are also in the 1.5 and newer JREs. It would seem that if a webapp had its own copy of xml-apis.jar, it would load some javax.xml.* classes from there, while references in Tomcat's lib directory (including any shared jars used by multiple webapps) would resolve those classes from rt.jar. Constructs like instanceof would fail, since they have different classloaders. Does this just work by luck? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
Re: Sun Webserver connector problem - nsapi_redirector
I'm attaching log and config files here. Thanks. dmitriz wrote: I would like to front Tomcat 6.0.14 with Sun WebServer 6.1 SP8. I have followed to a tee the instructions from http://tomcat.apache.org/connectors-doc/webserver_howto/nes.html Unfortunately, it seems like the directive: NameTrans fn=assign-name from=/examples(|/*) name=jknsapi is being completely ignored. I get the following error: “trying to GET /examples, send-file reports: HTTP4142: can't find /cfo/SUNWwbsvr-6.1SP8/docs/examples (File not found)”. It looks like Sun Webserver is looking for /examples folder in its docroot and not redirecting it to Tomcat. Any help will be appreciated. TIA. Dmitri http://www.nabble.com/file/p22855669/websvr.zip websvr.zip -- View this message in context: http://www.nabble.com/Sun-Webserver-connector-problem---nsapi_redirector-tp22854897p22855669.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
SOMEONE REMOVE ME FROM THIS LIST
- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat 6.0.18 examples recompile ok but dont work!!
Thanks for your help. I haven't been doing Java in a while so bear with me. Tomcat is entirely new to me. java -version java version 1.6.0_07 Java(TM) SE Runtime Environment (build 1.6.0_07-b06-153) Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_07-b06-57, mixed mode) Output from log really puzzles me. (I uncommedted AccessValve like you said) Here is the sequence of events: (1) I install Tomcat and try out the HelloWorldExample. All is well and log shows 0:0:0:0:0:0:0:1%0 - - [02/Apr/2009:15:40:11 -0400] GET /examples/servlets/servlet/HelloWorldExample HTTP/1.1 200 359 (2) Next I go and recompile HelloWorldExample (saving a copy of original class file) javac HelloWorldExample.java OK but whoops (class file has changed!) ls -l HelloWorld*class* -rw-r--r-- 1 martindunford staff 1723 Apr 2 15:46 HelloWorldExample.class -rw-r--r-- 1 martindunford staff 2058 Apr 2 15:46 HelloWorldExample.class.orginal (3) I restart (stop/start) Tomcat HelloWorldExample fails. Sure enough log shows 0:0:0:0:0:0:0:1%0 - - [02/Apr/2009:15:48:58 -0400] GET /examples/servlets/servlet/HelloWorldExample HTTP/1.1 404 952 (4) Notes - There has never been an examples/servlets/servlet directory... puzzling.. Thanks again Martin Caldarale, Charles R wrote: From: mdunford [mailto:martin.dunf...@gmail.com] Subject: Tomcat 6.0.18 examples recompile ok but dont work!! But when I reload in my browser I get HTTP Status 404. The requested resource is not available. I restarted Tomcat. No joy either... Are you running Tomcat with a 1.6 JRE? If not, your recompiled class won't be loadable. Where did you put the recompiled class file? What's in the logs? Uncomment the AccessLogValve in conf/server.xml for more information about what requests are coming in. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://www.nabble.com/Tomcat-6.0.18-examples-recompile-ok-but-dont-work%21%21-tp22850460p22855764.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat 6.0.18 examples recompile ok but dont work!!
The recompiled class is in the examples/WEB_INF/classes dir, same as before, I cd there before recompiling Caldarale, Charles R wrote: From: mdunford [mailto:martin.dunf...@gmail.com] Subject: Tomcat 6.0.18 examples recompile ok but dont work!! But when I reload in my browser I get HTTP Status 404. The requested resource is not available. I restarted Tomcat. No joy either... Are you running Tomcat with a 1.6 JRE? If not, your recompiled class won't be loadable. Where did you put the recompiled class file? What's in the logs? Uncomment the AccessLogValve in conf/server.xml for more information about what requests are coming in. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://www.nabble.com/Tomcat-6.0.18-examples-recompile-ok-but-dont-work%21%21-tp22850460p22855831.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: SOMEONE REMOVE ME FROM THIS LIST
Not to be too obvious, but what about the instructions at the bottom? - Original Message - From: ks...@yahoo.com To: users@tomcat.apache.org Sent: Thursday, April 02, 2009 3:47 PM Subject: SOMEONE REMOVE ME FROM THIS LIST - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Restarting Tomcat from Ant
I tried the following Chuck, target name=stop-tomcat exec dir=${TOMCAT}/bin/ executable=shutdown.sh / /target but it tells me that the script cannot be found On Thu, Apr 2, 2009 at 2:21 PM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: Mighty Tornado [mailto:mighty.torn...@gmail.com] Subject: Restarting Tomcat from Ant Is there a way to also restart the server from Ant? Why don't you just use the startup and shutdown scripts that come with Tomcat? If you want to call them from within an ant script, use the exec task. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to debug Error: listenerStart?
What would I need to do to make log4j within my webapp have a temporary configuration which would log to the console until the point when my webapp executes it's dynamic configuration? Create a log4j.xml or log4j.properties file in WEB-INF/classes. Bingo. That makes my log4j warnings go away, and now I get the stack traces when the startup fails due to munged listener or filter. Thanks! It's certainly not obvious to me why Tomcat is trying to use log4j from my webapp to log an error about a class missing from my webapp which prevents deployment. It seems like failures during deployment of a webapp should always be routed back to tomcat's logging system. Judging from what I found online when I first started hunting this down, I'm not the first person that has had this happen, either. Time to go fix all my build scripts to introduce a temporary log4j configuration to handle the time span before my real configuration can occur. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Illegal access: this web application instance has been stoppedalready
Caldarale, Charles R wrote: Whatever you're doing is attempting multiple stops of your webapp. I observe almost identical exceptions when I redeploy webapplication that uses quartz scheduler. It looks like after webapp's instance has been undeployed, background quartz thread wants to do something and then exception occurs. -- Mikolaj Rydzewski m...@ceti.pl - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Sun Webserver connector problem - nsapi_redirector
From: dmitriz [mailto:dmit...@mycfo.com] Subject: RE: Sun Webserver connector problem - nsapi_redirector I'm required to run the application over secured socket. Tomcat's SSL implementation is not optimal. The application performs well over http, but when certificate is installed in Tomcat it runs extremely slow over https. The easiest way to solve that is to use Tomcat's APR connector and OpenSSL: http://tomcat.apache.org/tomcat-6.0-doc/apr.html - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Session Replication in Cluster
Are your logs Apache logs? Mod_jk logs? If it is Apache, the question would probably better answer in the Apache mailing list. Anyway, What does your LogFormat string looks like? I bet what you see in the logs is the concatenation of the session ID and the worker name. I doubt two servers would generate the same hex digits for the session. Therefore, your server must be working as expected, you are just interpreting the logs incorrectly. -Original Message- From: Roy McMorran [mailto:mcmor...@mdibl.org] Sent: Thursday, April 02, 2009 10:59 AM To: Tomcat Users List Subject: Session Replication in Cluster Hello all, I've built a very simple 2-member Tomcat cluster for testing, but I am unable to get the session replication quite right. The problem is when I fail one member of the cluster. The behavior I was expecting is that the other cluster member would take over the session ids for the failed member. However it is appending it's own jvmRoute value to the session id, and thus setting a new cookie. Details: I have 2 cluster members, itchy and scratchy, running on the same physical server, and CATALINA_BASE is /var/tomcat/itchy and /var/tomcat/scratchy respectively. Tomcat 6.0.18 binaries, etc. are at /usr/local/tomcat. Using mod_jk 1.2.27 on Apache 2.2.11 (Apache is also on the same server). I am using sticky sessions. Here are the access logs for the 2 members from a short failover experiment (note I'm including the session ID in the 2nd field). The session starts on scratchy. From scratchy_access_log.2009-04-02.txt: 192.168.200.177 E5BF3FFA9AEE1E3AB0DD4A96BA5E4011.scratchy - [02/Apr/2009:10:19:55 -0400] GET / HTTP/1.1 200 14612 192.168.200.177 E5BF3FFA9AEE1E3AB0DD4A96BA5E4011.scratchy - [02/Apr/2009:10:20:14 -0400] GET /about/ HTTP/1.1 200 19507 At 10:21:39 AM I do a kill -9 on the scratchy instance. Now the traffic goes to the other cluster member as expected. From itchy_access_log.2009-04-02.txt: 192.168.200.177 E5BF3FFA9AEE1E3AB0DD4A96BA5E4011.itchy - [02/Apr/2009:10:22:11 -0400] GET /about/publications/ HTTP/1.1 200 18263 192.168.200.177 E5BF3FFA9AEE1E3AB0DD4A96BA5E4011.itchy - [02/Apr/2009:10:22:32 -0400] GET /about/changes/ HTTP/1.1 200 12736 Note however that the new member's jvmRoute value is now appended to the session id. I thought is was supposed to stay exactly the same after failover. Additional details can be found as follows: server.xml for itchy - see: http://gillnet.mdibl.org/~mcmorran/itchy-server.xml.txt server.xml for scratchy - see: http://gillnet.mdibl.org/~mcmorran/scratchy-server.xml.txt context.xml (identical) - see: https://gillnet.mdibl.org/~mcmorran/context.xml.txt workers.properties: https://gillnet.mdibl.org/~mcmorran/workers.properties I've also included the catalina.out file for both, from startup and through the test at: https://gillnet.mdibl.org/~mcmorran/itchy-catalina.out https://gillnet.mdibl.org/~mcmorran/scratchy-catalina.out I'd appreciate any advice on where I went wrong. Thanks and best wishes, Roy -- Roy McMorran Systems Administrator MDI Biological Laboratory mcmor...@mdibl.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
And even further into the black magic of logging configuration within tomcat...
So, after my long thread to figure out the missing stack traces from a bad listener configuration, I _thought_ I knew what I needed to correct. It seemed that Tomcat was trying to use log4j shipped with my webapp, before my webapp had configured log4j. Supplying a log4.properties file in the WEB-INF\classes folder with a temporary log4j configuration seemed to fix the problem. Until... I deployed two webapps within tomcat. The second (and subsequent) webapps _still_ have the problem of trying to log to a log4j which isn't configured - resulting in all error messages being lost. I turned on log4j debugging (-Dlog4j.debug=true) - and here is what I see as tomcat starts: INFO: Starting service Catalina Apr 2, 2009 5:01:22 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/5.5.25 Apr 2, 2009 5:01:22 PM org.apache.catalina.core.StandardHost start INFO: XML validation disabled log4j: Trying to find [log4j.xml] using context classloader WebappClassLoader delegate: false repositories: /WEB-INF/classes/ -- Parent Classloader: org.apache.catalina.loader.standardclassloa...@17200b4 . log4j: Trying to find [log4j.xml] using WebappClassLoader delegate: false repositories: /WEB-INF/classes/ -- Parent Classloader: org.apache.catalina.loader.standardclassloa...@17200b4 class loader. log4j: Trying to find [log4j.xml] using ClassLoader.getSystemResource(). log4j: Trying to find [log4j.properties] using context classloader WebappClassLoader delegate: false repositories: /WEB-INF/classes/ -- Parent Classloader: org.apache.catalina.loader.standardclassloa...@17200b4 . log4j: Using URL [file:/opt/foo/tomcat/webapps/app1/WEB-INF/classes/log4j.properties] for automatic log4j configuration. log4j: Reading configuration from URL file:/opt/foo/tomcat/webapps/app1/WEB-INF/classes/log4j.properties log4j: Parsing for [root] with value=[WARN, Console]. snip log4j: Finished configuring. And then I see output that lets me know that my dynamic configuration of log4j has occurred. Everything is good so far. No warnings have been shown. Now, tomcat starts the second webapp - this is all that I see: log4j:WARN No appenders could be found for logger (org.apache.commons.digester.Digester.sax). log4j:WARN Please initialize the log4j system properly. And then it lets me know that it has finished my dynamic log4j configuration. So, why didn't log4j try to find the log4j.properties file for the second webapp? I'm certainly no guru of how the visibility works between the webapps and their various classloaders - buy why is log4j in the second webapp deciding not to configure itself? And sure enough, if I break the listener in the web.xml for the second webapp, the stack trace is lost. There is definitely a bug here, but I don't know if the bug is in Tomcat or in Log4j. Any thoughts? Thanks, Dan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: And even further into the black magic of logging configuration within tomcat...
From: Dan Armbrust [mailto:daniel.armbrust.l...@gmail.com] Subject: And even further into the black magic of logging configuration within tomcat... So, why didn't log4j try to find the log4j.properties file for the second webapp? Verify that you have separate log4j.properties files in the WEB-INF/classes directories of each webapp, and that there's not a permissions problem with them being accessed by whatever userid Tomcat is running under. There is definitely a bug here, but I don't know if the bug is in Tomcat or in Log4j. Where is your log4j.jar located? You should have separate ones in each webapp's WEB-INF/lib directory; if you place log4j.jar in Tomcat's lib directory - or anywhere the common, system, or bootstrap class loaders could find it - you may well end up with the symptoms you're observing. You could try -verbose:class to see where classes are being loaded from, if you want to wade through a whole lot of output. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
ROOT options
I've been utilizing the device of renaming myapp.war to ROOT.war in order make myapp perform as the default application at http://mydomain.com . However, I thought that earlier this week (maybe last week?), Chuck made a comment that this was the easiest of the options. I'm wondering if I could get some pointers to reading about what these options are. My searches haven't turned up anything. Thanks in advance, Ken - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat 6.0.18 examples recompile ok but dont work!!
From: mdunford [mailto:martin.dunf...@gmail.com] Subject: RE: Tomcat 6.0.18 examples recompile ok but dont work!! I go and recompile HelloWorldExample javac HelloWorldExample.java That's not sufficient to compile a servlet. You will also need a -cp argument to inform the compiler where servlet-api.jar is located. If you attempt to do this via the CLASSPATH environment variable - don't. Using the CLASSPATH variable is a major cause of classloading confusion and difficult to diagnose problems. If you have CLASSPATH defined, get rid of it before doing anything else, and smack yourself if you ever feel tempted to use it again. When your current directory is ${catalina.base}/webapps/examples/WEB-INF/classes, your javac line should look like this: javac -cp ../../../../lib/servlet-api.jar HelloWorldExample.java Sure enough log shows 0:0:0:0:0:0:0:1%0 - - [02/Apr/2009:15:48:58 -0400] GET /examples/servlets/servlet/HelloWorldExample HTTP/1.1 404 952 I've done the same thing on my 6.0.18 installation, and it works fine. Do you have a JAVA_HOME or JRE_HOME environment variable set? If so, what's the value? You should also be able to find additional information in the logs, including a possible stack trace of the underlying problem. There has never been an examples/servlets/servlet directory... Don't confuse URL paths with file system paths - they're independent. If you look in webapps/examples/WEB-INF/web.xml, you'll see a servlet mapping for /servlets/servlet/HelloWorldExample that targets the servlet named HelloWorldExample, which is configured to use the HelloWorldExample.class. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: ROOT options
From: Ken Bowen [mailto:kbo...@als.com] Subject: ROOT options I'm wondering if I could get some pointers to reading about what these options are. You can place a Context element in server.xml, but that is strongly discouraged these days, and we will likely yell at you if you do so. You can also specify the default webapp by creating the file conf/Catalina/[host]/ROOT.xml that contains a Context element with a docBase attribute that points to a location *outside* of the Host appBase directory. You must also remove any ROOT.war file or ROOT directory from the Host appBase. If you want to have the name of your .war file be different from the webapp name, this is the way to do it. Documentation is here: http://tomcat.apache.org/tomcat-6.0-doc/config/index.html - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org