Re: how does the tomcat log generated? log4j?
Thanks,I will have a try. 2010/12/25 Konstantin Kolinko knst.koli...@gmail.com 2010/12/25 maven apache apachemav...@gmail.com: Perhaps I’m not making myself clear,in fact I want to do some processing work to the the logs created by the access log valve http://tomcat.apache.org/tomcat-6.0-doc/config/valve.html#Access_Log_Valve to database. You can use JDBCAccessLogValve http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/catalina/valves/JDBCAccessLogValve.html Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: how does the tomcat log generated? log4j?
2010/12/25 André Warnier a...@ice-sa.com The logging page which I pointed you to, does not say that Tomcat uses log4j. It says that you /can/ configure Tomcat to use log4j, instead of the default juli logging. It even provides instructions to do so. The AccessLogValve documentation page does not say either that it uses log4j. But what it does say at the very beginning, is that the output file is changed every day at midnight. So if you only read the files up to last night at midnight, you will never encounter the problem that something is still writing to it. Also, I do not know what your ultimate purpose is, but there exist already several open-source programs which read a logfile in the format produced by the Tomcat AccessLogValve, parse it, and produce nice graphical statistics out of it (like webalizer or awstats). Maybe you are re-inventing something which already exists ? Unfortunately yes,our boss want our own analyzer system based on java. :( Web access statistics are not usually something which needs to be accurate in real-time. Having Tomcat writing them directly to a database may have a noticeable impact on your applications performance. That's why this is something usually done off-line. In fact,I just analyzer the logs before yesterday,it is also my boss who require the real-time(almost) analysis .:) Thank you anyway,although having Tomcat writing logs directly to a database may cause performance problem,it is another way. My boss will decide it :) maven apache wrote: Perhaps I’m not making myself clear,in fact I want to do some processing work to the the logs created by the access log valve http://tomcat.apache.org/tomcat-6.0-doc/config/valve.html#Access_Log_Valve to database. For example:the log: 10.33.2.45 - - [08/Dec/2010:08:44:43 +0800] GET /poi.txt HTTP/1.1 200 672 - Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8 will be saved in the db in this format: ip timemethod uri statusbytes browser platform 10.33.2.45 2010-10-08 08:44:43 GET/poi.txt200672 Firefox/3.6.8winxp And now I meet some problems when I read the log file like: localhost_access_log.2010-12-20.txt I read the file line by line,but sometime I can not get a complete line since this file may be written in. So,someone suggest me add a db appender(log4j),which will do the procesing work and then export the log to db. --- Now,from the link you give me ,it seems that tomcat does use log4j to create its access log. 2010/12/25 André Warnier a...@ice-sa.com Hi. It is not very clear what you are asking, specially since you do not specify which version of Tomcat your are using, under which Java version and on which platform. Assuming you are using Tomcat 6.0.x, the on-line documentation for logging is here : http://tomcat.apache.org/tomcat-6.0-doc/logging.html Maybe read it first, and then come back if you have a specific question ? (But then try to specify the question clearly) maven apache wrote: Hi: I wonder how is the tomcat log generated,I mean the log like this; localhost_access_log.2010-12-20.txt I want to export the logs to db. Some one suggestion I directly add one Appender http://logging.apache.org/log4j/1.2/apidocs/index.html if tomcat also uses log4j to generate the logs and I have access to the tomcat's log4j config file. More details can be found in this post: http://stackoverflow.com/questions/4486620/randomaccessfile-probelm So I wonder if this is possible? - 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 does the tomcat log generated? log4j?
2010/12/26 Pid p...@pidster.com On 25/12/2010 04:37, maven apache wrote: Hi: I wonder how is the tomcat log generated,I mean the log like this; localhost_access_log.2010-12-20.txt I want to export the logs to db. Some one suggestion I directly add one Appender http://logging.apache.org/log4j/1.2/apidocs/index.html if tomcat also uses log4j to generate the logs and I have access to the tomcat's log4j config file. More details can be found in this post: http://stackoverflow.com/questions/4486620/randomaccessfile-probelm So I wonder if this is possible? Dear Mr Maven Apache. Is that really your name? Of course not. Just a web nickname. Since I like mavenhttp://maven.apache.org/,it is the best build tool I have ever used. p
Re: Rename localhost log
On 25/12/2010 20:10, Pid wrote: On 24/12/2010 23:08, André Warnier wrote: As Pid* would say : *Fail* Bzz. And there I was about to say: Goodness, you're not using the highly secret and experimentally dangerous 6.7.3 are you? he he. I don't think the key parts have changed much during 6.0.x but there may be some differences in the detail. For the current status see http://tomcat.apache.org/tomcat-6.0-doc/config/valve.html#Access_Log_Valve For your version, see the same page in the docs that shipped with it. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Can JSP code be served from a DB instead of files?
On 26/12/2010 03:39, David Wall wrote: Is there a way to have Jasper (or other...) retrieve the JSP source code it'll compile from a database instead of a regular file? It's fine that Jasper write the .java/.class files as normal, but the .jsp would come from my database instead. A servlet that could return the JSP source code so it was then processed/compiled normally would be perfect if it's possible. I'd like to have some auto-generated JSP code used in our system without writing it to disk in a directory in my webapp's real path. Is this possible? Thanks for any ideas... Yes. You'll need to extend BaseDirContext in org.apache.naming.resources. For some examples, see FileDirContext and WarDirContext in the same package. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: The Web application created a ThreadLocal but failed to remove it
On 12/26/10 7:15 AM, Ahmed Ashour wrote: Dear all, I think similar case has been recently reported, but restarting an Axis2 with Tomcat give the below errors. Is this an issue in Tomcat or in Axis? Dec 26, 2010 9:52:01 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads SEVERE: The web application [/axis2] appears to have started a thread named [Timer-0] but has failed to stop it. This is very likely to create a memory leak. Dec 26, 2010 9:52:01 AM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap SEVERE: The web application [/axis2] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.threadlo...@d402dd]) and a value of type [ org.apache.xerces.parsers.SAXParser] (value [org.apache.xerces.parsers.saxpar...@13dd208]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak. This is best reported to the Axis2 mailing list, users there may be able to advise on whether it's possible to prevent this from happening by configuring something. If not, it may be a bug that community needs to address. p Axis2 version: 1.5.4 Tomcat: Server version: Apache Tomcat/6.0.29 Server built: July 19 2010 1458 Server number: 6.0.0.29 OS Name:Windows 7 OS Version: 6.1 Architecture: x86 JVM Version:1.6.0_22-b04 JVM Vendor: Sun Microsystems Inc. Yours, Ahmed Blog: http://asashour.blogspot.com 0x62590808.asc Description: application/pgp-keys signature.asc Description: OpenPGP digital signature
Re: how does the tomcat log generated? log4j?
maven apache wrote: 2010/12/25 André Warnier a...@ice-sa.com The logging page which I pointed you to, does not say that Tomcat uses log4j. It says that you /can/ configure Tomcat to use log4j, instead of the default juli logging. It even provides instructions to do so. The AccessLogValve documentation page does not say either that it uses log4j. But what it does say at the very beginning, is that the output file is changed every day at midnight. So if you only read the files up to last night at midnight, you will never encounter the problem that something is still writing to it. Also, I do not know what your ultimate purpose is, but there exist already several open-source programs which read a logfile in the format produced by the Tomcat AccessLogValve, parse it, and produce nice graphical statistics out of it (like webalizer or awstats). Maybe you are re-inventing something which already exists ? Unfortunately yes,our boss want our own analyzer system based on java. :( Oh well, if the boss says so. But then I would /still/ recommend writing something in java which reads the above logfiles and feeds the database. Seems a bit more reliable and more scaleable to me. What if the database is not available at some point for whatever reason ? You stop tomcat, or you lose the information ? In any case, you should look at the current access log files, and count the number of lines which it writes per second|minute|hour, and ask yourself if you want this number of transactions going into your database system in real-time. Web access statistics are not usually something which needs to be accurate in real-time. Having Tomcat writing them directly to a database may have a noticeable impact on your applications performance. That's why this is something usually done off-line. In fact,I just analyzer the logs before yesterday,it is also my boss who require the real-time(almost) analysis .:) Thank you anyway,although having Tomcat writing logs directly to a database may cause performance problem,it is another way. My boss will decide it :) maven apache wrote: Perhaps I’m not making myself clear,in fact I want to do some processing work to the the logs created by the access log valve http://tomcat.apache.org/tomcat-6.0-doc/config/valve.html#Access_Log_Valve to database. For example:the log: 10.33.2.45 - - [08/Dec/2010:08:44:43 +0800] GET /poi.txt HTTP/1.1 200 672 - Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8 will be saved in the db in this format: ip timemethod uri statusbytes browser platform 10.33.2.45 2010-10-08 08:44:43 GET/poi.txt200672 Firefox/3.6.8winxp And now I meet some problems when I read the log file like: localhost_access_log.2010-12-20.txt I read the file line by line,but sometime I can not get a complete line since this file may be written in. So,someone suggest me add a db appender(log4j),which will do the procesing work and then export the log to db. --- Now,from the link you give me ,it seems that tomcat does use log4j to create its access log. 2010/12/25 André Warnier a...@ice-sa.com Hi. It is not very clear what you are asking, specially since you do not specify which version of Tomcat your are using, under which Java version and on which platform. Assuming you are using Tomcat 6.0.x, the on-line documentation for logging is here : http://tomcat.apache.org/tomcat-6.0-doc/logging.html Maybe read it first, and then come back if you have a specific question ? (But then try to specify the question clearly) maven apache wrote: Hi: I wonder how is the tomcat log generated,I mean the log like this; localhost_access_log.2010-12-20.txt I want to export the logs to db. Some one suggestion I directly add one Appender http://logging.apache.org/log4j/1.2/apidocs/index.html if tomcat also uses log4j to generate the logs and I have access to the tomcat's log4j config file. More details can be found in this post: http://stackoverflow.com/questions/4486620/randomaccessfile-probelm So I wonder if this is possible? - 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 does the tomcat log generated? log4j?
2010/12/26 André Warnier a...@ice-sa.com maven apache wrote: 2010/12/25 André Warnier a...@ice-sa.com The logging page which I pointed you to, does not say that Tomcat uses log4j. It says that you /can/ configure Tomcat to use log4j, instead of the default juli logging. It even provides instructions to do so. The AccessLogValve documentation page does not say either that it uses log4j. But what it does say at the very beginning, is that the output file is changed every day at midnight. So if you only read the files up to last night at midnight, you will never encounter the problem that something is still writing to it. Also, I do not know what your ultimate purpose is, but there exist already several open-source programs which read a logfile in the format produced by the Tomcat AccessLogValve, parse it, and produce nice graphical statistics out of it (like webalizer or awstats). Maybe you are re-inventing something which already exists ? Unfortunately yes,our boss want our own analyzer system based on java. :( Oh well, if the boss says so. But then I would /still/ recommend writing something in java which reads the above logfiles and feeds the database. Seems a bit more reliable and more scaleable to me. Thanks for your kind. I prefer to this manner also. And it is why I ask problems in the stackover. :) Of course,it is a java io question,not related to tomcat. :) What if the database is not available at some point for whatever reason ? You stop tomcat, or you lose the information ? In any case, you should look at the current access log files, and count the number of lines which it writes per second|minute|hour, and ask yourself if you want this number of transactions going into your database system in real-time. Thanks for all your guys. Web access statistics are not usually something which needs to be accurate in real-time. Having Tomcat writing them directly to a database may have a noticeable impact on your applications performance. That's why this is something usually done off-line. In fact,I just analyzer the logs before yesterday,it is also my boss who require the real-time(almost) analysis .:) Thank you anyway,although having Tomcat writing logs directly to a database may cause performance problem,it is another way. My boss will decide it :) maven apache wrote: Perhaps I’m not making myself clear,in fact I want to do some processing work to the the logs created by the access log valve http://tomcat.apache.org/tomcat-6.0-doc/config/valve.html#Access_Log_Valve to database. For example:the log: 10.33.2.45 - - [08/Dec/2010:08:44:43 +0800] GET /poi.txt HTTP/1.1 200 672 - Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8 will be saved in the db in this format: ip timemethod uri statusbytes browser platform 10.33.2.45 2010-10-08 08:44:43 GET/poi.txt200672 Firefox/3.6.8winxp And now I meet some problems when I read the log file like: localhost_access_log.2010-12-20.txt I read the file line by line,but sometime I can not get a complete line since this file may be written in. So,someone suggest me add a db appender(log4j),which will do the procesing work and then export the log to db. --- Now,from the link you give me ,it seems that tomcat does use log4j to create its access log. 2010/12/25 André Warnier a...@ice-sa.com Hi. It is not very clear what you are asking, specially since you do not specify which version of Tomcat your are using, under which Java version and on which platform. Assuming you are using Tomcat 6.0.x, the on-line documentation for logging is here : http://tomcat.apache.org/tomcat-6.0-doc/logging.html Maybe read it first, and then come back if you have a specific question ? (But then try to specify the question clearly) maven apache wrote: Hi: I wonder how is the tomcat log generated,I mean the log like this; localhost_access_log.2010-12-20.txt I want to export the logs to db. Some one suggestion I directly add one Appender http://logging.apache.org/log4j/1.2/apidocs/index.html if tomcat also uses log4j to generate the logs and I have access to the tomcat's log4j config file. More details can be found in this post: http://stackoverflow.com/questions/4486620/randomaccessfile-probelm So I wonder if this is possible? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail:
[Commercial] Part time developer - Delhi / noida
Hello , I am looking for a part time developer for java with struts and hibernate and a good knowledge of mysql preferably open to visit my office in Noida (India), once a week. However i will also consider distant people also. Please someone interested contact me offline with resume and rates. -- Thanks and kind Regards, Abhishek jain
RE: Tomcat Jakarta 1.2.31 ISAPI Reconnector incorrectly sending Content body with HTTP 304 Status
-Original Message- From: Rainer Jung [mailto:rainer.j...@kippdata.de] Sent: Sunday, December 12, 2010 10:23 PM To: users@tomcat.apache.org Subject: Re: Tomcat Jakarta 1.2.31 ISAPI Reconnector incorrectly sending Content body with HTTP 304 Status 10054 is a winsock error code, so in this case we got WSAECONNRESET. Citing from http://msdn.microsoft.com/en-us/library/ms740668%28v=vs.85%29.aspx: Connection reset by peer. An existing connection was forcibly closed by the remote host. This normally results if the peer application on the remote host is suddenly stopped, the host is rebooted, the host or remote network interface is disabled, or the remote host uses a hard close (see setsockopt for more information on the SO_LINGER option on the remote socket). This error may also result if a connection was broken due to keep-alive activity detecting a failure while one or more operations are in progress. Operations that were in progress fail with WSAENETRESET. Subsequent operations fail with WSAECONNRESET. Thanks. I didn't know that 10054 was meant as a winsock error code, although I have seen the 10054 often enough in other (non-http) applications using Winsock. :) Thanks, and Merry Christmas - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
processing of tlds failed -- application still works -- why?
Hi All, I am seeing the error below while deploying a web application on Tomcat 6.0.16. Note that the parser used for processing tlds is Crimson -- I expect Tomcat to use the default Xerces parser to process tlds, but it using Crimson parser that is in a jar in WEB-INF/lib. It seems this issue is related to bug 29936 fixed in 6.0.17: https://issues.apache.org/bugzilla/show_bug.cgi?id=29936 . I don't see this error on Tomcat 6.0.18. Question: My application works fine. The custom tags defined in the tld the parsing failed on still work. Why do the custom tags work when tld parsing failed? Can this error be ignored? What is the purpose of method processTlds? (to create tld cache?) Ref: http://tomcat.apache.org/tomcat-5.5-doc/config/context.html#Standard_Implementation What happens if I set processTlds context attribute to false while tlds are used in the webapp? ERROR [main] (Digester.java:1555) - Parse Fatal Error at line 1 column -1: Relative URI web-jsptaglib_1_1.dtd; can not be resolved without a base URI. org.xml.sax.SAXParseException: Relative URI web-jsptaglib_1_1.dtd; can not be resolved without a base URI. at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3182) at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3176) at org.apache.crimson.parser.Parser2.resolveURI(Parser2.java:2758) at org.apache.crimson.parser.Parser2.maybeExternalID(Parser2.java:2730) at org.apache.crimson.parser.Parser2.maybeDoctypeDecl(Parser2.java:1129) at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:489) at org.apache.crimson.parser.Parser2.parse(Parser2.java:305) at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442) at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1644) at org.apache.catalina.startup.TldConfig.tldScanStream(TldConfig.java:518) at org.apache.catalina.startup.TldConfig.tldScanTld(TldConfig.java:555) at org.apache.catalina.startup.TldConfig.execute(TldConfig.java:295) at org.apache.catalina.core.StandardContext.processTlds(StandardContext.java:4441) Thanks! Satish
Re: Can JSP code be served from a DB instead of files?
On 12/26/2010 2:04 AM, Mark Thomas wrote: Yes. You'll need to extend BaseDirContext in org.apache.naming.resources. For some examples, see FileDirContext and WarDirContext in the same package. Thanks for the pointers, Mark. From what you are saying, this would be a Tomcat-specific solution. I was hoping for something that would work in standard way so it would be portable. While we use Tomcat ourselves, we've had users who run on other containers. I'll take a look though since maybe it's something that can be plugged into other containers, too. David - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Change of email address
contact info is now updated Hope you had a good christmas! Martin Gainty __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. From: m.mcqu...@sympatico.ca To: users@tomcat.apache.org Subject: Change of email address Date: Sat, 25 Dec 2010 09:57:28 -0500 How does one go about changing to a new email address? A new address of m.mcqu...@powergate.ca is in effect Thank-You and Merry christmas Mike - 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.5) Clustering and Load Balancing.
Hi i have testing tomcat clustering on single machine.What i am able to do is i hv 4 tomcat instances 1 work as balancer and 3 as cluster.using Rule.xml in balancer with round robin approach.all requests hits on balancer redirected to on one cluster which is on some different port. when redirecting using sendredirect it display new url that is of cluster.i want some alternate so all request shoud handled at balancer and URL at adress bar not changed. i have tried forward from servelet but that is not accept only realtive URL. regards HArry
Re: tomcat errors starting after upgrade from cent5.3 to 5.5 (/rebuild-jar-repository: error: Could not find)
On Thu, Dec 23, 2010 at 1:06 PM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: list...@elitists.org [mailto:list...@elitists.org] On Behalf Of Frank Even Subject: tomcat errors starting after upgrade from cent5.3 to 5.5 (/rebuild-jar-repository: error: Could not find) Now that we've run the full update, we have this installed: java-1.4.2-gcj-compat-1.4.2.0-40jpp.115 Please, please remove the above. It has no business being installed in any production environment. java-1.6.0-openjdk-1.6.0.0-1.16.b17.el5 java-1.6.0-openjdk-devel-1.6.0.0-1.16.b17.el5 java-sun-jdbc-stdext-2.0.1-1mamba java-sun-jdbc-stdext-javadoc-2.0.1-1mamba Those are not standard Sun/Oracle Java packages, so you're at the mercy of whoever prepared them. tomcat5-5.5.23-0jpp.11.el5_5 tomcat5-common-lib-5.5.23-0jpp.11.el5_5 tomcat5-jasper-5.5.23-0jpp.11.el5_5 tomcat5-jsp-2.0-api-5.5.23-0jpp.11.el5_5 tomcat5-server-lib-5.5.23-0jpp.11.el5_5 tomcat5-servlet-2.4-api-5.5.23-0jpp.11.el5_5 None of the above are standard Tomcat downloads - you have third-party repackaged versions of Tomcat installed, and need to consult with the repackager for support. Real Tomcat downloads are available here: http://tomcat.apache.org/download-55.cgi http://tomcat.apache.org/download-60.cgi http://tomcat.apache.org/download-70.cgi Starting tomcat5: /usr/bin/rebuild-jar-repository: error: Could not find jdbc-stdext Java extension for this JVM /usr/bin/rebuild-jar-repository: error: Could not find jndi Java extension for this JVM /usr/bin/rebuild-jar-repository: error: Some detected jars were not found for this jvm /usr/bin/rebuild-jar-repository: error: Could not find jaas Java extension for this JVM /usr/bin/rebuild-jar-repository: error: Some detected jars were not found for this jvm None of the above error messages come from Tomcat itself. What they do come from is not clear. - Chuck All of this is out of CentOS repositories and I'm limited to sticking with what is in the repositories. If you have any guidance with what I am working with, it would be greatly appreciated. I do appreciate the input that you have given thoughdoes give me a couple ideas on hunting with what I have. Thanks! - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org