Re: slow servlet filter for ByteArrayOutputStream response Wrapper
On 01/06/2010 03:53, Manny Mondeo wrote: Hi , I have written a filter that strips the response of some html tags. The filter is working and executing around 30milliseconds. The problem is that the request takes around 30 seconds to load this in a browser. The filter gets executed fast but the status bar in the browser does not complete and the page gets struck to about 25 seconds before the response comes and gets rendered. That usually means the content length header isn't set correctly. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
JAAS Realm Authentication with Kerberos
Hello, I’ve been following this fairly self-explanatory document on Kerberos authentication against an AD. If I hard-code the u...@realm in the web.xml file, authentication is successful. However obviously what one really wants is the actual user credentials as stored in the Principals class, javax.security.auth.kerberos.KerberosPrincipal, in the web.xml for each Subject authenticating, but I’m a bit lost as to how to get that information from the class into the web.xml. Any ideas would be appreciated? ( http://wiki.wsmoak.net/cgi-bin/wiki.pl?action=browsediff=1id=TomcatKerberosConfigOnly) auth-constraint role-nameu...@realm/role-name /auth-constraint Regards, Geofrey.
AW: Logger / Context
Hello, thank you for your reply but I do not manage to get my desired result. We have several axis*** servlets installed in /webapps of Tomcat 6.0*. (Let's call it axis1 to axis100 for this explanation.) In Tomcat 5.0* we had different contexts with loggers defined in server.xml, thus the stdout was redirected to the files configured in this loggers. This configuration is not proposed and also not supported in Tomcat 6. == We have tried a lot of different things but I never managed to redirect my stdout from localhost.Date.log to a localhost_axis1.Date.log file. Does anyone has a hint for me, where to configure that or how? Thanks in advance STefan -Ursprüngliche Nachricht- Von: Pid * [mailto:p...@pidster.com] Gesendet: Montag, 31. Mai 2010 16:13 An: Tomcat Users List Betreff: Re: Logger / Context On 31 May 2010, at 12:29, Stefan Rainer s.rai...@teamaxess.com wrote: Hello, we've been using context + logger for redirecting stdout-logs from different servlets to different folders in tomcat 5.0.*: Context docBase=axis path=/axis reloadable=true swallowOutput=true Logger className=org.apache.catalina.logger.FileLogger directory=logs/axis/ prefix=StdOut_axis_ suffix=.log timestamp=true/ /Context After upgrading to tomcat 6.*, this log redirects does not work anymore. Has anyone a hint or a link to some information how this could be done in Tomcat 6? Configuration details have changed since 5.0, please read the docs for Context, Host (and DataSource if applicable). The Logger element is no longer used. The AccessLogValve is now used for request logging. You must configure your own logging for in-app logs, e.g. Log4j. p thanks, stefan - 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: Gracefull restart of tomcat
Hello *, Manager application is not installed on the system. You mentioned that it depends on the configuration. Configuration of tomcat which is used is delivered by OS. In the /etc/tomcat5/base/Catalina/localhost is only relevant XML file. which contains path and docbase where tomcat can find servlets and other jar files. War files are not used. Only jar files with web.xml files. 2010/5/31 Pid p...@pidster.com On 31/05/2010 11:40, Petr Hracek wrote: Dear users, I would like to ask you on the some thing which regards to the application deployment and neccessary restart of tomcat5. Tomcat 5? That's pretty old, and not supported any more. When I am some servlet which are run under tomcat and I have build up the new jar files for my application is it enought to copy this file to my location without neccessary restart of tomcat? Depends on your configuration. Which you haven't posted. Is there any gracefull restart of tomcat like in apache2? Is there any mechanishm how to update servlets when tomcat is already running so that tomcat 5 will not be restarted and new servlets will be loaded? You can update/replace the war file. This may trigger an application restart, depending on your configuration. The manager application can also be used to update and restart web applications. p -- Best Regards / S pozdravem Petr Hracek
Re: AW: Logger / Context
On 1 Jun 2010, at 09:08, Stefan Rainer s.rai...@teamaxess.com wrote: Hello, thank you for your reply but I do not manage to get my desired result. We have several axis*** servlets installed in /webapps of Tomcat 6.0*. (Let's call it axis1 to axis100 for this explanation.) In Tomcat 5.0* we had different contexts with loggers defined in server.xml, thus the stdout was redirected to the files configured in this loggers. This configuration is not proposed and also not supported in Tomcat 6. Yes. So why are you trying to force it? == We have tried a lot of different things but I never managed to redirect my stdout from localhost.Date.log to a localhost_axis1.Date.log file. Does anyone has a hint for me, where to configure that or how? As I said, you must configure your own in-app logging. Log4j, with or without commons-logging, Java logging (or Tomcat's version). The Axis site will likely have info about configuring logging in newer versions of Tomcat. p Thanks in advance STefan -Ursprüngliche Nachricht- Von: Pid * [mailto:p...@pidster.com] Gesendet: Montag, 31. Mai 2010 16:13 An: Tomcat Users List Betreff: Re: Logger / Context On 31 May 2010, at 12:29, Stefan Rainer s.rai...@teamaxess.com wrote: Hello, we've been using context + logger for redirecting stdout-logs from different servlets to different folders in tomcat 5.0.*: Context docBase=axis path=/axis reloadable=true swallowOutput=true Logger className=org.apache.catalina.logger.FileLogger directory=logs/axis/ prefix=StdOut_axis_ suffix=.log timestamp=true/ /Context After upgrading to tomcat 6.*, this log redirects does not work anymore. Has anyone a hint or a link to some information how this could be done in Tomcat 6? Configuration details have changed since 5.0, please read the docs for Context, Host (and DataSource if applicable). The Logger element is no longer used. The AccessLogValve is now used for request logging. You must configure your own logging for in-app logs, e.g. Log4j. p thanks, stefan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: slow servlet filter for ByteArrayOutputStream response Wrapper
2010/6/1 Manny Mondeo manny...@yahoo.com: httpRes.setContentLength(content.toString().length()); Also, the above, or simplier content.length(), will give you the length measured in characters, but Content-Length must be the length measured in bytes. For a multi-byte charset such as UTF-8 those are certainly not the same. (Unless all your characters are 7-bit). httpRes.setContentType( text/html; charset=UTF-8 ) ; out.write(content); out.flush(); out.close(); } Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: AW: Logger / Context
Hi Pid, Am Dienstag, den 01.06.2010, 10:40 +0100 schrieb Pid *: On 1 Jun 2010, at 09:08, Stefan Rainer s.rai...@teamaxess.com wrote: Hello, thank you for your reply but I do not manage to get my desired result. We have several axis*** servlets installed in /webapps of Tomcat 6.0*. (Let's call it axis1 to axis100 for this explanation.) In Tomcat 5.0* we had different contexts with loggers defined in server.xml, thus the stdout was redirected to the files configured in this loggers. This configuration is not proposed and also not supported in Tomcat 6. Yes. So why are you trying to force it? I think he wants stdout from different contexts redirected to the standard logger of those contexts. That should be possible using swallowOutput=true in the context files of the webapps. The second thing he is struggling with are the changes with respect to logging from tomcat 5 to tomcat 6. For that I recommended reading http://tomcat.apache.org/tomcat-6.0-doc/logging.html (regretfully in a private mail, since reply-to headers were set to him instead of list). The combination of those two should get him every bit of stdout of his webapps in dedicated log-files. Bye Felix == We have tried a lot of different things but I never managed to redirect my stdout from localhost.Date.log to a localhost_axis1.Date.log file. Does anyone has a hint for me, where to configure that or how? As I said, you must configure your own in-app logging. Log4j, with or without commons-logging, Java logging (or Tomcat's version). The Axis site will likely have info about configuring logging in newer versions of Tomcat. p Thanks in advance STefan -Ursprüngliche Nachricht- Von: Pid * [mailto:p...@pidster.com] Gesendet: Montag, 31. Mai 2010 16:13 An: Tomcat Users List Betreff: Re: Logger / Context On 31 May 2010, at 12:29, Stefan Rainer s.rai...@teamaxess.com wrote: Hello, we've been using context + logger for redirecting stdout-logs from different servlets to different folders in tomcat 5.0.*: Context docBase=axis path=/axis reloadable=true swallowOutput=true Logger className=org.apache.catalina.logger.FileLogger directory=logs/axis/ prefix=StdOut_axis_ suffix=.log timestamp=true/ /Context After upgrading to tomcat 6.*, this log redirects does not work anymore. Has anyone a hint or a link to some information how this could be done in Tomcat 6? Configuration details have changed since 5.0, please read the docs for Context, Host (and DataSource if applicable). The Logger element is no longer used. The AccessLogValve is now used for request logging. You must configure your own logging for in-app logs, e.g. Log4j. p thanks, stefan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
AW: AW: Logger / Context
Hello, thank you, i managed to get exactly what I wanted with the gloabal logging.properties! BUT ANOTHER QUESTION: I would like to addionally compress (zip) old logs and delete them after (e.g.) 30 days. Is there any existing automatism in tonmcat / java logging? (Using Tomcat 6 on Windows Server machines) Thank you very much for your efforts! Regards, STefan -Ursprüngliche Nachricht- Von: Felix Schumacher [mailto:felix.schumac...@internetallee.de] Gesendet: Dienstag, 1. Juni 2010 10:16 An: Stefan Rainer Betreff: Re: AW: Logger / Context Am Dienstag, den 01.06.2010, 10:08 +0200 schrieb Stefan Rainer: Hello, thank you for your reply but I do not manage to get my desired result. We have several axis*** servlets installed in /webapps of Tomcat 6.0*. (Let's call it axis1 to axis100 for this explanation.) In Tomcat 5.0* we had different contexts with loggers defined in server.xml, thus the stdout was redirected to the files configured in this loggers. This configuration is not proposed and also not supported in Tomcat 6. swallowOutput should work to redirect stdout from your servlets into the standard tomcat logger. But that has changed. Read http://tomcat.apache.org/tomcat-6.0-doc/logging.html for configuring it. There are basically two ways to accomplish it. 1. create or modify a logging.properties inside your WEB-INF/classes dir 2. modify the global logging.properties inside $CATALINA_BASE/conf Bye Felix == We have tried a lot of different things but I never managed to redirect my stdout from localhost.Date.log to a localhost_axis1.Date.log file. Does anyone has a hint for me, where to configure that or how? Thanks in advance STefan -Ursprüngliche Nachricht- Von: Pid * [mailto:p...@pidster.com] Gesendet: Montag, 31. Mai 2010 16:13 An: Tomcat Users List Betreff: Re: Logger / Context On 31 May 2010, at 12:29, Stefan Rainer s.rai...@teamaxess.com wrote: Hello, we've been using context + logger for redirecting stdout-logs from different servlets to different folders in tomcat 5.0.*: Context docBase=axis path=/axis reloadable=true swallowOutput=true Logger className=org.apache.catalina.logger.FileLogger directory=logs/axis/ prefix=StdOut_axis_ suffix=.log timestamp=true/ /Context After upgrading to tomcat 6.*, this log redirects does not work anymore. Has anyone a hint or a link to some information how this could be done in Tomcat 6? Configuration details have changed since 5.0, please read the docs for Context, Host (and DataSource if applicable). The Logger element is no longer used. The AccessLogValve is now used for request logging. You must configure your own logging for in-app logs, e.g. Log4j. p thanks, stefan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Gracefull restart of tomcat
On 01/06/2010 11:31, Petr Hracek wrote: Hello *, I have make a really big error. Tomcat which is installed on the our systems is: tomcat5-5.5.27-0.8.39 If I have in /etc/tomcat5/base/Catalina/localhost file like foo.xml wich referes to /opt/foo/servlet. After uploading new jar files to /opt/foo/servlet how I can tell to tomcat that servlet has to be reloaded. Perhaps I need to be more specific: *post your config files to the list*. p Thanks for your responses Best Regards Petr Hracek 2010/6/1 Pid * p...@pidster.com mailto:p...@pidster.com On 1 Jun 2010, at 10:01, Petr Hracek phrac...@gmail.com mailto:phrac...@gmail.com wrote: Hello *, Manager application is not installed on the system. You mentioned that it depends on the configuration. Configuration of tomcat which is used is delivered by OS. In the /etc/tomcat5/base/Catalina/localhost is only relevant XML file. If you know which config files are relevant you already know the answer to your problem, no? You should upgrade to a newer version of Tomcat - 5.0 is very very old. p which contains path and docbase where tomcat can find servlets and other jar files. War files are not used. Only jar files with web.xml files. 2010/5/31 Pid mailto:p...@pidster.comp...@pidster.com mailto:p...@pidster.com On 31/05/2010 11:40, Petr Hracek wrote: Dear users, I would like to ask you on the some thing which regards to the application deployment and neccessary restart of tomcat5. Tomcat 5? That's pretty old, and not supported any more. When I am some servlet which are run under tomcat and I have build up the new jar files for my application is it enought to copy this file to my location without neccessary restart of tomcat? Depends on your configuration. Which you haven't posted. Is there any gracefull restart of tomcat like in apache2? Is there any mechanishm how to update servlets when tomcat is already running so that tomcat 5 will not be restarted and new servlets will be loaded? You can update/replace the war file. This may trigger an application restart, depending on your configuration. The manager application can also be used to update and restart web applications. p -- Best Regards / S pozdravem Petr Hracek -- Best Regards / S pozdravem Petr Hracek signature.asc Description: OpenPGP digital signature
Re: Gracefull restart of tomcat
Hello *, my context file foo.xml is: ?xml version='1.0' encoding='utf-8'? Context path=/foo docBase=/opt/foo/servlet allowLinking=true /Context my server.xml file is: 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 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 If more config files will be neccessary I will provide. 2010/6/1 Pid p...@pidster.com On 01/06/2010 11:31, Petr Hracek wrote: Hello *, I have make a really big error. Tomcat which is installed on the our systems is: tomcat5-5.5.27-0.8.39 If I have in /etc/tomcat5/base/Catalina/localhost file like foo.xml wich referes to /opt/foo/servlet. After uploading new jar files to /opt/foo/servlet how I can tell to tomcat that servlet has to be reloaded. Perhaps I need to be more specific: *post your config files to the list*. p Thanks for your responses Best Regards Petr Hracek 2010/6/1 Pid * p...@pidster.com mailto:p...@pidster.com On 1 Jun 2010, at 10:01, Petr Hracek phrac...@gmail.com mailto:phrac...@gmail.com wrote: Hello *, Manager application is not installed on the system. You mentioned that it depends on the configuration. Configuration of tomcat which is used is delivered by OS. In the /etc/tomcat5/base/Catalina/localhost is only relevant XML file. If you know which config files are relevant you already know the answer to your problem, no? You should upgrade to a newer version of Tomcat - 5.0 is very very old. p which contains path and docbase where tomcat can find servlets and other jar files. War files are not used. Only jar files with web.xml files. 2010/5/31 Pid mailto:p...@pidster.comp...@pidster.com mailto:p...@pidster.com On 31/05/2010 11:40, Petr Hracek wrote: Dear users, I would like to ask you on the some thing which regards to the application deployment and neccessary restart of tomcat5. Tomcat 5? That's pretty old, and not supported any more. When I am some servlet which are run under tomcat and I have build up the new jar files for my application is it enought to copy this file to my location without neccessary restart of tomcat? Depends on your configuration. Which you haven't posted. Is there any gracefull restart of tomcat like in apache2? Is there any mechanishm how to update servlets when tomcat is already running so that tomcat 5 will not be restarted and new servlets will be loaded? You can update/replace the war file. This may trigger an application restart, depending on your configuration. The manager application can also be used to update and restart web applications. p -- Best Regards / S pozdravem Petr Hracek -- Best Regards / S pozdravem Petr Hracek -- Best Regards / S pozdravem Petr Hracek
How do we configure tomcat on IPv6 machine?
Hi, I have install tomcat 6 and check my pc have support ipv6 . I can see It works! page through http://127.0.0.1 :8080 http://127.0.0.1%20:8080 , but I can't See the page through my ipv6 address ? How do we configure tomcat on IPv6 machine? What changes need to be done? I am install tomcat 6 Thanks, Tomcat user ! *
Problems after upgrading to Tomcat6
Dear list I have recently been running Tomcat 5 on my server, without problems. After an upgrade to Tomcat 6, however I get errors. During the upgrade I manually removed all the Tomcat 5 packages, and dependent packages before I installed new Tomcat 6 packages from the jpackage.org repo. The system is a Centos 5 system. This is the error messages: From /var/log/tomcat6/catalina.out when running service tomcat6 start: WARNING: error instantiating 'org.apache.juli.ClassLoaderLogManager' referenced by java.util.logging.manager, class not found java.lang.ClassNotFoundException: org.apache.juli.ClassLoaderLogManager not found No stacktrace available WARNING: error instantiating '1catalina.org.apache.juli.FileHandler,' referenced by handlers, class not found java.lang.ClassNotFoundException: 1catalina.org.apache.juli.FileHandler, No stacktrace available Exception during runtime initialization java.lang.ExceptionInInitializerError No stacktrace available Caused by: java.lang.NullPointerException No stacktrace available Then Tomcat dies. Running tomcat6-digest with root user gives: SEVERE: Exception creating instance of org.apache.catalina.realm.RealmBase java.lang.ClassNotFoundException: org.apache.catalina.realm.RealmBase not found in org.apache.catalina.loader.StandardClassLoader{urls=[], parent=gnu.gcj.runtime.SystemClassLoader{urls=[file:/usr/share/java/comm ons-daemon.jar,file:/usr/share/java/tomcat6/catalina.jar,file:/usr/share /java/servlet.jar,file:./,file:/usr/share/tomcat6/bin/bootstrap.jar,file :/usr/share/tomcat6/bin/tomcat-juli.jar], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}} at java.net.URLClassLoader.findClass(libgcj.so.7rh) at java.lang.ClassLoader.loadClass(libgcj.so.7rh) at java.lang.ClassLoader.loadClass(libgcj.so.7rh) at org.apache.catalina.startup.Tool.main(Tool.java:197) Can someone give me a hint about how to proceed here? --- Mvh David Karlsen
Re: FW: How do we configure tomcat on IPv6 machine?
On 01/06/2010 13:19, stefan.saye wrote: Hi, I have install tomcat 6 and check my pc have support ipv6 . I can see It works! page through http://127.0.0.1 :8080 http://127.0.0.1%20:8080 , but I can't See the page through my ipv6 address ? How do we configure tomcat on IPv6 machine? What changes need to be done? I am install tomcat 6 Thanks, Tomcat user ! Tomcat 6.0.what? JVM, OS? What is your Connector config in server.xml? Which ipv6 address are you trying? Which browser are you using? p (P.S. Sending two identical emails 8 minutes apart is not necessary) signature.asc Description: OpenPGP digital signature
Re: Problems after upgrading to Tomcat6
On 01/06/2010 13:20, David Karlsen wrote: Dear list I have recently been running Tomcat 5 on my server, without problems. After an upgrade to Tomcat 6, however I get errors. During the upgrade I manually removed all the Tomcat 5 packages, and dependent packages before I installed new Tomcat 6 packages from the jpackage.org repo. The system is a Centos 5 system. This is the error messages: From /var/log/tomcat6/catalina.out when running service tomcat6 start: WARNING: error instantiating 'org.apache.juli.ClassLoaderLogManager' referenced by java.util.logging.manager, class not found java.lang.ClassNotFoundException: org.apache.juli.ClassLoaderLogManager not found No stacktrace available WARNING: error instantiating '1catalina.org.apache.juli.FileHandler,' referenced by handlers, class not found java.lang.ClassNotFoundException: 1catalina.org.apache.juli.FileHandler, No stacktrace available Exception during runtime initialization java.lang.ExceptionInInitializerError No stacktrace available Caused by: java.lang.NullPointerException No stacktrace available Then Tomcat dies. Running tomcat6-digest with root user gives: SEVERE: Exception creating instance of org.apache.catalina.realm.RealmBase java.lang.ClassNotFoundException: org.apache.catalina.realm.RealmBase not found in org.apache.catalina.loader.StandardClassLoader{urls=[], parent=gnu.gcj.runtime.SystemClassLoader{urls=[file:/usr/share/java/comm ons-daemon.jar,file:/usr/share/java/tomcat6/catalina.jar,file:/usr/share /java/servlet.jar,file:./,file:/usr/share/tomcat6/bin/bootstrap.jar,file :/usr/share/tomcat6/bin/tomcat-juli.jar], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}} at java.net.URLClassLoader.findClass(libgcj.so.7rh) at java.lang.ClassLoader.loadClass(libgcj.so.7rh) at java.lang.ClassLoader.loadClass(libgcj.so.7rh) at org.apache.catalina.startup.Tool.main(Tool.java:197) Can someone give me a hint about how to proceed here? Download a Tomcat binary from tomcat.apache.org and use that instead? p signature.asc Description: OpenPGP digital signature
RE: FW: How do we configure tomcat on IPv6 machine?
Using CATALINA_BASE: /usr/share/tomcat6 Using CATALINA_HOME: /usr/share/tomcat6 Using CATALINA_TMPDIR: /usr/share/tomcat6/temp Using JRE_HOME:/usr Using CLASSPATH: /usr/share/tomcat6/bin/bootstrap.jar Server version: Apache Tomcat/6.0.24 Server built: March 31 2010 0917 Server number: ...0 OS Name:Linux OS Version: 2.6.32-21-generic Architecture: amd64 JVM Version:1.6.0_18-b18 JVM Vendor: Sun Microsystems Inc. Server.xml : ?xml version='1.0' encoding='utf-8'? !-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -- !-- Note: A Server is not itself a Container, so you may not define subcomponents such as Valves at this level. Documentation at /docs/config/server.html -- Server port=8005 shutdown=SHUTDOWN !--APR library loader. Documentation at /docs/apr.html -- !-- Listener className=org.apache.catalina.core.AprLifecycleListener SSLEngine=on / -- !--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html -- Listener className=org.apache.catalina.core.JasperListener / !-- Prevent memory leaks due to use of particular java/javax APIs-- Listener className=org.apache.catalina.core.JreMemoryLeakPreventionListener / !-- JMX Support for the Tomcat server. Documentation at /docs/non-existent.html -- Listener className=org.apache.catalina.mbeans.ServerLifecycleListener / Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener / !-- Global JNDI resources Documentation at /docs/jndi-resources-howto.html -- GlobalNamingResources !-- Editable user database that can also be used by UserDatabaseRealm to authenticate users -- Resource name=UserDatabase auth=Container type=org.apache.catalina.UserDatabase description=User database that can be updated and saved factory=org.apache.catalina.users.MemoryUserDatabaseFactory pathname=conf/tomcat-users.xml / /GlobalNamingResources !-- A Service is a collection of one or more Connectors that share a single Container Note: A Service is not itself a Container, so you may not define subcomponents such as Valves at this level. Documentation at /docs/config/service.html -- Service name=Catalina !--The connectors can use a shared executor, you can define one or more named thread pools-- !-- Executor name=tomcatThreadPool namePrefix=catalina-exec- maxThreads=150 minSpareThreads=4/ -- !-- A Connector represents an endpoint by which requests are received and responses are returned. Documentation at : Java HTTP Connector: /docs/config/http.html (blocking non-blocking) Java AJP Connector: /docs/config/ajp.html APR (HTTP/AJP) Connector: /docs/apr.html Define a non-SSL HTTP/1.1 Connector on port 8080 -- Connector port=8080 protocol=HTTP/1.1 connectionTimeout=2 URIEncoding=UTF-8 redirectPort=8443 / !-- A Connector using the shared thread pool-- !-- Connector executor=tomcatThreadPool port=8080 protocol=HTTP/1.1 connectionTimeout=2 redirectPort=8443 / -- !-- Define a SSL HTTP/1.1 Connector on port 8443 This connector uses the JSSE configuration, when using APR, the connector should be using the OpenSSL style configuration described in the APR documentation -- !-- Connector port=8443 protocol=HTTP/1.1 SSLEnabled=true maxThreads=150 scheme=https secure=true clientAuth=false sslProtocol=TLS / -- !-- Define an AJP 1.3 Connector on port 8009 -- !-- Connector port=8009 protocol=AJP/1.3 redirectPort=8443 / -- !-- An Engine represents the entry point (within Catalina) that processes every request. The Engine implementation for Tomcat stand alone analyzes the HTTP headers included with the request, and passes them on to the appropriate Host (virtual host). Documentation at /docs/config/engine.html -- !-- You should set jvmRoute to support load-balancing via AJP ie : Engine name=Catalina
Re: FW: How do we configure tomcat on IPv6 machine?
On 01/06/2010 13:57, stefan.saye wrote: Using CATALINA_BASE: /usr/share/tomcat6 Using CATALINA_HOME: /usr/share/tomcat6 Using CATALINA_TMPDIR: /usr/share/tomcat6/temp Using JRE_HOME:/usr Using CLASSPATH: /usr/share/tomcat6/bin/bootstrap.jar Server version: Apache Tomcat/6.0.24 Server built: March 31 2010 0917 Server number: ...0 OS Name:Linux OS Version: 2.6.32-21-generic Architecture: amd64 JVM Version:1.6.0_18-b18 JVM Vendor: Sun Microsystems Inc. OK. Server.xml : ?xml version='1.0' encoding='utf-8'? Server port=8005 shutdown=SHUTDOWN Listener className=org.apache.catalina.core.JasperListener / Listener className=org.apache.catalina.core.JreMemoryLeakPreventionListener / /docs/non-existent.html -- Listener className=org.apache.catalina.mbeans.ServerLifecycleListener / Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener / GlobalNamingResources 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 Connector port=8080 protocol=HTTP/1.1 connectionTimeout=2 URIEncoding=UTF-8 redirectPort=8443 / 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 OK Any idea ?? Can you answer the other two questions? p -Original Message- From: Pid [mailto:p...@pidster.com] Sent: Tuesday, June 01, 2010 8:39 PM To: Tomcat Users List Subject: Re: FW: How do we configure tomcat on IPv6 machine? On 01/06/2010 13:19, stefan.saye wrote: Hi, I have install tomcat 6 and check my pc have support ipv6 . I can see It works! page through http://127.0.0.1 :8080 http://127.0.0.1%20:8080 , but I can't See the page through my ipv6 address ? How do we configure tomcat on IPv6 machine? What changes need to be done? I am install tomcat 6 Thanks, Tomcat user ! Tomcat 6.0.what? JVM, OS? What is your Connector config in server.xml? Which ipv6 address are you trying? Which browser are you using? p (P.S. Sending two identical emails 8 minutes apart is not necessary) signature.asc Description: OpenPGP digital signature
RE: Problems after upgrading to Tomcat6
From: David Karlsen [mailto:dav...@delonic.no] Subject: Problems after upgrading to Tomcat6 parent=gnu.gcj.runtime.SystemClassLoader You need to use a real JVM (HotSpot, JRockit, IBM), not a toy one. Remove gcj from your system as quickly as possible. - 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: Gracefull restart of tomcat
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Petr, On 6/1/2010 6:59 AM, Petr Hracek wrote: my context file foo.xml is: ?xml version='1.0' encoding='utf-8'? Context path=/foo docBase=/opt/foo/servlet allowLinking=true The path attribute is illegal in all versions of Tomcat when using an external XML file: remove it. Where does foo.xml reside on the filesystem? More specifically, into what Host is it deployed? 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 With autoDeploy=true, you ought to just be able to update your .class or .jar files and Tomcat will automatically restart the webapp. Note that updating static content will not cause Tomcat to reload, and there have been reports of some people having problems with cached copies of files. It's always best to trigger an application restart one way or another. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkwFCikACgkQ9CaO5/Lv0PDTewCgs6RXpW/DT9MzYfUykr5qS22p oRsAoJmNA7djnyJ6WkjFYgnnk35OrIdM =IQSB -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How do we configure tomcat on IPv6 machine?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Stefan, On 6/1/2010 8:11 AM, stefan.saye wrote: I have install tomcat 6 and check my pc have support ipv6 . I can see It works! page through http://127.0.0.1 :8080 http://127.0.0.1%20:8080 , but I can't See the page through my ipv6 address ? How do we configure tomcat on IPv6 machine? What changes need to be done? I am install tomcat 6 Do you think it would be helpful to post your configuration files? That would certainly do a long way toward identifying the problem. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkwFCqUACgkQ9CaO5/Lv0PBCJACbBz6ilImbq/dol7KPrD3xIxAc nRgAoK/yPsnQTGYUalMd3epwx9PzSImR =8tkU -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Gracefull restart of tomcat
From: Christopher Schultz [mailto:ch...@christopherschultz.net] Subject: Re: Gracefull restart of tomcat With autoDeploy=true, you ought to just be able to update your .class or .jar files and Tomcat will automatically restart the webapp. Not quite; files to be monitored for changes have to be specified in a WatchedResource element nested inside the webapp's Context element. By default, this is only WEB-INF/web.xml, so a touch of that file should trigger a restart of the webapp without taking Tomcat down. - 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 do we configure tomcat on IPv6 machine?
On 01/06/2010 14:27, Christopher Schultz wrote: Stefan, On 6/1/2010 8:11 AM, stefan.saye wrote: I have install tomcat 6 and check my pc have support ipv6 . I can see It works! page through http://127.0.0.1 :8080 http://127.0.0.1%20:8080 , but I can't See the page through my ipv6 address ? How do we configure tomcat on IPv6 machine? What changes need to be done? I am install tomcat 6 Do you think it would be helpful to post your configuration files? That would certainly do a long way toward identifying the problem. (Got them in the other thread, with a similar title) p -chris - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org signature.asc Description: OpenPGP digital signature
Re: Gracefull restart of tomcat
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chuck, On 6/1/2010 9:33 AM, Caldarale, Charles R wrote: From: Christopher Schultz [mailto:ch...@christopherschultz.net] Subject: Re: Gracefull restart of tomcat With autoDeploy=true, you ought to just be able to update your .class or .jar files and Tomcat will automatically restart the webapp. Not quite; files to be monitored for changes have to be specified in a WatchedResource element nested inside the webapp's Context element. By default, this is only WEB-INF/web.xml, so a touch of that file should trigger a restart of the webapp without taking Tomcat down. My experience is that if a .class file has been loaded by the WebappClassLoader and it gets updated, the webapp is reloaded. The same is true of a .class file loaded from a .jar file in WEB-INF/classes: if the .jar file changes, the webapp is auto-reloaded. I can observe this behavior in both 5.5(.25/.26/.27/.28) and 6.0(.26). - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkwFETIACgkQ9CaO5/Lv0PDEhQCeJLBfvpfIjF/a3NEYeCRRegkX O/kAn0R05Ze3qyUrqHQTsTCFRlE+B3CL =SYs8 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: AW: AW: Logger / Context
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Stefan, On 6/1/2010 6:38 AM, Stefan Rainer wrote: thank you, i managed to get exactly what I wanted with the [global] logging.properties! Great! BUT ANOTHER QUESTION: I would like to addionally compress (zip) old logs and delete them after (e.g.) 30 days. Is there any existing automatism in tonmcat / java logging? (Using Tomcat 6 on Windows Server machines) Tomcat does not have any provision to do that. Most *NIX systems can run a package called logrotate that does stuff like this. Try Googling for logrotate windows and see what you get. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkwFEeMACgkQ9CaO5/Lv0PC4OgCeNbXRZD573TWvCtCSdGrfrGro sHMAoLvo/7tyoQjd/J0c1ItN5+fE/BGN =Uswz -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: problems at thejarbar.org
According to the stack trace I posted, is it possible that hibernate could also be a seperate casue of transient mysql exception or does this only need to be fixed in tomcat? -- From: Mark Eggers its_toas...@yahoo.com Sent: Monday, May 31, 2010 11:57 AM To: Tomcat Users List users@tomcat.apache.org Subject: Re: problems at thejarbar.org I think you are running into a MySQL database connection timeout. You can use a MySQL admin interface (command line, PHPAdmin, MySQL Workbench, etc.) to verify the idle connection timeout limit. There have been comments on the web concerning this. One such discussion and a solution are here: http://lists.mysql.com/java/6578 The explanation of the parameters given in the above link can be found here: http://dev.mysql.com/doc/refman/5.0/en/connector-j-reference-configuration-properties.html Based on those two references, you'll need to modify your Realm database URL: connectionURL=jdbc:mysql://localhost:3306/yucca123_thejarbarautoReconnect=truereconnectAtTxEnd=true Note, I have not tried this, so test before production. The other solution mentioned is to use a DataSource Realm. This requires you to configure a JNDI datasource describing your database connection as well as the DataSource Realm. You can add all of this information in your web application's META-INF/context.xml file if it's application-specific. If this is a host or service-based definition, then you'll have to define the JNDI resources in a GlobalNamingResources element. See the following: http://tomcat.apache.org/tomcat-6.0-doc/config/globalresources.html Note the warning that this resource will not be available to an individual web application unless you use a ResourceLink in your META-INF/context.xml file. See the globalresources link above for an example. Since you're using this connection for container managed authentication and authorization, I'm not sure why your web application would need access to this resource. However, it's 3 am, so I may have missed a few points that Chuck, Charles, or Pid will be happy to correct. To summarize - it seems the easiest fix is to add the following properties to your JDBC url: autoReconnect=true reconnectAtTxEnd=true Add them to the end of the URL, connected with ampersands. I hope this gets you up and running. . . . . . just my two cents /mde/ --- On Sun, 5/30/10, Yucca Nel yucca...@live.co.za wrote: From: Yucca Nel yucca...@live.co.za Subject: Re: problems at thejarbar.org To: Tomcat Users List users@tomcat.apache.org Date: Sunday, May 30, 2010, 9:34 AM Yes, but I am using JDBC and followed the setup step by step from tomcat docs ?xml version=1.0 encoding=UTF-8? Server port=9170 Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener/ Listener className=org.apache.catalina.core.JasperListener / Listener className=org.apache.catalina.mbeans.ServerLifecycleListener/ GlobalNamingResources Resource auth=Container description=User database name=UserDatabase type=org.apache.catalina.UserDatabase pathname=conf/tomcat-users.xml factory=org.apache.catalina.users.MemoryUserDatabaseFactory/ /GlobalNamingResources Service name=Catalina Connector port=9670 minSpareThreads=1 address=127.0.0.1 maxThreads=50 maxSpareThreads=3 connectionTimeout=3 protocol=AJP/1.3 /Connector Engine defaultHost=thejarbar.org name=Catalina Realm className=org.apache.catalina.realm.UserDatabaseRealm/Realm className=org.apache.catalina.realm.JDBCRealm driverName=com.mysql.jdbc.Driver connectionURL=jdbc:mysql://localhost:3306/yucca123_thejarbar connectionName=yucca123_tom connectionPassword=myPass userTable=users userNameCol=user_name userCredCol=user_pass userRoleTable=user_roles roleNameCol=role_name/Host appBase=/home/yucca123/public_html name=thejarbar.org Aliaswww.thejarbar.org/Alias Context path=/the_jar_bar Listener className=org.apache.catalina.startup.TldConfig/ /Context Context docBase=/usr/local/tomcat/users/yucca123/tomcat/webapps/manager path=/manager privileged=true reloadable=true Listener className=org.apache.catalina.startup.TldConfig/ ResourceEnvRef name=users type=org.apache.catalina.UserDatabase/ /Context Context docBase=the_jar_bar path= reloadable=true Listener className=org.apache.catalina.startup.TldConfig/ /Context /Host /Engine /Service /Server May be missing something... http://tomcat.apache.org/tomcat-6.0-doc/jndi-resources-howto.html#JDBC%20Data%20Sources This error does not occur every time -- From: Jeff jwi...@cox.net Sent: Sunday, May 30, 2010 5:54 PM To: Tomcat Users List users@tomcat.apache.org Subject: Re:
Re: slow servlet filter for ByteArrayOutputStream response Wrapper
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Konstantin, On 6/1/2010 5:41 AM, Konstantin Kolinko wrote: 2010/6/1 Manny Mondeo manny...@yahoo.com: httpRes.setContentLength(content.toString().length()); Also, the above, or simplier content.length(), will give you the length measured in characters, but Content-Length must be the length measured in bytes. For a multi-byte charset such as UTF-8 those are certainly not the same. (Unless all your characters are 7-bit). I would think that this would be the problem, except that charCount(utf8str) = byteCount(utf8Str), so the worst thing that could happen is that the Content-Length was too /short/, and the browser would either read everything anyway, or ignore the extra bytes. A too-long Content-Type can definitely cause a browser to stall. I like this error better as the cause: //PrintWriter out = httpRes.getWriter(); PrintWriter out = wrapp.getWriter(); Why wrapp.getWriter(); ?? Certainly writing to the buffered response and never to the actual response will not send any data to the browser. :( - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkwFE/UACgkQ9CaO5/Lv0PDnYACgwCosffsg66HpD7f443xYhscx of4An00pZmi8lbb8Ef3PJO+9Kr+k7n87 =q0Fl -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Gracefull restart of tomcat
From: Christopher Schultz [mailto:ch...@christopherschultz.net] Subject: Re: Gracefull restart of tomcat My experience is that if a .class file has been loaded by the WebappClassLoader and it gets updated, the webapp is reloaded. Odd, because I observer no such behavior (just tried it on 6.0.26, Windows Vista), and it's certainly not documented to work that way. Will try it on Linux when I get a chance. - 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: problems at thejarbar.org
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Yucca Nel, On 5/30/2010 1:53 PM, Yucca Nel wrote: Ok I need to keep connection open to avoid exceeption but have found this is deprecated autoReconnect=true can someone provide up to date strategy for dealing with this? Don't use autoReconnect as a parameter to the JDBC driver. Instead, use the validationQuery on the connection pool to have the pool verify that the connection is still valid. MySQL Connector/J even supports a ping query that can gracefully fall-back to driver versions that don't support it. I highly recommend that you: 1. Use a Tomcat-configured DataSource 2. Use a DataSourceRealm coupled with #1 3. Tell Hibernate to use #1 That way, all your db configuration is in one place. Add this parameter to your DataSource configuration (it configures the connection pool): validationQuery=/* ping */ SELECT 1 This will cause the connection pool to execute that query every time a connection is requested from the pool, just to verify that it's properly connected. Your web application should never get a dead connection and therefore shouldn't have to deal with that situation. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkwFFcIACgkQ9CaO5/Lv0PDNJACggJuwEQRRqswYU9awTjda7bM8 /KAAnAuZSd1OPmqV94qEibWHXWMyTW6Y =Rmml -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: SQLNestedException: Cannot create PoolableConnectionFactory
I got a similar error when I inadvertently had the dbcp jar file placed in multiple directories. You might try checking to ensure that it's not placed in more than one folder. -Original Message- From: Pid * [mailto:p...@pidster.com] Sent: Monday, May 31, 2010 9:16 AM To: Tomcat Users List Subject: Re: SQLNestedException: Cannot create PoolableConnectionFactory Is this the right forum for your question? It looks like the db isn't running or isn't accessible. If there's a Tomcat problem, please include exact OS, JVM and Tomcat version numbers. p On 31 May 2010, at 12:30, ennidhi psatishb...@hotmail.com wrote: I am getting this exception. Everything seems to be fine. hibernate config xml: # ?xml version=1.0 encoding=UTF-8? # !DOCTYPE hibernate-configuration PUBLIC # -//Hibernate/Hibernate Configuration DTD 3.0//EN # http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd; # hibernate-configuration # session-factory # !-- Database data source -- # property name=hibernate.connection.datasourcejava:/comp/env/jdbc/iclose- messenger-broker-ds/property # # !-- MySQL -- # !-- property name=hibernate.dialectorg.hibernate.dialect.MySQLDialect/ property-- # !-- MS SQL Server -- # property name=hibernate.dialectorg.hibernate.dialect.SQLServerDialect/ property # # !-- Enable Hibernate's automatic session context management -- # property name=hibernate.current_session_context_classthread/property # # !-- Disable the second-level cache -- # property name=hibernate.cache.use_second_level_cachefalse/property # property name= hibernate.cache.provider_class org.hibernate.cache.NoCacheProvider/property # # !-- Debugging -- # property name=hibernate.show_sqlfalse/property # property name=hibernate.format_sqlfalse/property # # /session-factory # /hibernate-configuration context setting xml: Context path=/iclose-messenger-broker debug=0 !-- MySQL -- !-- Resource name=jdbc/iclose-messenger-broker-ds auth=Container type=javax.sql.DataSource maxActive=100 maxIdle=30 maxWait=1 username=MyUserName password=MyPassword driverClassName=com.mysql.jdbc.Driver url=jdbc:mysql://localhost:3306/iclose-messenger-broker? autoReconnect=true/ / -- !-- Microsoft SQL Server -- Resource name=jdbc/iclose-messenger-broker-ds auth=Container type=javax.sql.DataSource maxActive=100 maxIdle=30 maxWait=1 username=sa password=sa driverClassName=net.sourceforge.jtds.jdbcx.JtdsDataSource url=jdbc:jtds:sqlserver://192.168.90.245:1433/iclose-messenger- broker;appName=iclose-messenger/ / /Context SQL Server DB Name: iclose-messenger-broker Please suggest me here. Exception details:org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Network error IOException: Connection timed out: connect) at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource (BasicDataSource.java:855) at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection (BasicDataSource.java:540) at org.hibernate.connection.DatasourceConnectionProvider.getConnection (DatasourceConnectionProvider.java:69) at org.hibernate.cfg.SettingsFactory.buildSettings (SettingsFactory.java:84) at org.hibernate.cfg.Configuration.buildSettings (Configuration.java:2009) at org.hibernate.cfg.Configuration.buildSessionFactory (Configuration.java:1292) at org.parlinkie.msgsvr.core.dao.DaoSession.buildHibernateSession (DaoSession.java:205) at org.parlinkie.msgsvr.core.dao.DaoSession.clinit (DaoSession.java:143) at org.parlinkie.msgsvr.connector.acord.AcordSoapServlet.initProcessing (AcordSoapServlet.java:182) at org.parlinkie.msgsvr.connector.acord.AcordSoapServlet.init (AcordSoapServlet.java:165) at org.apache.catalina.core.StandardWrapper.loadServlet (StandardWrapper.java:1139) at org.apache.catalina.core.StandardWrapper.load (StandardWrapper.java:966) at org.apache.catalina.core.StandardContext.loadOnStartup (StandardContext.java:3956) at org.apache.catalina.core.StandardContext.start(StandardContext.java: 4230) at org.apache.catalina.core.ContainerBase.addChildInternal (ContainerBase.java:760) at org.apache.catalina.core.ContainerBase.addChild (ContainerBase.java:740) at org.apache.catalina.core.StandardHost.addChild (StandardHost.java:544) at org.apache.catalina.startup.HostConfig.deployDescriptor (HostConfig.java:626) at org.apache.catalina.startup.HostConfig.deployDescriptors (HostConfig.java:553) at org.apache.catalina.startup.HostConfig.deployApps (HostConfig.java:488) at org.apache.catalina.startup.HostConfig.start(HostConfig.java: 1138) at
Re: possible to define/deploy a context but not start it?
On 05/29/2010 08:30 AM, Konstantin Kolinko wrote: 2010/5/29 Pidp...@pidster.com: On 28/05/2010 19:07, Jeff Ramin wrote: Running tomcat 5.5.20. Is there a way to configure tomcat such that it is aware of a webapp (context), but doesn't start it (process requests) when tomcat starts? Kinda. Examine the docs, look at the Host and Context attributes, for 'deployOnStartup', 'autoDeploy' and 'reloadable'. Depending on what you need it might be all-or-nothing situation though. It is possible to turn off auto-deploy (autoDeploy, deployOnStartup), i.e. the webapplication will be present in webapps folder, but it will not be running, nor will it be listed by Tomcat Manager. Deploying a webapplication, though, always starts it. If a webapplication is included as aContext element in server.xml (usually not recommended), it is always deployed and started when server starts, regardless of deployOnStartup option. Besides the documentation, you may also want to look at the archives of this list. deployOnStartup/autoDeploy were discussed several times. Thanks. I just read the thread from a couple weeks ago regarding autoDeploy and deployOnStartup. I'm still not quite sure I can make tomcat do what I want it to, so let me be explicit... I want to start an application via JMX. Thus, tomcat needs to be running, so that the JMX agent is available. But, I don't want my web application to be available until it gets explicitly started as the result of a JMX invocation of a WebModule bean. Does that make sense? Is this possible? I haven't been able to make it work on my dev machine thus far. Thanks! -- Jeff Ramin Software Engineer Singlewire Software 2601 W Beltline Hwy #510 Madison, WI 53713 Phone Direct - 608.661.1172 www.singlewire.com - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: possible to define/deploy a context but not start it?
On 01/06/2010 17:36, Jeff Ramin wrote: On 05/29/2010 08:30 AM, Konstantin Kolinko wrote: 2010/5/29 Pidp...@pidster.com: On 28/05/2010 19:07, Jeff Ramin wrote: Running tomcat 5.5.20. Is there a way to configure tomcat such that it is aware of a webapp (context), but doesn't start it (process requests) when tomcat starts? Kinda. Examine the docs, look at the Host and Context attributes, for 'deployOnStartup', 'autoDeploy' and 'reloadable'. Depending on what you need it might be all-or-nothing situation though. It is possible to turn off auto-deploy (autoDeploy, deployOnStartup), i.e. the webapplication will be present in webapps folder, but it will not be running, nor will it be listed by Tomcat Manager. Deploying a webapplication, though, always starts it. If a webapplication is included as aContext element in server.xml (usually not recommended), it is always deployed and started when server starts, regardless of deployOnStartup option. Besides the documentation, you may also want to look at the archives of this list. deployOnStartup/autoDeploy were discussed several times. Thanks. I just read the thread from a couple weeks ago regarding autoDeploy and deployOnStartup. I'm still not quite sure I can make tomcat do what I want it to, so let me be explicit... I want to start an application via JMX. Thus, tomcat needs to be running, so that the JMX agent is available. But, I don't want my web application to be available until it gets explicitly started as the result of a JMX invocation of a WebModule bean. Does that make sense? Is this possible? I haven't been able to make it work on my dev machine thus far. If you start with deployOnStartup, autoDeploy, reloadable all configured to false in the app's Host and Context you should be able to start Tomcat without any app deployment taking place. Are you able to make this work with a very simple app in a .war file (e.g. one that just contains a single servlet that logs a message on init/destroy/doGet)? N.B. Once it's deployed, you'll have to undeploy it before beginning the test cycle again. p signature.asc Description: OpenPGP digital signature
RE: possible to define/deploy a context but not start it?
From: Jeff Ramin [mailto:jeff.ra...@singlewire.com] Subject: Re: possible to define/deploy a context but not start it? Deploying a webapplication, though, always starts it. If a webapplication is included as aContext element in server.xml (usually not recommended), it is always deployed and started when server starts, regardless of deployOnStartup option. Besides the documentation, you may also want to look at the archives of this list. deployOnStartup/autoDeploy were discussed several times. I want to start an application via JMX. Thus, tomcat needs to be running, so that the JMX agent is available. But, I don't want my web application to be available until it gets explicitly started as the result of a JMX invocation of a WebModule bean. Konstantin already gave you the answer: It is possible to turn off auto-deploy (autoDeploy, deployOnStartup), i.e. the webapplication will be present in webapps folder, but it will not be running, nor will it be listed by Tomcat Manager. Deploying a webapplication, though, always starts it. Your best bet is to leave the application _undeployed_ until you're ready for it, then deploy it. - 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: slow servlet filter for ByteArrayOutputStream response Wrapper
2010/6/1 Christopher Schultz ch...@christopherschultz.net: On 6/1/2010 5:41 AM, Konstantin Kolinko wrote: 2010/6/1 Manny Mondeo manny...@yahoo.com: httpRes.setContentLength(content.toString().length()); Also, the above, or simplier content.length(), will give you the length measured in characters, but Content-Length must be the length measured in bytes. For a multi-byte charset such as UTF-8 those are certainly not the same. (Unless all your characters are 7-bit). I would think that this would be the problem, except that charCount(utf8str) = byteCount(utf8Str), so the worst thing that could happen is that the Content-Length was too /short/, and the browser would either read everything anyway, or ignore the extra bytes. A too-long Content-Type can definitely cause a browser to stall. There is such thing as o.a.coyote.http11.filters.IdentityOutputFilter. If contentLength is set it will prevent sending more than the stated number of bytes (discarding the rest of them). Thus, the data will be trimmed at any HTML construct, or even between bytes comprising a single multibyte character. That is how I read the code: someone should do a test run to be sure. I like this error better as the cause: //PrintWriter out = httpRes.getWriter(); PrintWriter out = wrapp.getWriter(); Why wrapp.getWriter(); ?? Certainly writing to the buffered response and never to the actual response will not send any data to the browser. :( Certainly. Or the code that was posted in not the one that was run. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: possible to define/deploy a context but not start it?
On 06/01/2010 11:45 AM, Pid wrote: On 01/06/2010 17:36, Jeff Ramin wrote: On 05/29/2010 08:30 AM, Konstantin Kolinko wrote: 2010/5/29 Pidp...@pidster.com: On 28/05/2010 19:07, Jeff Ramin wrote: Running tomcat 5.5.20. Is there a way to configure tomcat such that it is aware of a webapp (context), but doesn't start it (process requests) when tomcat starts? Kinda. Examine the docs, look at the Host and Context attributes, for 'deployOnStartup', 'autoDeploy' and 'reloadable'. Depending on what you need it might be all-or-nothing situation though. It is possible to turn off auto-deploy (autoDeploy, deployOnStartup), i.e. the webapplication will be present in webapps folder, but it will not be running, nor will it be listed by Tomcat Manager. Deploying a webapplication, though, always starts it. If a webapplication is included as aContext element in server.xml (usually not recommended), it is always deployed and started when server starts, regardless of deployOnStartup option. Besides the documentation, you may also want to look at the archives of this list. deployOnStartup/autoDeploy were discussed several times. Thanks. I just read the thread from a couple weeks ago regarding autoDeploy and deployOnStartup. I'm still not quite sure I can make tomcat do what I want it to, so let me be explicit... I want to start an application via JMX. Thus, tomcat needs to be running, so that the JMX agent is available. But, I don't want my web application to be available until it gets explicitly started as the result of a JMX invocation of a WebModule bean. Does that make sense? Is this possible? I haven't been able to make it work on my dev machine thus far. If you start with deployOnStartup, autoDeploy, reloadable all configured to false in the app's Host and Context you should be able to start Tomcat without any app deployment taking place. Yes, I've been able to do this. However, given this configuration, the WebModule bean(s) is not available for starting my app via JMX. -- Jeff Ramin Software Engineer Singlewire Software 2601 W Beltline Hwy #510 Madison, WI 53713 Phone Direct - 608.661.1172 www.singlewire.com - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: possible to define/deploy a context but not start it?
On 06/01/2010 11:46 AM, Caldarale, Charles R wrote: From: Jeff Ramin [mailto:jeff.ra...@singlewire.com] Subject: Re: possible to define/deploy a context but not start it? Deploying a webapplication, though, always starts it. If a webapplication is included as aContext element in server.xml (usually not recommended), it is always deployed and started when server starts, regardless of deployOnStartup option. Besides the documentation, you may also want to look at the archives of this list. deployOnStartup/autoDeploy were discussed several times. I want to start an application via JMX. Thus, tomcat needs to be running, so that the JMX agent is available. But, I don't want my web application to be available until it gets explicitly started as the result of a JMX invocation of a WebModule bean. Konstantin already gave you the answer: It is possible to turn off auto-deploy (autoDeploy, deployOnStartup), i.e. the webapplication will be present in webapps folder, but it will not be running, nor will it be listed by Tomcat Manager. Deploying a webapplication, though, always starts it. Your best bet is to leave the application _undeployed_ until you're ready for it, then deploy it. Yes, I've done this. However, I don't see a way to deploy/start my app. If I start jconsole when starting tomcat like this, the WebModule beans I would use to deploy/start my app are not present. -- Jeff Ramin Software Engineer Singlewire Software 2601 W Beltline Hwy #510 Madison, WI 53713 Phone Direct - 608.661.1172 www.singlewire.com - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: possible to define/deploy a context but not start it?
From: Jeff Ramin [mailto:jeff.ra...@singlewire.com] Subject: Re: possible to define/deploy a context but not start it? Yes, I've done this. However, I don't see a way to deploy/start my app. If I start jconsole when starting tomcat like this, the WebModule beans I would use to deploy/start my app are not present. That MBean doesn't get created until an app is deployed. Instead, you should be able to use the Catalina/Deployer MBean (but I haven't gotten it to work yet). As a workaround, you could use the HTTP text interface to the manager webapp. - 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: possible to define/deploy a context but not start it?
On 06/01/2010 01:20 PM, Caldarale, Charles R wrote: From: Jeff Ramin [mailto:jeff.ra...@singlewire.com] Subject: Re: possible to define/deploy a context but not start it? Yes, I've done this. However, I don't see a way to deploy/start my app. If I start jconsole when starting tomcat like this, the WebModule beans I would use to deploy/start my app are not present. That MBean doesn't get created until an app is deployed. Instead, you should be able to use the Catalina/Deployer MBean (but I haven't gotten it to work yet). This would be an acceptable solution. However, like you experienced, the deployer mBean doesn't seem to deploy my app. As a workaround, you could use the HTTP text interface to the manager webapp. I'm trying to avoid running the manager webapp, if at all possible. Thanks. -- Jeff Ramin Software Engineer Singlewire Software 2601 W Beltline Hwy #510 Madison, WI 53713 Phone Direct - 608.661.1172 www.singlewire.com - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
apache2 tomcat6.0.26 mod_jk
Let's say I own two websites. 1) batman.com 2) superman.com I have two web applications hosted in tomcat6 under webapps. 1) /usr/local/tomcat6/webapps/ batman 2) /usr/local/tomcat6/webapps/superman I would like to configure apache in such a way that when I type the url http://www.batman.com the website under /batman should be served. Likewise if I type the url http://www.superman.com the website under /superman should be served. Right now, I can only get it working if I type http://www.batman.com/batmanor http://www.superman.com/superman. My settings are as follows: /etc/apache2/sites-enabled/batman: VirtualHost *:80 ServerAdmin webmas...@localhost ServerName batman.com ServerAlias www.batman.com JkMount / worker1 JkMount /* worker1 ErrorLog /var/log/apache2/error.log LogLevel warn CustomLog /var/log/apache2/access.log combined /VirtualHost /etc/apache2/sites-enabled/superman: VirtualHost *:80 ServerAdmin webmas...@localhost ServerName superman.com ServerAlias www.superman.com JkMount / worker1 JkMount /* worker1 ErrorLog /var/log/apache2/error.log LogLevel warn CustomLog /var/log/apache2/access.log combined /VirtualHost /etc/apache2/worker.properties: # Define worker worker.list=worker1 # Set properties for worker1 worker.worker1.type=ajp13 worker.worker1.host=localhost worker.worker1.port=8009 /etc/apache2/apache2.conf: #Load jk_module LoadModule jk_module /usr/lib/apache2/modules/mod_jk.so # workers.properties path JkWorkersFile /etc/apache2/workers.properties # JK shared memory path JkShmFile /var/log/apache2/mod_jk.shm # JK Log path JkLogFile /var/log/apache2/mod_jk.log # JK log level [debug/error/info] JkLogLevel info # Log Timestamp format JkLogStampFormat [%a %b %d %H:%M:%S %Y] I'm running this on Ubuntu 9.0.4 OS. I'm really stuck. Any help would be much appreciated. Thank you.
apache2 tomcat6.0.26 mod_jk
Let's say I own two websites. 1) batman.com 2) superman.com I have two web applications hosted in tomcat6 under webapps. 1) /usr/local/tomcat6/webapps/ batman 2) /usr/local/tomcat6/webapps/superman I would like to configure apache in such a way that when I type the url http://www.batman.com the website under /batman should be served. Likewise if I type the url http://www.superman.com the website under /superman should be served. Right now, I can only get it working if I type http://www.batman.com/batmanor http://www.superman.com/superman. My settings are as follows: /etc/apache2/sites-enabled/batman: VirtualHost *:80 ServerAdmin webmas...@localhost ServerName batman.com ServerAlias www.batman.com JkMount / worker1 JkMount /* worker1 ErrorLog /var/log/apache2/error.log LogLevel warn CustomLog /var/log/apache2/access.log combined /VirtualHost /etc/apache2/sites-enabled/superman: VirtualHost *:80 ServerAdmin webmas...@localhost ServerName superman.com ServerAlias www.superman.com JkMount / worker1 JkMount /* worker1 ErrorLog /var/log/apache2/error.log LogLevel warn CustomLog /var/log/apache2/access.log combined /VirtualHost /etc/apache2/worker.properties: # Define worker worker.list=worker1 # Set properties for worker1 worker.worker1.type=ajp13 worker.worker1.host=localhost worker.worker1.port=8009 /etc/apache2/apache2.conf: #Load jk_module LoadModule jk_module /usr/lib/apache2/modules/mod_jk.so # workers.properties path JkWorkersFile /etc/apache2/workers.properties # JK shared memory path JkShmFile /var/log/apache2/mod_jk.shm # JK Log path JkLogFile /var/log/apache2/mod_jk.log # JK log level [debug/error/info] JkLogLevel info # Log Timestamp format JkLogStampFormat [%a %b %d %H:%M:%S %Y] I'm running this on Ubuntu 9.0.4 OS. I'm really stuck. Any help would be much appreciated. Thank you.
RE: apache2 tomcat6.0.26 mod_jk
From: Rathna [mailto:gente...@gmail.com] Subject: apache2 tomcat6.0.26 mod_jk Let's say I own two websites. 1) batman.com 2) superman.com I have two web applications hosted in tomcat6 under webapps. 1) /usr/local/tomcat6/webapps/batman 2) /usr/local/tomcat6/webapps/superman Don't know about doing this in httpd (do you really need it?), but for Tomcat, try the following: 1) Create two Host entries in Tomcat's server.xml, one for www.batman.com, one for www.superman.com. 2) Configure a separate appBase directory for each Host. 3) Move the batman webapp to the batman Host appBase directory as ROOT (case sensitive). 4) Likewise, move the superman webapp to the superman Host appBase directory as ROOT. You're done. Details are here: http://tomcat.apache.org/tomcat-6.0-doc/virtual-hosting-howto.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
Out of Memory exception (hotspot compilation)
Hi, I noticed in recent emails that Leon Kolchinsky was running Tomcat and Java requested 2GB of memory unexpectedly then died due to an out of memory exception. Bizarrely, the same thing happened to me today with very similar symptoms. Specifically, the JVM requested 8GB of memory while hotspot was trying to compile the exact same Velocity/Foreach method as Leon's example. I'm running 64 bit JDK 1.6.0_18-b07 / Tomcat 6.0.24 / APR 1.1.19. I wanted to highlight this, (someone was talking about posting a bug report). Since it's the exact same method, I'm guessing the Velocity method triggers a bug in the hotspot compilation. Note that we've been running this configuration for 5 months and I haven't seen this previously, so it's probably rare. Excerpt from hs_err -- java.lang.OutOfMemoryError: requested 8589934608 bytes for Chunk::new. Out of swap space? Current thread (0x5449c800): JavaThread CompilerThread0 daemon [_thread_in_native, id=25458, stack(0x 40638000,0x40739000)] Current CompileTask: C2:2532 ! org.apache.velocity.runtime.directive.Foreach.render(Lorg/apache/velocity/context/InternalContextAdapter;Ljava/io/Writer;Lorg/apache/velocity/runtime/p arser/node/Node;)Z (529 bytes) --- [r...@main ~]# uname -a Linux main 2.6.18-164.9.1.el5 #1 SMP Wed Dec 9 03:27:37 EST 2009 x86_64 x86_64 x86_64 GNU/Linux -- CATALINA_OPTS=-Djava.awt.headless=true $CATALINA_OPTS CATALINA_OPTS=-Xmx6G $CATALINA_OPTS CATALINA_OPTS=-Xms500M $CATALINA_OPTS CATALINA_OPTS=-server $CATALINA_OPTS CATALINA_OPTS=-XX:PermSize=50M -XX:MaxPermSize=100M $CATALINA_OPTS CATALINA_OPTS=-XX:+UseParallelOldGC $CATALINA_OPTS CATALINA_OPTS=-XX:ThreadStackSize=512 $CATALINA_OPTS WILL
RE: Out of Memory exception (hotspot compilation)
From: Will Glass-Husain [mailto:wglasshus...@gmail.com] Subject: Out of Memory exception (hotspot compilation) Specifically, the JVM requested 8GB of memory while hotspot was trying to compile the exact same Velocity/Foreach method as Leon's example. I'm running 64 bit JDK 1.6.0_18-b07 Since it's the exact same method, I'm guessing the Velocity method triggers a bug in the hotspot compilation. Note that we've been running this configuration for 5 months Using the same JDK for those 5 months, or did you recently upgrade? - 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: problems at thejarbar.org
Chris, based on what you're saying and the server.xml posted earlier in this thread, the following should be done? 1. Remove the JDBCRelm from the Engine node 2. Create a GlobalNamingResources Resource entry with the following: Resource name=jdbc/auth description=The Jar Bar user authentication type=javax.sql.DataSource auth=Container driverClassName=com.mysql.jdbc.Driver maxActive=10 maxIdle=3 maxWait=1 password=MyPassword url=jdbc:mysql://localhost:3306/yucca123_thejarbar validationQuery=/* ping */ SELECT 1 username=MyUser/ This is basically what I would normally put in the context.xml file of a web application for an application-specific database connection. 3. Then create a DataSource Realm under the Engine node to replace JDBCRealm. Realm className=org.apache.catalina.realm.DataSourceRealm userTable=users userNameCol=user_name userCredCol=user_pass userRoleTable=user_roles roleNameCol=role_name dataSourceName=jdbc/auth It was a little unclear to me from the documentation that I could put all of the resource attributes in a GlobalNamingResources Resource entry. It was also a little unclear to me that I could just refer to a global resource name with dataSourceName in the Realm. Thanks for clearing that up. . . . just my two cents /mde/ --- On Tue, 6/1/10, Christopher Schultz ch...@christopherschultz.net wrote: From: Christopher Schultz ch...@christopherschultz.net Subject: Re: problems at thejarbar.org To: Tomcat Users List users@tomcat.apache.org Date: Tuesday, June 1, 2010, 7:14 AM -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Yucca Nel, On 5/30/2010 1:53 PM, Yucca Nel wrote: Ok I need to keep connection open to avoid exceeption but have found this is deprecated autoReconnect=true can someone provide up to date strategy for dealing with this? Don't use autoReconnect as a parameter to the JDBC driver. Instead, use the validationQuery on the connection pool to have the pool verify that the connection is still valid. MySQL Connector/J even supports a ping query that can gracefully fall-back to driver versions that don't support it. I highly recommend that you: 1. Use a Tomcat-configured DataSource 2. Use a DataSourceRealm coupled with #1 3. Tell Hibernate to use #1 That way, all your db configuration is in one place. Add this parameter to your DataSource configuration (it configures the connection pool): validationQuery=/* ping */ SELECT 1 This will cause the connection pool to execute that query every time a connection is requested from the pool, just to verify that it's properly connected. Your web application should never get a dead connection and therefore shouldn't have to deal with that situation. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Out of Memory exception (hotspot compilation)
The JDK has been the same since early February. I don't think there's been any other system upgrades. (it's possible there was a upgrade to the OS I'm not aware of, but definitely not the JDK). WILL On Tue, Jun 1, 2010 at 12:45 PM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: Will Glass-Husain [mailto:wglasshus...@gmail.com] Subject: Out of Memory exception (hotspot compilation) Specifically, the JVM requested 8GB of memory while hotspot was trying to compile the exact same Velocity/Foreach method as Leon's example. I'm running 64 bit JDK 1.6.0_18-b07 Since it's the exact same method, I'm guessing the Velocity method triggers a bug in the hotspot compilation. Note that we've been running this configuration for 5 months Using the same JDK for those 5 months, or did you recently upgrade? - 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: apache2 tomcat6.0.26 mod_jk
Thank you. That solved my problem. Regards, Rathna On Tue, Jun 1, 2010 at 10:40 AM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: Rathna [mailto:gente...@gmail.com] Subject: apache2 tomcat6.0.26 mod_jk Let's say I own two websites. 1) batman.com 2) superman.com I have two web applications hosted in tomcat6 under webapps. 1) /usr/local/tomcat6/webapps/batman 2) /usr/local/tomcat6/webapps/superman Don't know about doing this in httpd (do you really need it?), but for Tomcat, try the following: 1) Create two Host entries in Tomcat's server.xml, one for www.batman.com, one for www.superman.com. 2) Configure a separate appBase directory for each Host. 3) Move the batman webapp to the batman Host appBase directory as ROOT (case sensitive). 4) Likewise, move the superman webapp to the superman Host appBase directory as ROOT. You're done. Details are here: http://tomcat.apache.org/tomcat-6.0-doc/virtual-hosting-howto.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
tomcat and log4j version - any dependency issues?
Hi, I am using Tomcat 5.5.28 with JDK 1.5 (and 1.6 on different machine). Right now I have log4j 1.2 version, but I would like use log4j 1.3+ now. Are there any dependency/support issues that I should consider? -- jM.
RE: tomcat and log4j version - any dependency issues?
i downloaded the latest pom.xml from http://svn.apache.org/viewvc/logging/log4j/tags/v1_2_15_rc6/pom.xml?view=co for log4j plugin and i see 5 dependencies: dependencies dependency groupIdant/groupId artifactIdant-nodeps/artifactId version1.6.5/version /dependency dependency groupIdant-contrib/groupId artifactIdant-contrib/artifactId version1.0b2/version /dependency dependency groupIdant/groupId artifactIdant-junit/artifactId version1.6.5/version /dependency dependency groupIdjunit/groupId artifactIdjunit/artifactId version3.8.1/version scopetest/scope /dependency dependency groupIdsun.jdk/groupId artifactIdtools/artifactId version1.4.2/version scopesystem/scope systemPath${tools.jar}/systemPath /dependency /dependencies does that help? 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. Date: Tue, 1 Jun 2010 16:07:22 -0500 Subject: tomcat and log4j version - any dependency issues? From: jmart...@gmail.com To: users@tomcat.apache.org Hi, I am using Tomcat 5.5.28 with JDK 1.5 (and 1.6 on different machine). Right now I have log4j 1.2 version, but I would like use log4j 1.3+ now. Are there any dependency/support issues that I should consider? -- jM. _ Hotmail is redefining busy with tools for the New Busy. Get more from your inbox. http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_2
Re: apache2 tomcat6.0.26 mod_jk
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rathna, On 6/1/2010 2:35 PM, Rathna wrote: Let's say I own two websites. 1) batman.com 2) superman.com I have two web applications hosted in tomcat6 under webapps. 1) /usr/local/tomcat6/webapps/ batman 2) /usr/local/tomcat6/webapps/superman I would like to configure apache in such a way that when I type the url http://www.batman.com the website under /batman should be served. Likewise if I type the url http://www.superman.com the website under /superman should be served. Right now, I can only get it working if I type http://www.batman.com/batmanor http://www.superman.com/superman. $ mkdir /usr/local/tomcat6/webapps-batman $ mv /usr/local/tomcat6/webapps/batman \ /usr/local/tomcat6/webapps-batman/ROOT $ mkdir /usr/local/tomcat6/webapps-superman $ mv /usr/local/tomcat6/webapps/superman \ /usr/local/tomcat6/webapps-superman/ROOT Now, go edit your server.xml and create two new Hosts: Host name=www.batman.com appBase=webapps-batman ... Host name=www.superman.com appBase=webapps-superman ... JkMount / worker1 JkMount /* worker1 Note that the second JKMount includes the first. JkMount /* worker1 Note that you don't need to use Apache httpd at all if this is your configuration. I'm running this on Ubuntu 9.0.4 OS. I'm really stuck. Any help would be much appreciated. Thank you. If you're using the Ubuntu-managed package of Tomcat, you may have to fight with your configuration files to get this to work. It looks like you've installed it directly from tomcat.apache.org, since it's installed in /usr/local, so you should be good to go. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkwFgu0ACgkQ9CaO5/Lv0PAj7gCgjTnYjYwNNCx9NsywDFS203Cl oXUAnRRhHoo3sO/33OTdO+WiKGvlPkw4 =LCCs -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat and log4j version - any dependency issues?
On 01.06.2010 23:07, Johan Martinez wrote: Hi, I am using Tomcat 5.5.28 with JDK 1.5 (and 1.6 on different machine). Right now I have log4j 1.2 version, but I would like use log4j 1.3+ now. Are there any dependency/support issues that I should consider? Citing from the Log4J homepage: === Apache log4j has three development branches: a stable branch, 1.2; a discontinued branch, 1.3; and an experimental branch, 2.0. Apache log4j 1.2 releases are widely deployed. Development on the 1.2 branch is generally limited to bug fixing and minor enhancements. Apache log4j 1.3 alpha releases are in limited use. Apache log4j 1.3 added many interesting features, but was compatibility with log4j 1.2 was problematic. Many features original developed for log4j 1.3 have been back-ported as companions for log4j 1.2. No further development is anticipated for log4j 1.3. Apache log4j 2.0 is an experimental development branch for logging services designed for Java 5 and later. === So I think you should reconsider switching to 1.3. It's a dead end street. They recently released 1.2.16. Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: problems at thejarbar.org
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mark, On 6/1/2010 3:58 PM, Mark Eggers wrote: Chris, based on what you're saying and the server.xml posted earlier in this thread, the following should be done? 1. Remove the JDBCRelm from the Engine node 2. Create a GlobalNamingResources Resource entry with the following: Yes, but honestly, I'd put the Resource and Realm. configuration into my webapp's META-INF/context.xml file (which requires that localDataSource=true be set on the Realm, btw). This is basically what I would normally put in the context.xml file of a web application for an application-specific database connection. Agreed. 3. Then create a DataSource Realm under the Engine node to replace JDBCRealm. Realm className=org.apache.catalina.realm.DataSourceRealm userTable=users userNameCol=user_name userCredCol=user_pass userRoleTable=user_roles roleNameCol=role_name dataSourceName=jdbc/auth Yup. It was a little unclear to me from the documentation that I could put all of the resource attributes in a GlobalNamingResources Resource entry. It was also a little unclear to me that I could just refer to a global resource name with dataSourceName in the Realm. Unfortunately, the documentation on the Tomcat website is a bit disorganized and the best places to look are often in the examples and not in the configuration reference (which itself has examples, etc.). Also, the examples are often very outdated. Patches are always welcome (I tell myself, here, mostly) :) - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkwFg7IACgkQ9CaO5/Lv0PD/HQCgu1ydfF98NszrWLW+6Jiz1BSE SkIAn0uL2sINWTYlXhJklYaqcryYf3gD =7FTL -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: apache2 tomcat6.0.26 mod_jk
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 All, Gah. I foolishly responded to the first of two identical posts, and thus repeated what others said. Yet another reason to only post once: even people with the answers can look like idiots. :( - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkwFhAwACgkQ9CaO5/Lv0PAVigCfSF/GAl27VMOdtQ2exK9Zr7OS iKoAoKFCdcGKc1tZ0nut5PAvJMGVSCKz =SLjA -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat and log4j version - any dependency issues?
Thanks for sharing this info. I was considering 1.3 version for better management - purging log files before certain date, log4j 1.3 provides max. backup index option with DailyRollingFileAppender. I am also looking at logrotate and cronolog for this, but not sure if I could use it in conjunction with DailyRollingFileAppender. Any thoughts? -- jM. On Tue, Jun 1, 2010 at 5:01 PM, Rainer Jung rainer.j...@kippdata.de wrote: On 01.06.2010 23:07, Johan Martinez wrote: Hi, I am using Tomcat 5.5.28 with JDK 1.5 (and 1.6 on different machine). Right now I have log4j 1.2 version, but I would like use log4j 1.3+ now. Are there any dependency/support issues that I should consider? Citing from the Log4J homepage: === Apache log4j has three development branches: a stable branch, 1.2; a discontinued branch, 1.3; and an experimental branch, 2.0. Apache log4j 1.2 releases are widely deployed. Development on the 1.2 branch is generally limited to bug fixing and minor enhancements. Apache log4j 1.3 alpha releases are in limited use. Apache log4j 1.3 added many interesting features, but was compatibility with log4j 1.2 was problematic. Many features original developed for log4j 1.3 have been back-ported as companions for log4j 1.2. No further development is anticipated for log4j 1.3. Apache log4j 2.0 is an experimental development branch for logging services designed for Java 5 and later. === So I think you should reconsider switching to 1.3. It's a dead end street. They recently released 1.2.16. Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: apache2 tomcat6.0.26 mod_jk
I'm sorry, that was absolutely a mistake. The first email I sent out returned with a server error. Somehow the server retried it and sent it again. No, I was the idiot who couldn't figure out the solution or wait for the server to resend the message. You guys are awesome. Thank you. JkMount / worker1 JkMount /* worker1 Note that the second JKMount includes the first. JkMount /* worker1 Did you mean I need not include JkMount / worker1? Anyway I'll try that. Yes I directly downloaded tomcat since I've previously experienced issues with tomcat from ubuntu package management. Thanks again. Regards, Rathna On Tue, Jun 1, 2010 at 2:05 PM, Christopher Schultz ch...@christopherschultz.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 All, Gah. I foolishly responded to the first of two identical posts, and thus repeated what others said. Yet another reason to only post once: even people with the answers can look like idiots. :( - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkwFhAwACgkQ9CaO5/Lv0PAVigCfSF/GAl27VMOdtQ2exK9Zr7OS iKoAoKFCdcGKc1tZ0nut5PAvJMGVSCKz =SLjA -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat and log4j version - any dependency issues?
On 02.06.2010 00:15, Johan Martinez wrote: Thanks for sharing this info. I was considering 1.3 version for better management - purging log files before certain date, log4j 1.3 provides max. backup index option with DailyRollingFileAppender. I am also looking at logrotate and cronolog for this, but not sure if I could use it in conjunction with DailyRollingFileAppender. Any thoughts? Have a look at the extras for 1.2. Many of the rolling policy additions have been backported to 1.2. I've got no experience on my own with those, and since they are not bundled, they might still not be in wide use, so use with care: http://logging.apache.org/log4j/companions/extras/ http://logging.apache.org/log4j/companions/extras/apidocs/index.html There's not much docs for it around, you can get some things from the javadoc, other info from the abandoned 1.3 branch might apply to the extras. One example for what you are looking for could be TimeBasedRollingPolicy. One example for how to use it can be found on http://wiki.apache.org/logging-log4j/Log4jXmlFormat Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
[OT] Re: problems at thejarbar.org
Chris, I think it all depends what you need your Realm to manage. In this instance (single application on Tomcat), then it probably doesn't matter if the Realm sits at the application, Host, or Engine level. Like you've pointed out before it's nice to have a self-contained application with all of the database configurations in one spot. Having some database configurations in META-INF/context.xml, and others in Tomcat's server.xml seems to be a maintenance / migration challenge waiting to happen. If you have multiple applications using the same Realm information, then it might make sense to move the Realm to a Host or Engine level. However I cannot think of a good use case off the top of my head to potentially run multiple hosts under one Engine with the same authentication Realm . . . . Maybe a better place to document all of this and some use case scenarios would be the Wiki. Since I'm thinking about this, I'll see what I can cobble up in the next few days. Thanks for the comments . . . . /mde/ --- On Tue, 6/1/10, Christopher Schultz ch...@christopherschultz.net wrote: From: Christopher Schultz ch...@christopherschultz.net Subject: Re: problems at thejarbar.org To: Tomcat Users List users@tomcat.apache.org Date: Tuesday, June 1, 2010, 3:03 PM -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mark, Yes, but honestly, I'd put the Resource and Realm. configuration into my webapp's META-INF/context.xml file (which requires that localDataSource=true be set on the Realm, btw). - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: [OT] Re: problems at thejarbar.org
On Tue, Jun 1, 2010 at 4:27 PM, Mark Eggers its_toas...@yahoo.com wrote: If you have multiple applications using the same Realm information, then it might make sense to move the Realm to a Host or Engine level. However I cannot think of a good use case off the top of my head to potentially run multiple hosts under one Engine with the same authentication Realm . . . . Wait, what?? How about if you have multiple hosts, each having restricted-access admin functions being performed by the same (or largely overlapping) set of people? What sense would separate Realms make? -- Hassan Schroeder hassan.schroe...@gmail.com twitter: @hassan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: JAAS Realm Authentication with Kerberos
Right, so let me get this straight; Presently the KerberosLoginModule saves the role information (defined as u...@realm) as a Principal which is then compared against the literal string defined in web.xml. So what you're suggesting is modify the KerberosLoginModule so that, essentially, the credentials saved in the (Role) Principal should reflect exactly what's in (under the Role) web.xml? thank you for your help. On Tue, Jun 1, 2010 at 11:56 PM, dB. dbl...@dblock.org wrote: If you look at the KerberosLoginModule code, it wants to be modified to retrieve roles from somewhere in your system. For example a user database that says that u...@realm is manager. Then you can say auth-constraint ... manager / in web.xml rather than u...@realm. Listing individual users clearly isn't practical. Any authenticated user will be a member of Everyone or DOMAIN\Authenticated Users or DOMAIN\Users, etc. If you are using Active Directory on Windows, you're probably not getting what you want with Kerberos alone. To use web.xml for authorization, you want something like roles = AD groups (and local groups). Retrieving user groups by name from AD is going to yield the wrong result in any kind of real world deployment - you will have hard time getting nested groups or anything from trusted domains. If you're running on Windows and your goal is single sign-on, you may want to try http://waffle.codeplex.com. There're several options, including a login filter and a JAAS authenticator. All use SSPI to login (will do Kerberos and NTLM) and will return not just the user identity, but the user local and domain groups. Hope this helps, -dB. dB. @ dblock.org Moscow|Geneva|Seattle|New York -Original Message- From: geofrey rainey [mailto:geofr...@gmail.com] Sent: Tuesday, June 01, 2010 4:05 AM To: users@tomcat.apache.org Subject: JAAS Realm Authentication with Kerberos Hello, I've been following this fairly self-explanatory document on Kerberos authentication against an AD. If I hard-code the u...@realm in the web.xml file, authentication is successful. However obviously what one really wants is the actual user credentials as stored in the Principals class, javax.security.auth.kerberos.KerberosPrincipal, in the web.xml for each Subject authenticating, but I'm a bit lost as to how to get that information from the class into the web.xml. Any ideas would be appreciated? ( http://wiki.wsmoak.net/cgi-bin/wiki.pl?action=browsediff=1id=TomcatKerberosConfigOnly ) auth-constraint role-nameu...@realm/role-name /auth-constraint Regards, Geofrey. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Out of Memory exception (hotspot compilation)
Hmm, I'd like to file a bug report on similar issue I had. Can you please tell me where can I do it? Cheers, Leon On Wed, Jun 2, 2010 at 06:46, Will Glass-Husain wglasshus...@gmail.comwrote: The JDK has been the same since early February. I don't think there's been any other system upgrades. (it's possible there was a upgrade to the OS I'm not aware of, but definitely not the JDK). WILL On Tue, Jun 1, 2010 at 12:45 PM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: Will Glass-Husain [mailto:wglasshus...@gmail.com] Subject: Out of Memory exception (hotspot compilation) Specifically, the JVM requested 8GB of memory while hotspot was trying to compile the exact same Velocity/Foreach method as Leon's example. I'm running 64 bit JDK 1.6.0_18-b07 Since it's the exact same method, I'm guessing the Velocity method triggers a bug in the hotspot compilation. Note that we've been running this configuration for 5 months Using the same JDK for those 5 months, or did you recently upgrade? - 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