Multiple instances of tomcat
I have a tomcat 4-1-27 running on RedHat 2.4.21. Normally when you startup tomcat it will create a single instance, I have however about 28 created right away. I understand that they all share the same memory, but I don?t think this is a normal behavior. What can be causing this? DarekC - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multiple instances of tomcat
On Sat, Mar 12, 2005 at 12:21:10AM -0800, Darek wrote: : I have a tomcat 4-1-27 running on RedHat 2.4.21. Normally : when you startup tomcat it will create a single instance, I : have however about 28 created right away. I understand that : they all share the same memory, but I don?t think this is a : normal behavior. What can be causing this? 1/ please post a *new* message when writing to the list. Replying to an old (unrelated) message confuses thread-aware mailers, which makes your question harder to find (and thus answer). 2/ Are these separate Tomcat instances, or just PIDs? Pre-NPTL Linux kernels show threads as separate processes. That's likely what you're seeing. -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Wrong date / calendar after server has been running for long time
Hi, We are using Tomcat 5.0.28 running a Tapestry website for our company. A weird bug occurred and I am not sure if it's Java or Tomcat bug. Logging (new Date()).toString() or Calendar.getInstance().getTime().toString() normally returns the correct clock value at the timezone of our server (HKT or GMT+8). But when the server has continuously run say 2 days the log message showed that the toString() values of all Date objects changed to UTC and the time values are all offset by -8 hours. This caused very serious problem for our production application because we very much depends on the server clock to do various automatic scheduled jobs and logging user behaviours at different times. When the server has been restarted everything gets back to normal until pehaps 2 days later when it'd suddenly go wild again. I tried to set the default TimeZone but it seems to produce other unexpected effects in complicated ways such as affecting some date-sensitive 3rd party components (which we cannot make changes to) breaking many datetime dependent operations in them. I never encountered similar errors with non-web Java apps so I suspect this is more likely a Tomcat bug. But please correct me if I am wrong. Thanks a lot for help. Raymond
starting tomcat from eclipse
I thought I had solved the problem by removing a faulty CLASSPATH environment variable, but no: still the same problem. I am at a loss, so any help is much appreciated. My config is jdk1.5/eclipse3.0.1/spindle v.???/tomcatPluginV3/tomcat5.5.7/Win2k. This is what I see in the console window when I try to start tomcat. The project klapa9 is a tapestry project and uses cayenne and jtds. cayenne.jar is in WEB-INF/lib and jtds was added as an external .jar. A similar setup seems to work flawlessly on linux. 0 [main] INFO http11.Http11Protocol - Initializing Coyote HTTP/1.1 on http-8080 15 [main] INFO startup.Catalina - Initialization processed in 1625 ms 406 [main] INFO core.StandardService - Starting service Catalina 437 [main] INFO core.StandardEngine - Starting Servlet Engine: Apache Tomcat/5.5.7 484 [main] INFO core.StandardHost - XML validation disabled 1453 [main] ERROR [localhost].[/klapa9] - Exception starting filter redirect java.lang.NoClassDefFoundError: javax/servlet/Filter at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) at java.net.URLClassLoader.access$100(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1247) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1181) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:211) at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:308) at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:79) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3508) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4079) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:590) at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:535) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:470) [snip] --- Btw, these are my web.xml and klapa9.xml files, respectively, if it helps anything: klapa9 redirect org.apache.tapestry.RedirectFilter redirect / klapa9 org.apache.tapestry.ApplicationServlet 1 klapa9 /app Sorry for the long post, just trying to provide relevant information. Tomislav - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
installing admin for tomcat 5.5.7..error!
hi i downloaded the admin package for tomcat 5.5.7. i want to install them, so i tried copying the file admin.xml to d:\jakarta-tomcat-5.5.7\conf\Catalina\localhost\ but then the error msg appeared: Mar 12, 2005 11:37:31 PM org.apache.catalina.core.StandardContext start SEVERE: Error in resourceStart() Mar 12, 2005 11:37:31 PM org.apache.catalina.core.StandardContext start SEVERE: Error getConfigured Mar 12, 2005 11:37:31 PM org.apache.catalina.core.StandardContext start SEVERE: Context startup failed due to previous errors Mar 12, 2005 11:37:31 PM org.apache.catalina.core.StandardContext start SEVERE: Exception during cleanup after start failed LifecycleException: Container org.apache.catalina.core.ContainerBase.[Catalina] .[localhost].[/admin] has not been started at org.apache.catalina.core.StandardContext.stop(StandardContext.java:42 31) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4 101) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase .java:759) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:73 9) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.ja va:590) at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.j ava:535) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:470 ) at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1169) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java :292) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl eSupport.java:119) at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBas e.java:1301) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.p rocessChildren(ContainerBase.java:1561) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.p rocessChildren(ContainerBase.java:1570) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.r un(ContainerBase.java:1550) at java.lang.Thread.run(Thread.java:534) and the admin.xml file i copied to the d:\jakarta-tomcat-5.5.7-admin\conf\Catalina\localhost are being deleted! can anyone please tell me what did i do wrong? __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: starting tomcat from eclipse
I am using sysdeo tomcat integration plugin for eclipse. it flawlessly integrates into eclipse. you can try this out. it is avaliable at http://www.sysdeo.com/eclipse/tomcatPlugin.html Regards, Amrish On Sat, 12 Mar 2005 15:17:59 +0100, "t.n.a." <[EMAIL PROTECTED]> wrote: > I thought I had solved the problem by removing a faulty CLASSPATH > environment variable, but no: still the same problem. I am at a loss, so > any help is much appreciated. > My config is jdk1.5/eclipse3.0.1/spindle > v.???/tomcatPluginV3/tomcat5.5.7/Win2k. > This is what I see in the console window when I try to start tomcat. The > project klapa9 is a tapestry project and uses cayenne and jtds. > cayenne.jar is in WEB-INF/lib and jtds was added as an external .jar. A > similar setup seems to work flawlessly on linux. > > > 0 [main] INFO http11.Http11Protocol - Initializing Coyote HTTP/1.1 on > http-8080 > 15 [main] INFO startup.Catalina - Initialization processed in 1625 ms > 406 [main] INFO core.StandardService - Starting service Catalina > 437 [main] INFO core.StandardEngine - Starting Servlet Engine: Apache > Tomcat/5.5.7 > 484 [main] INFO core.StandardHost - XML validation disabled > 1453 [main] ERROR [localhost].[/klapa9] - Exception starting filter > redirect > java.lang.NoClassDefFoundError: javax/servlet/Filter > at java.lang.ClassLoader.defineClass1(Native Method) > at java.lang.ClassLoader.defineClass(ClassLoader.java:620) > at > java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) > at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) > at java.net.URLClassLoader.access$100(URLClassLoader.java:56) > at java.net.URLClassLoader$1.run(URLClassLoader.java:195) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(URLClassLoader.java:188) > at java.lang.ClassLoader.loadClass(ClassLoader.java:306) > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268) > at java.lang.ClassLoader.loadClass(ClassLoader.java:251) > at > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1247) > at > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1181) > at > org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:211) > at > org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:308) > at > org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:79) > at > org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3508) > at > org.apache.catalina.core.StandardContext.start(StandardContext.java:4079) > at > org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759) > at > org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739) > at > org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524) > at > org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:590) > at > org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:535) > at > org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:470) > [snip] > --- > > Btw, these are my web.xml and klapa9.xml files, respectively, if it > helps anything: > > > klapa9 > > redirect > org.apache.tapestry.RedirectFilter > > > redirect > / > > > klapa9 > > org.apache.tapestry.ApplicationServlet > 1 > > > klapa9 > /app > > > > > docBase="D:/posao/klapa9/context" debug="6" > workDir="D:/posao/klapa9/radni"/> > > Sorry for the long post, just trying to provide relevant information. > > Tomislav > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Regards, Amrish - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multiple instances of tomcat
All those are threads; tomcat creates 2 at first and the second forks the rest, if you kill either one tomcat will exit. I am asking because another server with the same configuration shows only one single thread. There are some problems with applications on the first server, which seem to be related to the memory. Both servers are running on 2.4.21 kernel and only one of them shows multiple threads when ps is executed, while both have tomcat 4.1.27 and j2sdk1.4.2_04. i am not sure what have I missed. Documentation mentions CATALINA_BASE that when defined implies multiple virtual hosts. I am not sure what I have done, while configuration files look exactly same. I appreciate your help. DarekC On Sat, 12 Mar 2005 07:17:28 -0600 QM <[EMAIL PROTECTED]> wrote: >On Sat, Mar 12, 2005 at 12:21:10AM -0800, Darek wrote: >: I have a tomcat 4-1-27 running on RedHat 2.4.21. >Normally >: when you startup tomcat it will create a single >instance, I >: have however about 28 created right away. I understand >that >: they all share the same memory, but I don?t think this >is a >: normal behavior. What can be causing this? > >1/ please post a *new* message when writing to the list. > Replying to >an old (unrelated) message confuses thread-aware mailers, >which makes >your question harder to find (and thus answer). > >2/ Are these separate Tomcat instances, or just PIDs? > Pre-NPTL Linux >kernels show threads as separate processes. That's likely >what you're >seeing. > >-QM > >-- > >software -- http://www.brandxdev.net >tech news -- http://www.RoarNetworX.com > > >- >To unsubscribe, e-mail: >[EMAIL PROTECTED] >For additional commands, e-mail: >[EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
party off - see ya later
Hey all, Mom called me this morning to tell me the party is off. Therefore, I'll re-schedule my visit for when she is back home from helping Sid recover. Lova ya'll and see ya later than sooner I guess. Eric - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Servlet Streaming file to client: Can't override file name
I wrote a simple servlet that streams a file to the requesting client. Everything works fine except I can't figure out how to override the filename that Tomcat provides by default to the client for the incoming file. The filename presened to the client is the name of the web app. The HttpServletResponse object that Tomcat passes to the servlet provides access to an OutputStream object, and I see no way to set the filename with an object of that class. If Tomcat passed a FileOutputStream object (child of OutputStream), I could call a constructor that sets the file name or file descriptor, but casting the OutputStream to a FileOutputStream is not permitted. According to the API, the OutputStream object that Tomcat passess to the servlet is actually a ServletOutputStream object, which is an abstract child of OutputStream. Is there a concrete child of ServletOutputStream that I could cast it to, that would let me specify the filename? Is this something configurable in Tomcat? Any other way to set the filename? Here's my servlet code. package FileSnatcher; import javax.servlet.*; import javax.servlet.http.*; import java.io.*; import javax.activation.MimetypesFileTypeMap; /** * Title: * * Description: * * Copyright: Copyright (c) 2005 * * Company: * * @author not attributable * @version 1.0 */ public class FileSender extends HttpServlet{ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException{ String file = request.getParameter("file"); MimetypesFileTypeMap mimeTypes = new MimetypesFileTypeMap ("C:\\Program Files\\Java\\jdk1.5.0_01\\lib\\mime.types"); String mime = mimeTypes.getContentType(new File(file)); response.setContentType(mime); FileInputStream in = new FileInputStream(new File(file)); OutputStream out = response.getOutputStream(); byte[] buf = new byte[1024]; int i = 0; while((i=in.read(buf))!=-1) { out.write(buf, 0, i); } in.close(); out.close(); } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Why doesn't JSP precompilation solve this problem?
I'm using Tomcat v5.0.28 and have built a Struts-based application, using Tiles, to construct the web pages. When I deploy the application, and I newly visit each page, all of the text is displayed but the other visual elements (such as font-sizes, table layouts, colours, and other formatting set by CSS)appear "broken". When I'm developing the pages and want to check that they are visually correct, I lose a lot of time having to re-hit the pages -- sometimes up to twenty times before they will render properly -- and it's driving me bonkers! I thought the problem might have something to do with the fact that the JSPs have to be compiled by Tomcat (Jasper) when they are first accessed. However, I now precompile all of my JSPs before deploying the application but exactly the same problems occur. I have no idea why this is happening. Can anyone explain why? And, especially, can anyone tell me how to resolve this? Sincerely, Frank Burns. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Why doesn't JSP precompilation solve this problem?
When I deploy the application, and I newly visit each page, all of the text is displayed but the other visual elements (such as font-sizes, table layouts, colours, and other formatting set by CSS)appear "broken". are you using container-managed security? are your .css files in a different application context than the page? is your browser MSIE6? if so, this *might* be similar to a problem i'm having, which stems from the fact that tomcat will serve unauthenticated http 304s ("Not Modified"). so IE will render the page content it has cached, but if the .css files come from a different context (or maybe even the same one, i haven't tried it like that) IE won't reload them - and apparently it doesn't cache them like it does the page. and you get non-styled ugliness. haven't got a solution, short of filing the 403s thing as a bug, but this might help explain what you're seeing... --alex. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Exception on JDBCRealm Authorization
Alex, Thanks so much for doing the research on this. I do have a few questions. Has Tomcat acknowledged this and agreed that it will be fixed in 5.5.8? Any ETA for 5.5.8? Unless I'm missing something, this seems like it was be a pretty high severity bug. Or are you and I the only two people using JDBC Realms with 5.5.7? Is there no mechanism for putting out patch jar files? One last question... is it possible to extract a JDBCRealm jar file from 5.5.4 without having to completely uninstall and reinstall all of Tomcat? (and if so, what is the jar file name?) Thanks again. Jerry -Original Message- From: alexander dosher [mailto:[EMAIL PROTECTED] Sent: Friday, March 11, 2005 9:18 PM To: Tomcat Users List Subject: Re: Exception on JDBCRealm Authorization "J Malcolm" <[EMAIL PROTECTED]> sez: > Just moved to 5.5.7. After the server runs for several hours, I > start getting the following exception on JDBCRealm access. hello. i've just worked through the same problem in the past week, and with the help of the list (thanks Remy Maucherat & Hassan Schroeder!) solved it - so to save them some repetition... what is happening is mysql is dropping the unused connection, and JDBCRealm (since 5.5.4) isn't picking it up again. solutions are to go back to 5.5.4 JDBCRealm, or use DataSourceRealm in 5.5.7, or wait for 5.5.8. see the thread http://marc.theaimsgroup.com/?t=11103082883&r=1&w=2 for more details. share and enjoy, alex. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Urgent: Doubt about Chunking
Hi, I am using Tomcat 4.1.31. When my client send the request using the protocol HTTP 1.1, the server does not enable chunking in your response. However, when I am using Tomcat 4.1.12, the server enable chunking. What is problem with the Tomcat 4.1.31? Can somebody help me? Thanks, Ana Carolina - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
HTTP Status 404
Hello: I keep getting "HTTP status 404" messages with regular frequency, eventhough the resources the "tomcat" is complaining about are present. I was wondering anybody has experiences/comments/suggestions as to the reasons behind these messages. The environment: Tomcat - v. 4.1.31 OS - RedHat Enterprise Linux 3.0 Browser - Mozilla (1.4 on Linux, 1.7.3 on Windows) The Message is: type: Status Report message: /project.jsp description: The requested resource (/project.jsp) is not available. Any helpful comments are welcome. Thanks in advance. p.s: after couple of back arrows, the above message corrects itself mysteriously. Unfortunately, this solution is not a viable option! Kind regards, Vasu Nugala - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
I'm using a linux server (fedora core 2) which has
apache 2.0.51 installed, as well as Tomcat 5.0, but Tomcat only runs standalone and I would like to hook it up as Apache's java server. But I'm not sure what version of mod_jk to use -- I believe it needs to be a matched set with the apache version? Anyone know what version of mod_jk I should install, or how to find out, and possibly where to download it? Thanks. -Pete - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]