Re: SSL Not working on tomcat 5.5.29
When I run in NON SSL (port 8080, stuff is written to the log files). When I run under SSL (8443) nothing is written to the same log files. Konstantin Kolinko wrote: 2010/7/2 kareem_s_m kareemud...@gmail.com: Also nothing is written to the log flies. Nothing at all? The logs are completely empty? Maybe you are still running 5.5.28, or writing to 5.5.28 logs, if the service was installed incorrectly? Under tomcat 5.5.28, the site renders fine with SSL and non SSL. How did you install Tomcat, and how are you running it? Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://old.nabble.com/SSL-Not-working-on-tomcat-5.5.29-tp29052531p29082265.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
java.lang.IllegalStateException: Timer already cancelled
Hi guys. I have a servlet that uses connection pool with the use of MySQL driver. When I start or reload Tomcat the application works fine, then if I redeploy my application it cannot get a connection from a DataSource object. The following exception is thrown: java.lang.IllegalStateException: Timer already cancelled. java.util.Timer.sched(Timer.java:354) java.util.Timer.schedule(Timer.java:222) org.apache.tomcat.dbcp.pool.impl.EvictionTimer.schedule(EvictionTimer.java:64) org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.startEvictor(GenericObjectPool.java:1647) org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.setTimeBetweenEvictionRunsMillis(GenericObjectPool.java:843) org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1173) org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880) basis.onlineorder.commons.dao.UserDAOJdbcImpl.getUsers(UserDAOJdbcImpl.java:133) org.apache.jsp.users_jsp.getUsersList(users_jsp.java:31) org.apache.jsp.users_jsp._jspService(users_jsp.java:164) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) I have not found anything I can do with this on the internet. Perhaps I've found that I might have a relation to timeBetweenEvictionRunsMillis parameter ( in Resource configuration section ). I don't know if it is important, here is my configuration in context.xml file: Resource name=jdbc/onlineorder auth=Container type=javax.sql.DataSource username=user password=password driverClassName=com.mysql.jdbc.Driver url=jdbc:mysql://localhost/mydb?useUnicode=trueamp;characterEncoding=utf8 maxActive=10 maxIdle=5 testOnBorrow=true testWhileIdle=true timeBetweenEvictionRunsMillis=1 minEvictableIdleTimeMillis=6 / Did anyone face with this problem ?
Re: java.lang.IllegalStateException: Timer already cancelled
On 06/07/2010 08:05, Yevgen Krapiva wrote: Hi guys. I have a servlet that uses connection pool with the use of MySQL driver. When I start or reload Tomcat the application works fine, then if I redeploy my application it cannot get a connection from a DataSource object. The following exception is thrown: java.lang.IllegalStateException: Timer already cancelled. java.util.Timer.sched(Timer.java:354) java.util.Timer.schedule(Timer.java:222) org.apache.tomcat.dbcp.pool.impl.EvictionTimer.schedule(EvictionTimer.java:64) org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.startEvictor(GenericObjectPool.java:1647) org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.setTimeBetweenEvictionRunsMillis(GenericObjectPool.java:843) org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1173) org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880) basis.onlineorder.commons.dao.UserDAOJdbcImpl.getUsers(UserDAOJdbcImpl.java:133) org.apache.jsp.users_jsp.getUsersList(users_jsp.java:31) org.apache.jsp.users_jsp._jspService(users_jsp.java:164) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) I have not found anything I can do with this on the internet. Perhaps I've found that I might have a relation to timeBetweenEvictionRunsMillis parameter ( in Resource configuration section ). I don't know if it is important, here is my configuration in context.xml file: Resource name=jdbc/onlineorder auth=Container type=javax.sql.DataSource username=user password=password driverClassName=com.mysql.jdbc.Driver url=jdbc:mysql://localhost/mydb?useUnicode=trueamp;characterEncoding=utf8 maxActive=10 maxIdle=5 testOnBorrow=true testWhileIdle=true timeBetweenEvictionRunsMillis=1 minEvictableIdleTimeMillis=6 / Did anyone face with this problem ? Exactly which version of the MySQL driver are you using? This is a side-effect of the memory leak prevention in Tomcat 6.0.20+ which aims to stop Timers that haven't been properly shutdown. The problem is probably that the driver is located in the common classloader and that Tomcat is discovering and killing the Timer it starts when the webapp classloader is terminated. Which gives me an idea... p signature.asc Description: OpenPGP digital signature
How to split the default stdout log?
Hello everyone, I am using Tomcat 5.5.28 in Windows systems. Because there are lots of codes like System.out.println( some info here) in the apps, after a few days the file stdout_*.log in the /logs folder becomes so large that we cannot open it. Due to some reasons, I cannot modify the codes, so the only solution is to make the log generated everyday. I have tried the log4j, but I cannot redirect the stand output to the log files. Only there log infos that send out by logging class can be recorded in the logs generated by log4j. Anyone know a simple solution to meet my needs? -- 郑翼羽
Re: How to split the default stdout log?
郑翼羽 wrote: Hello everyone, I am using Tomcat 5.5.28 in Windows systems. Because there are lots of codes like System.out.println( some info here) in the apps, after a few days the file stdout_*.log in the /logs folder becomes so large that we cannot open it. Due to some reasons, I cannot modify the codes, so the only solution is to make the log generated everyday. I have tried the log4j, but I cannot redirect the stand output to the log files. Only there log infos that send out by logging class can be recorded in the logs generated by log4j. Anyone know a simple solution to meet my needs? Hi. You do not say, but I presume that you are running Tomcat 5.5 as a Windows Service. If so, then Tomcat (or rather the JVM which runs Tomcat), is running inside of a wrapper program called tomcat5.exe (tomcat_dir/bin/tomcat5.exe). This program catches the stdout/stderr of the JVM, and redirects them to files. To which files it redirects them, is stored in the Windows Registry. When tomcat5.exe starts, it reads a series of parameters from the Registry, and then starts the JVM (and Tomcat) using these parameters. There is another program in tomcat_dir/bin, called tomcat5w.exe. This is a GUI which enables you to change these Registry parameters used by tomcat5.exe. Double-click on the tomcat5w.exe program, and navigate to the Logging tab. Maybe this gives you an idea. For a complete explanation, start here : http://commons.apache.org/daemon/ tomcat5.exe is really a renamed prunsrv tomcat5w.exe is really a renamed prunmgr - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to split the default stdout log?
Thanks Andre! But when tomcat5 starts, it will generate a file like stdout_mmdd.log, but when it runs for a couple of days, there will be only one file, and all the infos are appended to that file. What I want is that tomcat can automatic generate multiple files such as one file one day so that the single log file will not be so large. Like in log4j, I can set the parameter like log4j.appender.R=org.apache.log4j.DailyRollingFileAppender so that everyday it will generate a new file. in the logging tab page, I can only redirect the stdout to a single file. Does it support parameters like D:\Tomcat 5.5\logs\{%date%}.log? On Tue, Jul 6, 2010 at 4:13 PM, André Warnier a...@ice-sa.com wrote: 郑翼羽 wrote: Hello everyone, I am using Tomcat 5.5.28 in Windows systems. Because there are lots of codes like System.out.println( some info here) in the apps, after a few days the file stdout_*.log in the /logs folder becomes so large that we cannot open it. Due to some reasons, I cannot modify the codes, so the only solution is to make the log generated everyday. I have tried the log4j, but I cannot redirect the stand output to the log files. Only there log infos that send out by logging class can be recorded in the logs generated by log4j. Anyone know a simple solution to meet my needs? Hi. You do not say, but I presume that you are running Tomcat 5.5 as a Windows Service. If so, then Tomcat (or rather the JVM which runs Tomcat), is running inside of a wrapper program called tomcat5.exe (tomcat_dir/bin/tomcat5.exe). This program catches the stdout/stderr of the JVM, and redirects them to files. To which files it redirects them, is stored in the Windows Registry. When tomcat5.exe starts, it reads a series of parameters from the Registry, and then starts the JVM (and Tomcat) using these parameters. There is another program in tomcat_dir/bin, called tomcat5w.exe. This is a GUI which enables you to change these Registry parameters used by tomcat5.exe. Double-click on the tomcat5w.exe program, and navigate to the Logging tab. Maybe this gives you an idea. For a complete explanation, start here : http://commons.apache.org/daemon/ tomcat5.exe is really a renamed prunsrv tomcat5w.exe is really a renamed prunmgr - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- 郑翼羽
Tomcat crashed after servicing too many HTTPS connection
I am using Tomcat 5.5.15 with JDK 1.5.0 update 7 on RedHat Enterprise. I tested my web application by refreshing a page many times, the Tomcat server crashed and thrown exception below: Jul 6, 2010 11:21:38 AM org.apache.tomcat.util.net.PoolTcpEndpoint acceptSocket SEVERE: Endpoint [SSL: ServerSocket[addr= 0.0.0.0/0.0.0.0,port=0,localport=8443]] ignored exception: java.net.SocketException: Too many open files java.net.SocketException: Too many open files at java.net.PlainSocketImpl.socketAccept(Native Method) at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:384) at java.net.ServerSocket.implAccept(ServerSocket.java:450) at com.sun.net.ssl.internal.ssl.SSLServerSocketImpl.accept(SSLServerSocketImpl.java:259) at org.apache.tomcat.util.net.jsse.JSSESocketFactory.acceptSocket(JSSESocketFactory.java:110) at org.apache.tomcat.util.net.PoolTcpEndpoint.acceptSocket(PoolTcpEndpoint.java:407) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:70) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) Jul 6, 2010 11:21:38 AM org.apache.tomcat.util.net.PoolTcpEndpoint acceptSocket WARNING: Reinitializing ServerSocket Jul 6, 2010 11:21:38 AM org.apache.tomcat.util.net.PoolTcpEndpoint acceptSocket SEVERE: Endpoint null ignored exception: java.io.FileNotFoundException: /usr-files/ssl-truststore (Too many open files) java.io.FileNotFoundException: /usr-files/ssl-truststore (Too many open files) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.init(FileInputStream.java:106) at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getStore(JSSESocketFactory.java:279) at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getTrustStore(JSSESocketFactory.java:256) at org.apache.tomcat.util.net.jsse.JSSE14SocketFactory.getTrustManagers(JSSE14SocketFactory.java:174) at org.apache.tomcat.util.net.jsse.JSSE14SocketFactory.init(JSSE14SocketFactory.java:109) at org.apache.tomcat.util.net.jsse.JSSESocketFactory.createSocket(JSSESocketFactory.java:88) at org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoint.java:292) at org.apache.tomcat.util.net.PoolTcpEndpoint.acceptSocket(PoolTcpEndpoint.java:468) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:70) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) Jul 6, 2010 11:21:38 AM org.apache.tomcat.util.net.PoolTcpEndpoint acceptSocket WARNING: Restarting endpoint Jul 6, 2010 11:21:38 AM org.apache.tomcat.util.net.PoolTcpEndpoint acceptSocket SEVERE: Endpoint null shutdown due to exception: java.io.FileNotFoundException: /.keystore (Too many open files) java.io.FileNotFoundException: /.keystore (Too many open files) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.init(FileInputStream.java:106) at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getStore(JSSESocketFactory.java:279) at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getKeystore(JSSESocketFactory.java:222) at org.apache.tomcat.util.net.jsse.JSSE14SocketFactory.getKeyManagers(JSSE14SocketFactory.java:141) at org.apache.tomcat.util.net.jsse.JSSE14SocketFactory.init(JSSE14SocketFactory.java:109) at org.apache.tomcat.util.net.jsse.JSSESocketFactory.createSocket(JSSESocketFactory.java:88) at org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoint.java:292) at org.apache.tomcat.util.net.PoolTcpEndpoint.acceptSocket(PoolTcpEndpoint.java:480) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:70) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) Jul 6, 2010 11:21:38 AM org.apache.tomcat.util.threads.ThreadPool$ControlRunnable run SEVERE: Caught exception (java.lang.ThreadDeath) executing org.apache.tomcat.util.net.leaderfollowerworkerthr...@117a4c6, terminating thread Jul 6, 2010 11:21:41 AM org.apache.naming.resources.FileDirContext list WARNING: Could not get dir listing for /usr/local/apache-tomcat-5.5.16/webapps/windtalker/WEB-INF/lib Jul 6, 2010 11:21:41 AM org.apache.catalina.loader.WebappClassLoader modified INFO: Additional JARs have been added Jul 6, 2010 11:21:41 AM org.apache.catalina.core.StandardContext reload INFO: Reloading this Context has started
Re: How to split the default stdout log?
郑翼羽 wrote: Thanks Andre! But when tomcat5 starts, it will generate a file like stdout_mmdd.log, but when it runs for a couple of days, there will be only one file, and all the infos are appended to that file. What I want is that tomcat can automatic generate multiple files such as one file one day so that the single log file will not be so large. Like in log4j, I can set the parameter like log4j.appender.R=org.apache.log4j.DailyRollingFileAppender so that everyday it will generate a new file. in the logging tab page, I can only redirect the stdout to a single file. Does it support parameters like D:\Tomcat 5.5\logs\{%date%}.log? I don't know, and I did not find anything to that effect in the Tomcat or Daemon documentation. But you could try the following : In the Apache httpd distribution, there is a program called rotatelogs.exe. Its documentation is here : http://httpd.apache.org/docs/2.2/programs/rotatelogs.html You could try to download Apache, extract this program, add it to the tomcat/bin directory, and then in tomcat5w.exe try to set the filename to something like : |D:/Tomcat 5.5/bin/rotatelogs.exe -l D:/Tomcat 5.5/logs/stdout.%Y.%m.%d 86400 I have never tried this, and I don't know if it works. If it does, then let us know, because it might be handy for others. Note : I know that this is not the default in the Tomcat installation, but I always recommend to install programs in directory paths *without embedded spaces* (e.g. D:/tomcat5.5 instead of D:/tomcat 5.5. One of the reasons is shown above : does one need to quote this path or not, and if yes how ? On Tue, Jul 6, 2010 at 4:13 PM, André Warnier a...@ice-sa.com wrote: 郑翼羽 wrote: Hello everyone, I am using Tomcat 5.5.28 in Windows systems. Because there are lots of codes like System.out.println( some info here) in the apps, after a few days the file stdout_*.log in the /logs folder becomes so large that we cannot open it. Due to some reasons, I cannot modify the codes, so the only solution is to make the log generated everyday. I have tried the log4j, but I cannot redirect the stand output to the log files. Only there log infos that send out by logging class can be recorded in the logs generated by log4j. Anyone know a simple solution to meet my needs? Hi. You do not say, but I presume that you are running Tomcat 5.5 as a Windows Service. If so, then Tomcat (or rather the JVM which runs Tomcat), is running inside of a wrapper program called tomcat5.exe (tomcat_dir/bin/tomcat5.exe). This program catches the stdout/stderr of the JVM, and redirects them to files. To which files it redirects them, is stored in the Windows Registry. When tomcat5.exe starts, it reads a series of parameters from the Registry, and then starts the JVM (and Tomcat) using these parameters. There is another program in tomcat_dir/bin, called tomcat5w.exe. This is a GUI which enables you to change these Registry parameters used by tomcat5.exe. Double-click on the tomcat5w.exe program, and navigate to the Logging tab. Maybe this gives you an idea. For a complete explanation, start here : http://commons.apache.org/daemon/ tomcat5.exe is really a renamed prunsrv tomcat5w.exe is really a renamed prunmgr - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat crashed after servicing too many HTTPS connection
On 06/07/2010 09:48, Goo Sam Kong wrote: I am using Tomcat 5.5.15 with JDK 1.5.0 update 7 on RedHat Enterprise. I tested my web application by refreshing a page many times, the Tomcat server crashed and thrown exception below: How many times? Was your test automated? What did you expect would happen? p Jul 6, 2010 11:21:38 AM org.apache.tomcat.util.net.PoolTcpEndpoint acceptSocket SEVERE: Endpoint [SSL: ServerSocket[addr= 0.0.0.0/0.0.0.0,port=0,localport=8443]] ignored exception: java.net.SocketException: Too many open files java.net.SocketException: Too many open files at java.net.PlainSocketImpl.socketAccept(Native Method) at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:384) at java.net.ServerSocket.implAccept(ServerSocket.java:450) at com.sun.net.ssl.internal.ssl.SSLServerSocketImpl.accept(SSLServerSocketImpl.java:259) at org.apache.tomcat.util.net.jsse.JSSESocketFactory.acceptSocket(JSSESocketFactory.java:110) at org.apache.tomcat.util.net.PoolTcpEndpoint.acceptSocket(PoolTcpEndpoint.java:407) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:70) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) Jul 6, 2010 11:21:38 AM org.apache.tomcat.util.net.PoolTcpEndpoint acceptSocket WARNING: Reinitializing ServerSocket Jul 6, 2010 11:21:38 AM org.apache.tomcat.util.net.PoolTcpEndpoint acceptSocket SEVERE: Endpoint null ignored exception: java.io.FileNotFoundException: /usr-files/ssl-truststore (Too many open files) java.io.FileNotFoundException: /usr-files/ssl-truststore (Too many open files) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.init(FileInputStream.java:106) at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getStore(JSSESocketFactory.java:279) at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getTrustStore(JSSESocketFactory.java:256) at org.apache.tomcat.util.net.jsse.JSSE14SocketFactory.getTrustManagers(JSSE14SocketFactory.java:174) at org.apache.tomcat.util.net.jsse.JSSE14SocketFactory.init(JSSE14SocketFactory.java:109) at org.apache.tomcat.util.net.jsse.JSSESocketFactory.createSocket(JSSESocketFactory.java:88) at org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoint.java:292) at org.apache.tomcat.util.net.PoolTcpEndpoint.acceptSocket(PoolTcpEndpoint.java:468) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:70) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) Jul 6, 2010 11:21:38 AM org.apache.tomcat.util.net.PoolTcpEndpoint acceptSocket WARNING: Restarting endpoint Jul 6, 2010 11:21:38 AM org.apache.tomcat.util.net.PoolTcpEndpoint acceptSocket SEVERE: Endpoint null shutdown due to exception: java.io.FileNotFoundException: /.keystore (Too many open files) java.io.FileNotFoundException: /.keystore (Too many open files) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.init(FileInputStream.java:106) at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getStore(JSSESocketFactory.java:279) at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getKeystore(JSSESocketFactory.java:222) at org.apache.tomcat.util.net.jsse.JSSE14SocketFactory.getKeyManagers(JSSE14SocketFactory.java:141) at org.apache.tomcat.util.net.jsse.JSSE14SocketFactory.init(JSSE14SocketFactory.java:109) at org.apache.tomcat.util.net.jsse.JSSESocketFactory.createSocket(JSSESocketFactory.java:88) at org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoint.java:292) at org.apache.tomcat.util.net.PoolTcpEndpoint.acceptSocket(PoolTcpEndpoint.java:480) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:70) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) Jul 6, 2010 11:21:38 AM org.apache.tomcat.util.threads.ThreadPool$ControlRunnable run SEVERE: Caught exception (java.lang.ThreadDeath) executing org.apache.tomcat.util.net.leaderfollowerworkerthr...@117a4c6, terminating thread Jul 6, 2010 11:21:41 AM org.apache.naming.resources.FileDirContext list WARNING: Could not get dir listing for /usr/local/apache-tomcat-5.5.16/webapps/windtalker/WEB-INF/lib Jul 6, 2010 11:21:41 AM org.apache.catalina.loader.WebappClassLoader modified INFO: Additional JARs have been added Jul 6, 2010 11:21:41 AM org.apache.catalina.core.StandardContext reload INFO: Reloading this Context has started signature.asc Description: OpenPGP digital signature
Re: Tomcat crashed after servicing too many HTTPS connection
Hi Pid, Around 50 times, I press the refresh button on browser manually. I do not want to see Tomcat crash. I did the same test on Tomcat 5.5.16 with JDK 1.5.0 update 7 on Windows XP, Tomcat is running fine without any issue. On 6 July 2010 17:11, Pid p...@pidster.com wrote: On 06/07/2010 09:48, Goo Sam Kong wrote: I am using Tomcat 5.5.15 with JDK 1.5.0 update 7 on RedHat Enterprise. I tested my web application by refreshing a page many times, the Tomcat server crashed and thrown exception below: How many times? Was your test automated? What did you expect would happen? p Jul 6, 2010 11:21:38 AM org.apache.tomcat.util.net.PoolTcpEndpoint acceptSocket SEVERE: Endpoint [SSL: ServerSocket[addr= 0.0.0.0/0.0.0.0,port=0,localport=8443]] ignored exception: java.net.SocketException: Too many open files java.net.SocketException: Too many open files at java.net.PlainSocketImpl.socketAccept(Native Method) at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:384) at java.net.ServerSocket.implAccept(ServerSocket.java:450) at com.sun.net.ssl.internal.ssl.SSLServerSocketImpl.accept(SSLServerSocketImpl.java:259) at org.apache.tomcat.util.net.jsse.JSSESocketFactory.acceptSocket(JSSESocketFactory.java:110) at org.apache.tomcat.util.net.PoolTcpEndpoint.acceptSocket(PoolTcpEndpoint.java:407) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:70) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) Jul 6, 2010 11:21:38 AM org.apache.tomcat.util.net.PoolTcpEndpoint acceptSocket WARNING: Reinitializing ServerSocket Jul 6, 2010 11:21:38 AM org.apache.tomcat.util.net.PoolTcpEndpoint acceptSocket SEVERE: Endpoint null ignored exception: java.io.FileNotFoundException: /usr-files/ssl-truststore (Too many open files) java.io.FileNotFoundException: /usr-files/ssl-truststore (Too many open files) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.init(FileInputStream.java:106) at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getStore(JSSESocketFactory.java:279) at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getTrustStore(JSSESocketFactory.java:256) at org.apache.tomcat.util.net.jsse.JSSE14SocketFactory.getTrustManagers(JSSE14SocketFactory.java:174) at org.apache.tomcat.util.net.jsse.JSSE14SocketFactory.init(JSSE14SocketFactory.java:109) at org.apache.tomcat.util.net.jsse.JSSESocketFactory.createSocket(JSSESocketFactory.java:88) at org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoint.java:292) at org.apache.tomcat.util.net.PoolTcpEndpoint.acceptSocket(PoolTcpEndpoint.java:468) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:70) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) Jul 6, 2010 11:21:38 AM org.apache.tomcat.util.net.PoolTcpEndpoint acceptSocket WARNING: Restarting endpoint Jul 6, 2010 11:21:38 AM org.apache.tomcat.util.net.PoolTcpEndpoint acceptSocket SEVERE: Endpoint null shutdown due to exception: java.io.FileNotFoundException: /.keystore (Too many open files) java.io.FileNotFoundException: /.keystore (Too many open files) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.init(FileInputStream.java:106) at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getStore(JSSESocketFactory.java:279) at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getKeystore(JSSESocketFactory.java:222) at org.apache.tomcat.util.net.jsse.JSSE14SocketFactory.getKeyManagers(JSSE14SocketFactory.java:141) at org.apache.tomcat.util.net.jsse.JSSE14SocketFactory.init(JSSE14SocketFactory.java:109) at org.apache.tomcat.util.net.jsse.JSSESocketFactory.createSocket(JSSESocketFactory.java:88) at org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoint.java:292) at org.apache.tomcat.util.net.PoolTcpEndpoint.acceptSocket(PoolTcpEndpoint.java:480) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:70) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) Jul 6, 2010 11:21:38 AM org.apache.tomcat.util.threads.ThreadPool$ControlRunnable run SEVERE: Caught exception (java.lang.ThreadDeath) executing org.apache.tomcat.util.net.leaderfollowerworkerthr...@117a4c6, terminating thread Jul 6, 2010 11:21:41 AM org.apache.naming.resources.FileDirContext list WARNING: Could not get dir listing for /usr/local/apache-tomcat-5.5.16/webapps/windtalker/WEB-INF/lib Jul 6, 2010
Re: SSL Not working on tomcat 5.5.29
2010/7/6 kareem_s_m kareemud...@gmail.com: When I run in NON SSL (port 8080, stuff is written to the log files). When I run under SSL (8443) nothing is written to the same log files. In the configuration fragment that you provided you are running with all 8080, 8443, 8009 at the same time. If you are adding an XML comment around unneeded connectors, maybe you are doing it wrong, and thus your server.xml is not a well-formed XML file? (You know, XML comments cannot contain -- and thus comments cannot be nested). A trivial question: your keystore is now in a new path. Have you copied it to the new location? keystoreFile=E:\apps\thirdparty\apache-tomcat-5.5.29 orig\selfcert.jks How did you install Tomcat, and how are you running it? Not answered. Do you install it as a service, or you are using *.bat files? Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: SSL Not working on tomcat 5.5.29
2010/7/6 Konstantin Kolinko knst.koli...@gmail.com: 2010/7/6 kareem_s_m kareemud...@gmail.com: When I run in NON SSL (port 8080, stuff is written to the log files). When I run under SSL (8443) nothing is written to the same log files. In the configuration fragment that you provided you are running with all 8080, 8443, 8009 at the same time. If you are adding an XML comment around unneeded connectors, maybe you are doing it wrong, and thus your server.xml is not a well-formed XML file? (You know, XML comments cannot contain -- and thus comments cannot be nested). A trivial question: your keystore is now in a new path. Have you copied it to the new location? keystoreFile=E:\apps\thirdparty\apache-tomcat-5.5.29 orig\selfcert.jks How did you install Tomcat, and how are you running it? Not answered. Do you install it as a service, or you are using *.bat files? One more: please check whether you have bin/tcnative-1.dll in your tomcat-5.5.29. If you do, than APR version of the connector will be used. Configuration for the APR SSL connector is different (it uses OpenSSL library to perform encryption and not Java). Just remove or rename the tcnative-1.dll file. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: java.lang.IllegalStateException: Timer already cancelled
I've tried today the latest driver available - 5.1.13. I've places the driver to %CATALINA_HOME%/lib. I also tried to move it to WEB-INF\lib, but it is appeared that Tomcat (I'm using 6.0.26) doesn't see it when trying to create connection from a DataSource. He says ClassNotFoundException. I don't know why but when I test it using Class.forName() - it exists. I think Tomcat doesn't use servlet classloader. So, returning to the problem , I think the problem is with org.apache.tomcat.dbcp.pool.impl.EvictionTimer class, because it is actually throws exception. 2010/7/6 Pid p...@pidster.com On 06/07/2010 08:22, Pid wrote: On 06/07/2010 08:05, Yevgen Krapiva wrote: Hi guys. I have a servlet that uses connection pool with the use of MySQL driver. When I start or reload Tomcat the application works fine, then if I redeploy my application it cannot get a connection from a DataSource object. The following exception is thrown: java.lang.IllegalStateException: Timer already cancelled. java.util.Timer.sched(Timer.java:354) java.util.Timer.schedule(Timer.java:222) org.apache.tomcat.dbcp.pool.impl.EvictionTimer.schedule(EvictionTimer.java:64) org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.startEvictor(GenericObjectPool.java:1647) org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.setTimeBetweenEvictionRunsMillis(GenericObjectPool.java:843) org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1173) org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880) basis.onlineorder.commons.dao.UserDAOJdbcImpl.getUsers(UserDAOJdbcImpl.java:133) org.apache.jsp.users_jsp.getUsersList(users_jsp.java:31) org.apache.jsp.users_jsp._jspService(users_jsp.java:164) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) I have not found anything I can do with this on the internet. Perhaps I've found that I might have a relation to timeBetweenEvictionRunsMillis parameter ( in Resource configuration section ). I don't know if it is important, here is my configuration in context.xml file: Resource name=jdbc/onlineorder auth=Container type=javax.sql.DataSource username=user password=password driverClassName=com.mysql.jdbc.Driver url=jdbc:mysql://localhost/mydb?useUnicode=trueamp;characterEncoding=utf8 maxActive=10 maxIdle=5 testOnBorrow=true testWhileIdle=true timeBetweenEvictionRunsMillis=1 minEvictableIdleTimeMillis=6 / Did anyone face with this problem ? Exactly which version of the MySQL driver are you using? This is a side-effect of the memory leak prevention in Tomcat 6.0.20+ which aims to stop Timers that haven't been properly shutdown. Correction, Timer Thread termination was introduced in 6.0.24. It's optional from 6.0.27 with the clearReferencesStopTimerThreads flag. You might consider filing a bug with MySQL requesting that they check that the Timer is actually running. p p
Re: java.lang.IllegalStateException: Timer already cancelled
2010/7/6 Yevgen Krapiva ykrap...@gmail.com: Hi guys. I have a servlet that uses connection pool with the use of MySQL driver. When I start or reload Tomcat the application works fine, then if I redeploy my application it cannot get a connection from a DataSource object. Do not use eviction in DBCP, because it causes a memory leak. See https://issues.apache.org/bugzilla/show_bug.cgi?id=48971 https://issues.apache.org/jira/browse/POOL-161 Remove timeBetweenEvictionRunsMillis attribute, or set it to -1. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: java.lang.IllegalStateException: Timer already cancelled
Thanks, I'll do that. What about minEvictableIdleTimeMillis ? Just delete it ? 2010/7/6 Konstantin Kolinko knst.koli...@gmail.com 2010/7/6 Yevgen Krapiva ykrap...@gmail.com: Hi guys. I have a servlet that uses connection pool with the use of MySQL driver. When I start or reload Tomcat the application works fine, then if I redeploy my application it cannot get a connection from a DataSource object. Do not use eviction in DBCP, because it causes a memory leak. See https://issues.apache.org/bugzilla/show_bug.cgi?id=48971 https://issues.apache.org/jira/browse/POOL-161 Remove timeBetweenEvictionRunsMillis attribute, or set it to -1. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: java.lang.IllegalStateException: Timer already cancelled
2010/7/6 Yevgen Krapiva ykrap...@gmail.com: Thanks, I'll do that. What about minEvictableIdleTimeMillis ? Just delete it ? You can delete it. It is the timeBetweenEvictionRunsMillis attribute that controls whether the Evictor will be enabled. The other attributes make no difference. http://commons.apache.org/dbcp/configuration.html Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: java.lang.IllegalStateException: Timer already cancelled
On 06/07/2010 11:34, Yevgen Krapiva wrote: I've tried today the latest driver available - 5.1.13. I've places the driver to %CATALINA_HOME%/lib. I also tried to move it to WEB-INF\lib, but it is appeared that Tomcat (I'm using 6.0.26) doesn't see it when trying to create connection from a DataSource. He says ClassNotFoundException. You'll need to define the DataSource (and anything else that depends on it, like a Realm*) in myapp/META-INF/context.xml if you place the driver jar in WEB-INF/lib. Global resources defined in server.xml can't use jars located in a web app ClassLoader. I don't know why but when I test it using Class.forName() - it exists. I think Tomcat doesn't use servlet classloader. So, returning to the problem , I think the problem is with org.apache.tomcat.dbcp.pool.impl.EvictionTimer class, because it is actually throws exception. It is indeed. I was looking at a similar problem in the MySQL driver and completely failed to read the stacktrace properly, my apologies. The o.a.tomcat.dbcp classes are a repackaged version of commons-dbcp commons-pool so we'll have to look in the source there. http://svn.apache.org/repos/asf/commons/proper/dbcp/ http://svn.apache.org/repos/asf/commons/proper/pool/ And: http://svn.apache.org/repos/asf/commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/EvictionTimer.java So, is your application the only application running on the server? p * DataSourceRealms defined with DataSources in the Context definition need localDataSource=true setting as per: http://tomcat.apache.org/tomcat-6.0-doc/config/realm.html 2010/7/6 Pid p...@pidster.com mailto:p...@pidster.com On 06/07/2010 08:22, Pid wrote: On 06/07/2010 08:05, Yevgen Krapiva wrote: Hi guys. I have a servlet that uses connection pool with the use of MySQL driver. When I start or reload Tomcat the application works fine, then if I redeploy my application it cannot get a connection from a DataSource object. The following exception is thrown: java.lang.IllegalStateException: Timer already cancelled. java.util.Timer.sched(Timer.java:354) java.util.Timer.schedule(Timer.java:222) org.apache.tomcat.dbcp.pool.impl.EvictionTimer.schedule(EvictionTimer.java:64) org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.startEvictor(GenericObjectPool.java:1647) org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.setTimeBetweenEvictionRunsMillis(GenericObjectPool.java:843) org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1173) org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880) basis.onlineorder.commons.dao.UserDAOJdbcImpl.getUsers(UserDAOJdbcImpl.java:133) org.apache.jsp.users_jsp.getUsersList(users_jsp.java:31) org.apache.jsp.users_jsp._jspService(users_jsp.java:164) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) I have not found anything I can do with this on the internet. Perhaps I've found that I might have a relation to timeBetweenEvictionRunsMillis parameter ( in Resource configuration section ). I don't know if it is important, here is my configuration in context.xml file: Resource name=jdbc/onlineorder auth=Container type=javax.sql.DataSource username=user password=password driverClassName=com.mysql.jdbc.Driver url=jdbc:mysql://localhost/mydb?useUnicode=trueamp;characterEncoding=utf8 maxActive=10 maxIdle=5 testOnBorrow=true testWhileIdle=true timeBetweenEvictionRunsMillis=1 minEvictableIdleTimeMillis=6 / Did anyone face with this problem ? Exactly which version of the MySQL driver are you using? This is a side-effect of the memory leak prevention in Tomcat 6.0.20+ which aims to stop Timers that haven't been properly shutdown. Correction, Timer Thread termination was introduced in 6.0.24. It's optional from 6.0.27 with the clearReferencesStopTimerThreads flag. You might consider filing a bug with MySQL requesting that they check that the Timer is actually running. p signature.asc Description: OpenPGP digital signature
RE: Tomcat crashed after servicing too many HTTPS connection
From: Goo Sam Kong [mailto:skgo...@gmail.com] Subject: Re: Tomcat crashed after servicing too many HTTPS connection I did the same test on Tomcat 5.5.16 with JDK 1.5.0 update 7 on Windows XP Why are you mucking around with versions of Tomcat that are over four years old? Many, many serious fixes - some critical - have gone in since then. Move up. You might want to upgrade your JVM as well - it's pretty ancient. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: How to call an external class from a webapp (i.e. - implement a plugin)
What's wrong with providing instructions to the customer on how to install the plugin with a particular web app? -Original Message- From: Goren Il [mailto:gore...@hotmail.com] Sent: Monday, July 05, 2010 2:44 AM To: users@tomcat.apache.org Subject: How to call an external class from a webapp (i.e. - implement a plugin) I would like my webapp to call an external class, which will be provided (as a name) in an XML file at run time. The external class will be developed by 3rd party, and might include additional JARs. I will refer to the external class and JARs as the plugin. My webapp is provided as a WAR, so it is not possible to add the plugin into the same WAR (unless the customer performs it himself). I do not want to put the plugin's JARs in the common lib of Tomcat, so that it will not affect other webapps (the plugin might include JARs of different versions than the webapps use). I considered putting the plugin in a separate folder, and implement my own class loader that will look at that folder as well. It seems like too much of an effort for a simple task. What is the recommended way to achieve plugin capabilities for a webapp? Thanks G. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: How to split the default stdout log?
From: 郑翼羽 [mailto:ground...@gmail.com] Subject: Re: How to split the default stdout log? But when tomcat5 starts, it will generate a file like stdout_mmdd.log, but when it runs for a couple of days, there will be only one file Not sure there's going to be any ready way for Tomcat to fix sloppy webapp programming, but start with setting swallowOutput to true in the Context of interest (or in the global one). This will divert stdout and stderr for each webapp to the webapp's logger. You can then use log4j in the webapp, and make use of its built-in rotation capabilities. Look here for the doc: http://tomcat.apache.org/tomcat-5.5-doc/config/context.html http://tomcat.apache.org/tomcat-5.5-doc/logging.html You should also take a look at the FAQ entries on logging: http://wiki.apache.org/tomcat/FAQ/Logging - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
Re: How to split the default stdout log?
Thanks. The bad news is all the output codes are in a single webapp, and have no hope to use log4j instead of the current system.out codes. Just I hope to find a way that can make tomcat generate a stdout.log file eveyday, or at any interval. On Tue, Jul 6, 2010 at 8:51 PM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: 郑翼羽 [mailto:ground...@gmail.com] Subject: Re: How to split the default stdout log? But when tomcat5 starts, it will generate a file like stdout_mmdd.log, but when it runs for a couple of days, there will be only one file Not sure there's going to be any ready way for Tomcat to fix sloppy webapp programming, but start with setting swallowOutput to true in the Context of interest (or in the global one). This will divert stdout and stderr for each webapp to the webapp's logger. You can then use log4j in the webapp, and make use of its built-in rotation capabilities. Look here for the doc: http://tomcat.apache.org/tomcat-5.5-doc/config/context.html http://tomcat.apache.org/tomcat-5.5-doc/logging.html You should also take a look at the FAQ entries on logging: http://wiki.apache.org/tomcat/FAQ/Logging - 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. -- 郑翼羽
favicon when serving non-html
Hi, When I serve up, say, a PDF file, how do I control the favicon? Here's my code: response.reset(); response.setContentType(IOUtilities.gMIMEType(fn)); response.setHeader(Content-disposition, inline; filename= + file.getName()); OutputStream outStream = response.getOutputStream(); synchronized(response.getOutputStream()){ outStream.write(IOUtilities.gFile2Bytes(file.getAbsolutePath())); } response.flushBuffer(); Thanks in advance - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: How to split the default stdout log?
From: 郑翼羽 [mailto:ground...@gmail.com] Subject: Re: How to split the default stdout log? The bad news is all the output codes are in a single webapp, and have no hope to use log4j instead of the current system.out codes. Read what I posted - use swallowOutput to capture the writes to System.out. - 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: favicon when serving non-html
On 6 July 2010 15:10, Dola Woolfe dolac...@yahoo.com wrote: When I serve up, say, a PDF file, how do I control the favicon? What is the behaviour you would like/expect from the user agent in this case? - Peter
RE: favicon when serving non-html
From: Dola Woolfe [mailto:dolac...@yahoo.com] Subject: favicon when serving non-html When I serve up, say, a PDF file, how do I control the favicon? Any request for a favicon is separate from the main page; you shouldn't have to do anything. Use an HTTP monitor (eg, Firebug) to see how that works. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to split the default stdout log?
郑翼羽 wrote: Thanks. The bad news is all the output codes are in a single webapp, and have no hope to use log4j instead of the current system.out codes. Just I hope to find a way that can make tomcat generate a stdout.log file eveyday, or at any interval. Hi again. I tried what I suggested earlier (with the Apache rotatelogs utility), but that does not seem to work. (*) Can you confirm : 1) that you are running Tomcat 5.5 as a Windows Service 2) if yes, what you currently see when you run the tomcat5w.exe GUI, in the Logging tab, in the boxes for STDOUT and STDERR 3) what name do your logfiles have ? Thanks (*) When i do that, I get a logfile tomcat_dir/logs/jakarta_service_20100706.log containing 2 lines : [2010-07-06 16:12:50] [591 javajni.c] [error] Could not create instance of java/io/FileOutputStream [2010-07-06 16:12:50] [591 javajni.c] [error] Could not create instance of java/io/FileOutputStream from which i suspect that the tomcat5.exe/procrun wrapper does not like it, when one tries to give it something like this as a destination for its logfiles : |c:/tomcat5.5/bin/rotatelogs.exe -l C:/Tomcat5.5/logs/stdout.%Y.%m.%d 86400 (I also tried flipping the slashes the other way, with no more success). This was with C:\Tomcat5.5\binversion.bat Using CATALINA_BASE: C:\Tomcat5.5 Using CATALINA_HOME: C:\Tomcat5.5 Using CATALINA_TMPDIR: C:\Tomcat5.5\temp Using JRE_HOME:C:\Java6jdk Using CLASSPATH: C:\Tomcat5.5\bin\bootstrap.jar Server version: Apache Tomcat/5.5.26 Server built: Jan 28 2008 01:35:23 Server number: 5.5.26.0 OS Name:Windows XP OS Version: 5.1 Architecture: x86 JVM Version:1.6.0_06-b02 JVM Vendor: Sun Microsystems Inc. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to call an external class from a webapp (i.e. - implement a plugin)
There are 2 issues (not in order of priority): 1. The steps are not straight forward, and may cause the system to stop working (the customer should change the WAR suffix to zip, open it, add the files and rename it back) 2. When we provide a new version, we will replace the WAR and all the changes are gone. Aren't there other webapps that have plugin capabilities? How do they implement this capability? Thanks G. On 06-Jul-10 15:45, Joseph Morgan wrote: What's wrong with providing instructions to the customer on how to install the plugin with a particular web app? -Original Message- From: Goren Il [mailto:gore...@hotmail.com] Sent: Monday, July 05, 2010 2:44 AM To: users@tomcat.apache.org Subject: How to call an external class from a webapp (i.e. - implement a plugin) I would like my webapp to call an external class, which will be provided (as a name) in an XML file at run time. The external class will be developed by 3rd party, and might include additional JARs. I will refer to the external class and JARs as the plugin. My webapp is provided as a WAR, so it is not possible to add the plugin into the same WAR (unless the customer performs it himself). I do not want to put the plugin's JARs in the common lib of Tomcat, so that it will not affect other webapps (the plugin might include JARs of different versions than the webapps use). I considered putting the plugin in a separate folder, and implement my own class loader that will look at that folder as well. It seems like too much of an effort for a simple task. What is the recommended way to achieve plugin capabilities for a webapp? Thanks G. - 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
WebappClassLoader clearReferencesThreads
This is really a two part question. The first question has to do with the error in the log file and the second question has to do with making connections to other app servers in Tomcat. Part 1: I have a webapp (http://planning.maricopa.gov/apnxy) running under Tomcat 6.0.26 that makes a connection to a different app server that hosts the GIS part of the webapp. That app server is always running, even when I shutdown Tomcat. I looked at the source for WebappClassLoader: http://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk/java/org/apache/catalina/loader/ and I see that Tomcat is trying to terminate the thread that the apnxy web app started. I could stop the GIS service on the app server prior to restarting Tomcat, then start the app server. Part 2: What is the correct way to make connections to things that are not data sources in Tomcat? Can Tomcat manage the connection information (machine name, domain, user, password)? How? Making a server connection to an ArcGIS Server app server: http://resources.esri.com/help/9.3/arcgisserver/adf/java/help/api/arcobjects/com/esri/arcgis/server/ServerConnection.html PDUManagerImpl: http://edndoc.esri.com/arcobjects/9.2/Java/api/arcobjects/com/esri/arcgis/interop/PDUManagerImpl.html WebappClassLoader: http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/catalina/loader/WebappClassLoader.html Catalina logs: Jul 5, 2010 9:42:45 AM org.apache.coyote.http11.Http11AprProtocol pause INFO: Pausing Coyote HTTP/1.1 on http-80 Jul 5, 2010 9:42:45 AM org.apache.coyote.ajp.AjpAprProtocol pause INFO: Pausing Coyote AJP/1.3 on ajp-8009 Jul 5, 2010 9:42:46 AM org.apache.catalina.core.StandardService stop INFO: Stopping service Catalina Jul 5, 2010 9:42:47 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads SEVERE: A web application appears to have started a thread named [PDUManagerImpl-openConnection] but has failed to stop it. This is very likely to create a memory leak. Jul 5, 2010 9:42:47 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads SEVERE: A web application appears to have started a thread named [PDUManagerImpl-openConnection] but has failed to stop it. This is very likely to create a memory leak. Jul 5, 2010 9:42:47 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads SEVERE: A web application appears to have started a thread named [PDUManagerImpl-openConnection] but has failed to stop it. This is very likely to create a memory leak. Jul 5, 2010 9:42:47 AM org.apache.coyote.http11.Http11AprProtocol destroy INFO: Stopping Coyote HTTP/1.1 on http-80 Using CATALINA_BASE: C:\apache-tomcat-6.0.26 Using CATALINA_HOME: C:\apache-tomcat-6.0.26 Using CATALINA_TMPDIR: C:\apache-tomcat-6.0.26\temp Using JRE_HOME:C:\Program Files\Java\jdk1.6.0_20 Using CLASSPATH: C:\apache-tomcat-6.0.26\bin\bootstrap.jar Server version: Apache Tomcat/6.0.26 Server built: March 9 2010 1805 Server number: 6.0.26.0 OS Name:Windows 2003 OS Version: 5.2 Architecture: x86 JVM Version:1.6.0_20-b02 JVM Vendor: Sun Microsystems Inc. Leo Donahue
RE: How to call an external class from a webapp (i.e. - implement a plugin)
From: Goren Il [mailto:gore...@hotmail.com] Subject: Re: How to call an external class from a webapp (i.e. - implement a plugin) Aren't there other webapps that have plugin capabilities? The philosophy of the servlet spec is to have self-contained webapps, so plugins aren't really catered for. (Might be something in the 3.0 spec, but I haven't really studied it yet.) As an alternative to direct class calls, can you package the add-on as a separate context and reference it via forwarding or as a web service? - 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: WebappClassLoader clearReferencesThreads
From: Leo Donahue - PLANDEVX [mailto:leodona...@mail.maricopa.gov] Subject: WebappClassLoader clearReferencesThreads I looked at the source for WebappClassLoader: http://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk/java/ org/apache/catalina/loader/ and I see that Tomcat is trying to terminate the thread that the apnxy web app started. Which means Tomcat is trying to recover from sloppy programming in the webapp. It's the webapp's responsibility to manage all threads it creates, including terminating them when the webapp is stopped. What is the correct way to make connections to things that are not data sources in Tomcat? Can Tomcat manage the connection information (machine name, domain, user, password)? No, Tomcat cannot do that - there's nothing in the servlet spec that provides for that. (But check the 3.0 spec and Tomcat 7 - I haven't studied them yet.) It's up to the webapp to deal with outbound connections, and manage them properly to avoid resource leaks. Various 3rd-party libraries are available to help with that. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: FW: problem with org.apache.catalina.core.ApplicationHttpRequest method.
On 30/06/2010 16:23, Ranjix R wrote: Hi guys, sorry for the bother. I do have a question related to how a certain feature was implemented in Tomcat (6.0, probably all of them), that's why I address the question to the dev-list and the user-list. Cross-posting to both lists is poor netiquette. That will not have encouraged anyone to respond. The correct form, particularly when explicitly directed to post to the users list, is to do exactly that. If it is decided that a thread has become off-topic for the users list and should be on the dev list then it can always be moved there later. I do have a fairly complicated case, in which I have a filter for jsp's, and I use a custom request wrapper in the respective filter. My request wrapper overrides setAttribute and getAttribute (does some internal management, not relying on the super), Overriding without calling super is asking for trouble unless you are sure you are taking care of all the things that the super class is handling. As I already told you in the invalid Bugzilla entry you created, you should be calling super.getAttribute() and I had the surprise to see that the setAttribute from my wrapper doesn't get called from the org.apache.catalina.core.ApplicationHttpRequest setAttribute, at least not for the special attributes (and I need the javax.servlet.include attributes, which Tomcat considers special). There is nothing in the spec that says the container has to call setAttribute(). The only requirement is that these are made available via getAttribute() and they are. p.s. the code I believe is at fault is: Nope. The fault is in your wrapper code. 1. do you think is a big issue if I remove the if and I just use instead to instructions - - setSpecial(name, attribute); - getRequest().setAttribute... In my tests it seemed to work fine, but maybe I don't grasp all the implications. No idea. If you want to make a local change, you'll need to do the analysis and the testing. I can tell you such a change is highly unlikely to make it into the Tomcat source code. 2. any particular reason for calling the getRequest().setAttribute only for some (non-special) attributes, but not for others (javax.servlet.include.*)? At a guess, to prevent applications changing request attributes they shouldn't but I haven't checked that is what it is actually doing. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: favicon when serving non-html
On 06/07/2010 15:10, Dola Woolfe wrote: Hi, When I serve up, say, a PDF file, how do I control the favicon? Here's my code: response.reset(); response.setContentType(IOUtilities.gMIMEType(fn)); response.setHeader(Content-disposition, inline; filename= + file.getName()); OutputStream outStream = response.getOutputStream(); synchronized(response.getOutputStream()){ outStream.write(IOUtilities.gFile2Bytes(file.getAbsolutePath())); } response.flushBuffer(); Thanks in advance If you mean How do I specify which icon will be associated with a file that I make available for download? You can't - the OS will always be able to override it. The best you can do is present a recognisable MIME type in the setContentType method call. You're using another class there, so I can't see what you're actually setting. Do you know what is sent? p P.S. please note the following: - It's Tomcat, not Tom Cat. - The mailing list is now users@tomcat.apache.org not tomcat-u...@jakarta.apache.org. signature.asc Description: OpenPGP digital signature
Strange difference in behavior ELSupport in Tomcat 6.0.20 and Tomcat 6.0.26
Hi, I have a problem that i don't understand and i hope you can help me with. I migrate from Tomcat 6.0.20 to Tomcat 6.0.26 and suddenly i get an exception like this: 05-Jul-2010 16:22:50 org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet jsp threw exception javax.el.ELException: Cannot convert CREATION_TIME of type class com.docbox.tag.DocboxListColumn to class com.owt.tag.ListContent.GenericListColumn at org.apache.el.lang.ELSupport.coerceToEnum(ELSupport.java:155) at org.apache.el.lang.ELSupport.equals(ELSupport.java:110) at org.apache.el.parser.AstNotEqual.getValue(AstNotEqual.java:39) at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186) at org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:935) at org.apache.jsp.owt.list_005fcontent_jsp._jspx_meth_c_005fwhen_005f1(list_005fcontent_jsp.java:876) at org.apache.jsp.owt.list_005fcontent_jsp._jspx_meth_c_005fchoose_005f1(list_005fcontent_jsp.java:846) at org.apache.jsp.owt.list_005fcontent_jsp._jspService(list_005fcontent_jsp.java:282) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) etc etc... What i don't understand is why, with the same code , Tomcat 6.0.20 didn't complain. Is the type check in ELSupport stronger now? In my case i try to compare two different enums: DocboxListColumn and GenericListColumn, but they both implement interface ListColumn. I hope you can help me with an answer Thanks in advanced Roxana Frunza
Re: JNI error under tomcat: java.lang.UnsatisfiedLinkError
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dennis, On 7/5/2010 3:35 AM, dennis ch wrote: modelJNI.java === public final static native void initModel(); native code = #include HEC.h #include vector #include string [snip] void initModel() { You can't use JNI like that. You have to use the 'javah' header-fine generator and then write your native code to that specification. For a class called JNITest and a method called doSomething that takes no arguments, the method signature needs to be: JNIEXPORT void JNICALL Java_JNITest_doSomething (JNIEnv *, jclass); You might want to read-up on using JNI: it's not as simple at the IJW stuff C# provides. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkwzZmQACgkQ9CaO5/Lv0PDqIQCfUHTmhYzd+iMN6z2ZS3F27z2p WGgAni70v3qoAt66x+TuD0JUkRiFXeRZ =Srci -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: favicon when serving non-html
Thanks for the responses. When I serve up a pdf file with the code below, it shows it in an embedded acrobat, as desired. However, the icon in the browser (in the tab) is the Tomcat logo. I'd like to change it to something else. - Original Message From: Pid p...@pidster.com To: Tomcat Users List users@tomcat.apache.org Sent: Tue, July 6, 2010 1:10:08 PM Subject: Re: favicon when serving non-html On 06/07/2010 15:10, Dola Woolfe wrote: Hi, When I serve up, say, a PDF file, how do I control the favicon? Here's my code: response.reset(); response.setContentType(IOUtilities.gMIMEType(fn)); response.setHeader(Content-disposition, inline; filename= + file.getName()); OutputStream outStream = response.getOutputStream(); synchronized(response.getOutputStream()){ outStream.write(IOUtilities.gFile2Bytes(file.getAbsolutePath())); } response.flushBuffer(); Thanks in advance If you mean How do I specify which icon will be associated with a file that I make available for download? You can't - the OS will always be able to override it. The best you can do is present a recognisable MIME type in the setContentType method call. You're using another class there, so I can't see what you're actually setting. Do you know what is sent? p P.S. please note the following: - It's Tomcat, not Tom Cat. - The mailing list is now users@tomcat.apache.org not tomcat-u...@jakarta.apache.org. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: favicon when serving non-html
The usual way to specify the favicon is by putting it at the root of the web site, e.g. http://www.example.com/favicon.ico. On the server, this file is usually found in [Tomcat dir]/webapps/ROOT/favicon.ico - change that file to whatever icon you want. There are some other ways to specify the favicon, but I don't know if they're supported by all browsers. References: http://www.w3.org/2005/10/howto-favicon http://en.wikipedia.org/wiki/Favicon -- Len On Tue, Jul 6, 2010 at 14:34, Dola Woolfe dolac...@yahoo.com wrote: Thanks for the responses. When I serve up a pdf file with the code below, it shows it in an embedded acrobat, as desired. However, the icon in the browser (in the tab) is the Tomcat logo. I'd like to change it to something else. - Original Message From: Pid p...@pidster.com To: Tomcat Users List users@tomcat.apache.org Sent: Tue, July 6, 2010 1:10:08 PM Subject: Re: favicon when serving non-html On 06/07/2010 15:10, Dola Woolfe wrote: Hi, When I serve up, say, a PDF file, how do I control the favicon? Here's my code: response.reset(); response.setContentType(IOUtilities.gMIMEType(fn)); response.setHeader(Content-disposition, inline; filename= + file.getName()); OutputStream outStream = response.getOutputStream(); synchronized(response.getOutputStream()){ outStream.write(IOUtilities.gFile2Bytes(file.getAbsolutePath())); } response.flushBuffer(); Thanks in advance If you mean How do I specify which icon will be associated with a file that I make available for download? You can't - the OS will always be able to override it. The best you can do is present a recognisable MIME type in the setContentType method call. You're using another class there, so I can't see what you're actually setting. Do you know what is sent? p P.S. please note the following: - It's Tomcat, not Tom Cat. - The mailing list is now users@tomcat.apache.org not tomcat-u...@jakarta.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: favicon when serving non-html
From: Dola Woolfe [mailto:dolac...@yahoo.com] Subject: Re: favicon when serving non-html When I serve up a pdf file with the code below, it shows it in an embedded acrobat, as desired. However, the icon in the browser (in the tab) is the Tomcat logo. Again, take a look at the HTTP requests you're getting. There will be a separate GET favicon.ico request which is normally handled by Tomcat's DefaultServlet, delivering the webapps/ROOT/favicon.ico file. You can either intercept that request with your own servlet or filter, or just change the favicon.ico file in the above location to be whatever you want. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Strange difference in behavior ELSupport in Tomcat 6.0.20 and Tomcat 6.0.26
On 06/07/2010 18:20, Roxana wrote: Hi, I have a problem that i don't understand and i hope you can help me with. I migrate from Tomcat 6.0.20 to Tomcat 6.0.26 and suddenly i get an exception like this: 05-Jul-2010 16:22:50 org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet jsp threw exception javax.el.ELException: Cannot convert CREATION_TIME of type class com.docbox.tag.DocboxListColumn to class com.owt.tag.ListContent.GenericListColumn at org.apache.el.lang.ELSupport.coerceToEnum(ELSupport.java:155) at org.apache.el.lang.ELSupport.equals(ELSupport.java:110) at org.apache.el.parser.AstNotEqual.getValue(AstNotEqual.java:39) at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186) at org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:935) at org.apache.jsp.owt.list_005fcontent_jsp._jspx_meth_c_005fwhen_005f1(list_005fcontent_jsp.java:876) at org.apache.jsp.owt.list_005fcontent_jsp._jspx_meth_c_005fchoose_005f1(list_005fcontent_jsp.java:846) at org.apache.jsp.owt.list_005fcontent_jsp._jspService(list_005fcontent_jsp.java:282) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) etc etc... What i don't understand is why, with the same code , Tomcat 6.0.20 didn't complain. Is the type check in ELSupport stronger now? In my case i try to compare two different enums: DocboxListColumn and GenericListColumn, but they both implement interface ListColumn. I hope you can help me with an answer Bit of a mystery without seeing the JSP content. p signature.asc Description: OpenPGP digital signature
Re: SSL Not working on tomcat 5.5.29
Server.xml is well formed as I can render it in IE. Also, the cert path is right. Konstantin Kolinko wrote: 2010/7/6 kareem_s_m kareemud...@gmail.com: When I run in NON SSL (port 8080, stuff is written to the log files). When I run under SSL (8443) nothing is written to the same log files. In the configuration fragment that you provided you are running with all 8080, 8443, 8009 at the same time. If you are adding an XML comment around unneeded connectors, maybe you are doing it wrong, and thus your server.xml is not a well-formed XML file? (You know, XML comments cannot contain -- and thus comments cannot be nested). A trivial question: your keystore is now in a new path. Have you copied it to the new location? keystoreFile=E:\apps\thirdparty\apache-tomcat-5.5.29 orig\selfcert.jks How did you install Tomcat, and how are you running it? Not answered. Do you install it as a service, or you are using *.bat files? Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://old.nabble.com/SSL-Not-working-on-tomcat-5.5.29-tp29052531p29090432.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to split the default stdout log?
My Environment: Using CATALINA_BASE: D:\tomcat5528 Using CATALINA_HOME: D:\tomcat5528 Using CATALINA_TMPDIR: D:\tomcat5528\temp Using JRE_HOME:D:\java\jdk1.5.0_12 Using CLASSPATH: D:\tomcat5528\bin\bootstrap.jar Server version: Apache Tomcat/5.5.28 Server built: Jul 24 2009 01:33:09 Server number: 5.5.28.0 OS Name:Windows Vista OS Version: 6.1 Architecture: x86 JVM Version:1.5.0_12-b04 JVM Vendor: Sun Microsystems Inc. I have used the tomcat unzipped from the zip file, and added it in the system service using service.bat install. The default setting of the stdout in the Logging tabpage is : auto, at this situation, when tomcat runs, it will generate log file in D:\tomcat5528\log folder, and the related log file name will be stdout_20100707.log. If I set that box to a fixed file, such as tomcat.log, then if tomcat restarts, it will generate a file called tomcat.log. Before the next restart (maybe many months), all the output info are appended to that file, which makes the log file to large. On Tue, Jul 6, 2010 at 10:24 PM, André Warnier a...@ice-sa.com wrote: 郑翼羽 wrote: Thanks. The bad news is all the output codes are in a single webapp, and have no hope to use log4j instead of the current system.out codes. Just I hope to find a way that can make tomcat generate a stdout.log file eveyday, or at any interval. Hi again. I tried what I suggested earlier (with the Apache rotatelogs utility), but that does not seem to work. (*) Can you confirm : 1) that you are running Tomcat 5.5 as a Windows Service 2) if yes, what you currently see when you run the tomcat5w.exe GUI, in the Logging tab, in the boxes for STDOUT and STDERR 3) what name do your logfiles have ? Thanks (*) When i do that, I get a logfile tomcat_dir/logs/jakarta_service_20100706.log containing 2 lines : [2010-07-06 16:12:50] [591 javajni.c] [error] Could not create instance of java/io/FileOutputStream [2010-07-06 16:12:50] [591 javajni.c] [error] Could not create instance of java/io/FileOutputStream from which i suspect that the tomcat5.exe/procrun wrapper does not like it, when one tries to give it something like this as a destination for its logfiles : |c:/tomcat5.5/bin/rotatelogs.exe -l C:/Tomcat5.5/logs/stdout.%Y.%m.%d 86400 (I also tried flipping the slashes the other way, with no more success). This was with C:\Tomcat5.5\binversion.bat Using CATALINA_BASE: C:\Tomcat5.5 Using CATALINA_HOME: C:\Tomcat5.5 Using CATALINA_TMPDIR: C:\Tomcat5.5\temp Using JRE_HOME:C:\Java6jdk Using CLASSPATH: C:\Tomcat5.5\bin\bootstrap.jar Server version: Apache Tomcat/5.5.26 Server built: Jan 28 2008 01:35:23 Server number: 5.5.26.0 OS Name:Windows XP OS Version: 5.1 Architecture: x86 JVM Version:1.6.0_06-b02 JVM Vendor: Sun Microsystems Inc. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- 郑翼羽