Tomcat Threads hanging in read()
Hello, I am using Tomcat 4.1.29, with Coyote HTTP Connector. After a few hours of uptime, I get an error on the log telling that all threads are busy. The workload is not high on the server. Getting a dump of Tomcat Threads I see that most of them are stuck in a read() method on the socket: TP-Processor104 daemon prio=5 tid=0x005730b0 nid=0x1d38c00 runnable [f42f3000..f42f5b20] at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:129) at org.apache.coyote.http11.InternalInputBuffer.fill(InternalInputBuffer.java:777) at org.apache.coyote.http11.InternalInputBuffer$InputStreamInputBuffer.doRead(InternalInputBuffer.java:807) at org.apache.coyote.http11.filters.IdentityInputFilter.doRead(IdentityInputFilter.java:158) at org.apache.coyote.http11.InternalInputBuffer.doRead(InternalInputBuffer.java:742) at org.apache.coyote.Request.doRead(Request.java:457) at org.apache.coyote.tomcat4.CoyoteInputStream.readBytes(CoyoteInputStream.java:197) at org.apache.coyote.tomcat4.CoyoteInputStream.read(CoyoteInputStream.java:154) at java.io.DataInputStream.readFully(DataInputStream.java:266) at java.io.DataInputStream.readFully(DataInputStream.java:242) at ServletHandler$ServletForwardCommand.execute(ServletHandler.java:376) at ServletHandler.doPost(ServletHandler.java:191) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) Doing a netstat -a on the server shows me a growing number of sockets in ESTABLISHED state sitting there. I see no way I can in the servlet setup a timeout on the read() on the InputStream I get from the HttpServletRequest, and cleanly stop the execution of the doPost() method. It seems that the connectionTimeout attribute for the Connector is not meant for this. I did not find any way to set the SO_TIMEOUT on the socket since I don't have any access to it. I did not find any Java property either to set this. So I'm kind of stuck here. If any of you has any idea, thanks for your help. Eric. __ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JSP 2.1 support?
Does anyone know when JSP 2.1 support is expected? Will that be in Tomcat 6? Jon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: basic authentication won't accept password (intermittent)
Hi again, I just discovered bug 33157: basic authentication fails in some cases, reported in Tomcat 5.5.4. http://issues.apache.org/bugzilla/show_bug.cgi?id=33157 It doesn't describe my exact problem, but it's the best theory so far. Unfortunately the hosting provider is unlikely to install 5.5.9 in the near future ;-) Will report back to the list when the resolution is known. Best, Eric:) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
basic authentication won't accept password (intermittent)
Hello, My client has a password-protected folder (as shown in the snippet from my web.xml below). The problem is that, when accessing a protected resource (/members/jobs/index.html), it sometimes asks for the login several times before returning the requested page. (This is using BASIC authentication, so the browser pops up a dialog in response to the 401.) Occasionally it gives up and shows the 401 Unauthorized error page instead. This problem is reproducible across several browsers on Windows 2000 (IE6, Firefox, Opera, lynx ...). The Authorization header is the same for both successful and unsuccessful requests. Hosting provider's environment: Linux 2.4.24 on i686 Apache 2.0.47 Tomcat 5.5.4 Java: Blackdown-1.4.2-rc1 In server.xml, I've increased maxThreads to 250, although this is not a high-volume site. (Obviously I'm shooting in the dark at this point ;-) My questions are: (1) Where should we look for misconfiguration, whether in my app or in the hosting environment? (2) Is there any other explanation for this behavior? This is my first Tomcat site in production, so hopefully it's a configuration problem. I appreciate any suggestions! Thanks, Eric:) === from my web.xml === login-config auth-methodBASIC/auth-method realm-nameMembers Area/realm-name /login-config security-role descriptionAuthorized members/description role-namemembers/role-name /security-role security-constraint !-- the admin sections -- web-resource-collection web-resource-nameSearch Engine/web-resource-name url-pattern/jsp/admin/*/url-pattern /web-resource-collection web-resource-collection web-resource-nameData Listing/web-resource-name url-pattern/list.do/url-pattern /web-resource-collection auth-constraint role-nameadmin/role-name /auth-constraint /security-constraint security-constraint !-- the members-only section -- web-resource-collection web-resource-namemembers area/web-resource-name url-pattern/members/*/url-pattern /web-resource-collection auth-constraint role-namemembers/role-name /auth-constraint /security-constraint - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Trouble with multipart/form-data and servlet name
Hello, I'm testing our applicatio under Tomcat 5.5.9 (under Linux and with sun jdk 1.4.2_08) and I have the following behaviour: The getServletName() return org.apache.catalina.INVOKER.com.sharedvalue.document.servlet.admin.UploadFiles when I use a form with enctype=multipart/form-data that call a servlet named com.sharedvalue.document.servlet.admin.UploadFiles. I was expecting com.sharedvalue.document.servlet.admin.UploadFiles. This behaviour occurs only when the form is a multipart. As this breaks some functionnality in our application, I would like to know it's a normal behaviour ? Thanks in advance, -Eric - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
robots.txt
The msn bot has been hammering one of my webapps for about 2 weeks now. I have a calendar style transaction page that is not password protected. Essentially this calendar goes on forever. This means that the msn bot is basically going on forever. It is making my log files insanely large. Is there a way to create a robots.txt file for basically one servlet instead of everything? thanks for your help, eric - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: robots.txt
thanks for your help with both the meta solution as well as the servlet solution. ~eric - Original Message - From: Mark Benussi [EMAIL PROTECTED] To: tomcat-user@jakarta.apache.org Sent: Thursday, July 14, 2005 2:22 PM Subject: Re: robots.txt With follow = false or something cant remember the exact syntax Original Message Follows From: Tim Funk [EMAIL PROTECTED] Reply-To: Tomcat Users List tomcat-user@jakarta.apache.org To: Tomcat Users List tomcat-user@jakarta.apache.org Subject: Re: robots.txt Date: Thu, 14 Jul 2005 14:14:32 -0400 Place a robots meta tag in the head tag of your html. -Tim Eric J. Pastoor wrote: The msn bot has been hammering one of my webapps for about 2 weeks now. I have a calendar style transaction page that is not password protected. Essentially this calendar goes on forever. This means that the msn bot is basically going on forever. It is making my log files insanely large. Is there a way to create a robots.txt file for basically one servlet instead of everything? - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how can I put enable a button when a servlet has finished.
you can enable and disable buttons through javascript - Original Message - From: password password [EMAIL PROTECTED] To: tomcat-user@jakarta.apache.org Sent: Tuesday, July 12, 2005 12:18 PM Subject: how can I put enable a button when a servlet has finished. Hi, I have a jsp page, and when I click a button it puts disable this button and calls a servlet. This servlet update a table of a database. I want to enable the button when the servlet has finished. How can I put enable this button? Thanks. - Correo Yahoo! Comprueba qué es nuevo, aquí http://correo.yahoo.es - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Session Replication Valve Cross Context Dispatching
I have been working on getting session replication working for a set of web applications that use cross context dispatching. I ran into a problem where the session for the context the request is being made to is being replicated correctly but the session for the context(s) being dispatched to are not being replicated at all. The contextA servlet handling the request modifies its session then does a cross context dispatch to another servlet in contextB which also modifies its session. In this case two different sessions (one for contextA and another for contextB) have been modified. After the request is complete only the contextA session is replicated. After a fair amount of digging into the tomcat code I think I have an understanding of how session replication works and what is going on in this case. The following stack trace was captured just before the servlet in contextB is called. The stack items above and below the lines is tomcat code. From what I've been able to figure out configuring Clustering in tomcat adds the ReplicationValve to the chain of valves the request goes through before getting to the servlet. After the servlet is called this valve calls the Manager for this context to inform it the request is complete and that replication should be done. The ReplicationValve is in the bottom 1/3 of the stack. In the top 1/3 of the stack is the tomcat code to execute a cross context dispatch. There is no ReplicationValve or other filter in this stack so after the dispatch is complete there is no code called to inform the manager of the other context that the request is complete and replication should be performed. Is there any way to get tomcat to replicate the session for contexts that are accessed via cross context dispatches during a request? Thank you -Eric Dalquist Thread [TSP-Processor3] (Suspended) ApplicationFilterChain.internalDoFilter(ServletRequest, ServletResponse) line: 234 ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) line: 173 ApplicationDispatcher.invoke(ServletRequest, ServletResponse) line: 672 ApplicationDispatcher.doInclude(ServletRequest, ServletResponse) line: 574 ApplicationDispatcher.include(ServletRequest, ServletResponse) line: 499 -- PortletInvokerImpl.invoke(PortletRequest, PortletResponse, Integer) line: 120 PortletInvokerImpl.action(ActionRequest, ActionResponse) line: 68 PortletContainerImpl.processPortletAction(PortletWindow, HttpServletRequest, HttpServletResponse) line: 150 CPortletAdapter.setRuntimeData(ChannelRuntimeData, String) line: 578 MultithreadedPrivilegedCacheableDirectResponseCharacterChannelAdapter(MultithreadedCharacterChannelAdapter).setRuntimeData(ChannelRuntimeData) line: 29 ChannelManager.feedRuntimeDataToChannel(IChannel, HttpServletRequest) line: 896 ChannelManager.processRequestChannelParameters(HttpServletRequest) line: 841 ChannelManager.startRenderingCycle(HttpServletRequest, HttpServletResponse, UPFileSpec) line: 981 UserInstance.processPortletActionIfNecessary(HttpServletRequest, HttpServletResponse) line: 203 UserInstance.writeContent(HttpServletRequest, HttpServletResponse) line: 177 PortalSessionManager.doGet(HttpServletRequest, HttpServletResponse) line: 253 PortalSessionManager(HttpServlet).service(HttpServletRequest, HttpServletResponse) line: 689 PortalSessionManager(HttpServlet).service(ServletRequest, ServletResponse) line: 802 -- ApplicationFilterChain.internalDoFilter(ServletRequest, ServletResponse) line: 252 ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) line: 173 StandardWrapperValve.invoke(Request, Response) line: 213 StandardContextValve.invoke(Request, Response) line: 178 StandardHostValve.invoke(Request, Response) line: 126 ReplicationValve.invoke(Request, Response) line: 145 ErrorReportValve.invoke(Request, Response) line: 105 StandardEngineValve.invoke(Request, Response) line: 107 CoyoteAdapter.service(Request, Response) line: 148 JkCoyoteHandler.invoke(Msg, MsgContext) line: 307 HandlerRequest.invoke(Msg, MsgContext) line: 385 ChannelSocket.invoke(Msg, MsgContext) line: 748 ChannelSocket.processConnection(MsgContext) line: 678 SocketConnection.runIt(Object[]) line: 871 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Change in StandardManager breaks SimpleTcpReplicationManager (TC5.5.9)
There was a change in the StandardManager class for Tomcat 5.5.9 that deprecated the createSession method and created the createSession(sessionId) method to allow emptySessionPath=true to work. The SimpleTcpReplicationManager which subclasses StandardManager was not updated to reflect this change. Now if you try to use the SimpleTcpReplicationManager with the emptySessionPath=true configuration set the follow exception is thrown: ERROR org.apache.catalina.cluster.session.SimpleTcpReplicationManager - [Unable to replicate session] 2005-06-22 13:13:42,657 java.lang.ClassCastException: org.apache.catalina.session.StandardSession at org.apache.catalina.cluster.session.SimpleTcpReplicationManager.requestCompleted(SimpleTcpReplicationManager.java:258) at org.apache.catalina.cluster.tcp.ReplicationValve.invoke(ReplicationValve.java:206) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:307) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:385) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:748) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:678) at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:871) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) Doing some debugging it looks like Request.doGetSession(boolean) line: 2204 calls public Session createSession(String sessionId); from the manager interface. Since SimpleTcpReplicationManager does not override this method but overrides the public Session createSession(); method the call goes directly into the StandardManager which returns a StandardSession. When the SimpleTcpReplicationManager attempts to replicate this session later it fails when trying to cast it to ReplicatedSession. I've created a bug in bugzilla for the problem: http://issues.apache.org/bugzilla/show_bug.cgi?id=35473 I'm going to try and get a fix working locally but I've never tried to compile tomcat before. Any help would be much appreciated. -Eric Dalquist - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Connecting Tomcat 5.0.30 to Apache 2.0.54
I am on FreeBSD 5.4. I installed Tomcat just fine and Apache just fine and all is well. Now I am trying to connect them together with the JK 1.2.10 source. I do the ./configure --with-apxs=/usr/local/apache2/bin/apxs and it runs fine. I then do a cd apache-2.0 and then run gmake and I get the following error: ../common/jk_util.c: In function 'jk_gettid': ../common/jk_util.c:1163:error: invalid operands to binary gmake: *** [../common/jk_util.lo] Error 1 I looked at the code and it has the following: int tid = (int)(t Ox); Thanks for your help. Eric Short -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.322 / Virus Database: 266.11.14 - Release Date: 5/20/05
Re: Tomcat vs Apache
If all you're doing is serve static pages, both are equivalent. However, if you ever need dynamic content, either client or server side, for example a page whose content is extracted from a database, or a form for which you need to record the values, you need some kind of intelligence. For that job, Apache relies on cgi and php, while Tomcat relies on Servlets and JSP, both based on Java. Unless you have a good reason to switch to Apache, you should stick to Tomcat. Le 18 mai 05 à 16:37, Chris a écrit : I've been working with Tomcat for a while now, but I haven't messed with Apache yet. Could someone explain or point me to something explaining the differences between Tomcat and Apache? I have a large applet hosted on Tomcat, and am investigating using Apache instead. Is this feasable? TIA. Chris - 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]
getTextContent not found with Tomcat 5.0.28
Hi, I'm having problems running Tomcat 5.0.28 using JDK 1.5.0.02. I'm using 1.5 methods such as Node.getTextContent. This works fine when run as a standalone app in JDK 1.5, however when run with Tomcat under the same JDK, execution throws an exception saying getTextContent was not found. Is there a setting to change somewhere in the Tomcat config files ? Eric - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: getTextContent not found with Tomcat 5.0.28 (solved)
Le 10 mai 05 à 15:56, Eric VERGNAUD a écrit : Hi, I'm having problems running Tomcat 5.0.28 using JDK 1.5.0.02. I'm using 1.5 methods such as Node.getTextContent. This works fine when run as a standalone app in JDK 1.5, however when run with Tomcat under the same JDK, execution throws an exception saying getTextContent was not found. Is there a setting to change somewhere in the Tomcat config files ? Eric Tomcat was loading the parser class from the Endorsed folder. I removed the various jars from that folder and now it's ok. Eric - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat on Mac Stops Unexpectedly
I'm using OS X 10.3.8 with Tomcat 5.0.28. It's been running without a restart for about a year except for OS updates. I know that since apple hasn't officially released java 1.5 yet, you need to use the compatibility jar with anything over 5.5.7 which is one of the main reasons i havent upgraded to 5.5.7. I'm waiting on apple for their java update and then I'll update to that tomcat. Let me know if you need any help setting up on the Mac. My tomcat experience on XP was a nightmare so I switched to the Mac and so far it's been a delight. ~Eric - Original Message - From: [EMAIL PROTECTED] To: tomcat-user@jakarta.apache.org Sent: Thursday, April 28, 2005 2:50 PM Subject: Tomcat on Mac Stops Unexpectedly I've been running Tomcat on Windows XP for quite a while, without the following issue. I just installed it on a Mac and it stops for no discernible reason after an hour or so, with no activity on the system. I don't see any entry in teh logs frm the time I walked away from a running Tomcat server to the time I find it not running. No other error indications as well- just that Tomcat needs to be restarted. I'm at a loss for what to do since i have no leads to follow. Can anyone suggest a theory or somehting to check? Is Tomcat supposed to run on Mac Unix? I'm using OSX 10.3.8, Tomcat 5.5.9. I'm using - 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]
Possible to include JSP document (.jspx) fragments that aren't well formed?
Does anyone know if it's possible to include a .jspx fragment in another .jspx file? When I say .jspx fragment, I mean a file that is in XML format, but, may not be well formed. For example, I want to do something like the following. Currently, I'm receiving an error message like the following. I think what it's doing is assuming that the included files are .jsps instead of .jspxs. Previously, I tried naming the included files as .jspx, but, then, when I tried to compile it with Jasper, it wouldn't compile because it said the documents needed to be well formed. I need to see if I can figure out how to tell the jasper Ant task to only compile the page.jspx instead of all files ending with .jspx. Does anyone know if it's possible to include .jspx fragments? i.e. ones that aren't well formed, or, do they have to be well formed? If the later is true, using JSPXs makes includes a lot less useful... The goal here is to use XML syntax throughout and still have flexibility in using includes. J:\at\reservations\build.xml:204: org.apache.jasper.JasperException: file:J:/at/ reservations/build/header.jspxf(9,7) lt;jsp:outputgt; must not be used in standard syntax page.jspx jsp:root xmlns:jsp=http://java.sun.com/JSP/Page; version=2.0 jsp:directive.include file=../header.jspxf/ pHello, world!/p jsp:directive.include file=../footer.jspxf/ /jsp:root header.jspxf html title... body... footer.jspxf /body /html Jon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Logging in servlet/jsp not working via java.uil.logging.Logger.global - BUG?
If you have a servlet/jsp which uses java.util.logging. Logger.global and use the global logger, the output seems to go nowhere. For example the following jsp page only logs printed. % java.util.logging.Logger.global.severe(not printed); java.util.logging.Logger.getLogger(foo).severe(printed); % FYI, this is with Tomcat 5.5.9 using the default settings. As you can imagine, this is a little disturbing! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JULI and logging
I haven't tried it yet, but, I noticed that catalina.sh/bat, looks for a jar file named tomcat-juli.jar and if it's present, it adds a -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager to JAVA_OPTS. I think if you rename or remove that jar file, it will disable it (haven't tried it, just a guess). What I did was change my common/classes/logging.properties file to the following. With this setup, everything goes into catalina.out. Note, I found that if JULI is enabled, it appears to ignore the java.util.logging.config.file property if you passed it in as a system property. handlers = java.util.logging.ConsoleHandler java.util.logging.ConsoleHandler.level = ALL Jon - Original Message - From: Tran Hung-Phu-r50825 [EMAIL PROTECTED] To: 'Tomcat Users List' tomcat-user@jakarta.apache.org Sent: Thursday, April 14, 2005 11:59 AM Subject: JULI and logging For tomcat 5.5.9. the default setting logs to both Catalina.out and Catalina.-mm-dd.log files My question are: 1) how to channel all startup messages to one file? 2) how to disable JULI (on by default)? thanks - 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]
Re: Way to specify SingleSignOn session timeout?
After looking at the code, it looks like the SSO session doesn't go away until all other sessions for the user have expired. So, as far as I can tell, the SSO session doesn't have it's own session timeout as far as I can tell. Jon - Original Message - From: Jonathan Eric Miller [EMAIL PROTECTED] To: Tomcat Users List tomcat-user@jakarta.apache.org Sent: Wednesday, April 13, 2005 11:00 AM Subject: Re: Way to specify SingleSignOn session timeout? Thanks, but, I know how to set it for a given application. I want to know how to set it or at least find out what the default value is for the global session. I've noticed that there are two cookies. One is JSESSIONID which is for the application session. The other is JSESSIONSSO is is presumably for the global session. Jon - Original Message - From: Peter Rossbach [EMAIL PROTECTED] To: Tomcat Users List tomcat-user@jakarta.apache.org Sent: Tuesday, April 12, 2005 10:56 PM Subject: Re: Way to specify SingleSignOn session timeout? Look inside conf/web.xml !-- created sessions by modifying the value -- session-config session-timeout30/session-timeout /session-config Peter Jonathan Eric Miller schrieb: I'm using the SingleSignOn valve with Tomcat 5.5.9. Does anyone know what the default session timeout is set to? Is there a way to specify this timeout? I'm finding that sometimes my session will timeout within an application, but, it doesn't redisplay the login page. I want to try to set it up so that the session timeout period is the same for all my applications (and the same for the global one) and that whenever the session times out, the login page is displayed. Jon - 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] - 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]
Re: Way to specify SingleSignOn session timeout?
After looking at the code, it looks like the SSO session doesn't go away until all other sessions for the user have expired. So, as far as I can tell, the SSO session doesn't have it's own session timeout as far as I can tell. Jon - Original Message - From: Jonathan Eric Miller [EMAIL PROTECTED] To: Tomcat Users List tomcat-user@jakarta.apache.org Sent: Wednesday, April 13, 2005 11:00 AM Subject: Re: Way to specify SingleSignOn session timeout? Thanks, but, I know how to set it for a given application. I want to know how to set it or at least find out what the default value is for the global session. I've noticed that there are two cookies. One is JSESSIONID which is for the application session. The other is JSESSIONSSO is is presumably for the global session. Jon - Original Message - From: Peter Rossbach [EMAIL PROTECTED] To: Tomcat Users List tomcat-user@jakarta.apache.org Sent: Tuesday, April 12, 2005 10:56 PM Subject: Re: Way to specify SingleSignOn session timeout? Look inside conf/web.xml !-- created sessions by modifying the value -- session-config session-timeout30/session-timeout /session-config Peter Jonathan Eric Miller schrieb: I'm using the SingleSignOn valve with Tomcat 5.5.9. Does anyone know what the default session timeout is set to? Is there a way to specify this timeout? I'm finding that sometimes my session will timeout within an application, but, it doesn't redisplay the login page. I want to try to set it up so that the session timeout period is the same for all my applications (and the same for the global one) and that whenever the session times out, the login page is displayed. Jon - 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] - 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]
Re: Way to specify SingleSignOn session timeout?
Thanks, but, I know how to set it for a given application. I want to know how to set it or at least find out what the default value is for the global session. I've noticed that there are two cookies. One is JSESSIONID which is for the application session. The other is JSESSIONSSO is is presumably for the global session. Jon - Original Message - From: Peter Rossbach [EMAIL PROTECTED] To: Tomcat Users List tomcat-user@jakarta.apache.org Sent: Tuesday, April 12, 2005 10:56 PM Subject: Re: Way to specify SingleSignOn session timeout? Look inside conf/web.xml !-- created sessions by modifying the value -- session-config session-timeout30/session-timeout /session-config Peter Jonathan Eric Miller schrieb: I'm using the SingleSignOn valve with Tomcat 5.5.9. Does anyone know what the default session timeout is set to? Is there a way to specify this timeout? I'm finding that sometimes my session will timeout within an application, but, it doesn't redisplay the login page. I want to try to set it up so that the session timeout period is the same for all my applications (and the same for the global one) and that whenever the session times out, the login page is displayed. Jon - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Upgrading from tomcat 3.2.2 to 3.3.2 on Windows
Reading the changelog is a good place to start... Jon - Original Message - From: Horvath, Ruth (Ruth) ** CTR ** [EMAIL PROTECTED] To: tomcat-user@jakarta.apache.org Sent: Wednesday, April 13, 2005 12:16 PM Subject: Upgrading from tomcat 3.2.2 to 3.3.2 on Windows Sorry if this has been discussed before, but I couldn't find this topic in the archives. I'm also new to tomcat. I'm not a developer, but a member of our system verification team. I've been asked to evaluate what needs to be done to upgrade our current version of tomcat. Currently, our application is using tomcat 3.2.2 (I know - we need to get into the 21st century) The management team is looking to upgrade to 3.3.2 (baby steps - this is for a point release - our next major release we hope to convince them to at least use 5.0) Anyway, if I upgrade from 3.2.2 to 3.3.2, what is this buying me (improved performance - what) ? What is the best way to test (or should I just verify I didn't break anything that was previously working) ? What is the best way to upgrade (without loosing my customized xml/properties files) Is it good enough to look at what's currently in my 3.2.2 bin/conf/lib directories and just copy in the 3.3.2 versions of those files currently used ? Also, my current 3.2.2 has jk_nt_service.exe and isapi_redirect.dll in the bin directory, but I don't see these in the 3.3.2 bin. Where would I find these ? These look like they've been modified (according to the release notes), so I'm guessing I need to find them. Thank-you for your time and patience, - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: logging to seperate log file per war file
My guess (but, I'm not a Tomcat developer so what do I know! ;-)) is that you can't do it for System.out.println(). However, I did notice that System.setOut() allows you to redirect where standard out goes. However, I'm guessing that that would be for the entire JVM? As of Tomcat 5.5.9 they fixed up java.util.logging so that it can have different log files if that's any consolation. I guess the best solution is to simply using the logging APIs throughout and not use System.out for anything. Jon - Original Message - From: quentin.compson [EMAIL PROTECTED] To: tomcat-user@jakarta.apache.org Sent: Monday, April 11, 2005 10:12 PM Subject: logging to seperate log file per war file is this possible using context.xml or some other way? im using log4j but some output still goes to stdout (e.g System.out.println()). thx - 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]
Way to specify SingleSignOn session timeout?
I'm using the SingleSignOn valve with Tomcat 5.5.9. Does anyone know what the default session timeout is set to? Is there a way to specify this timeout? I'm finding that sometimes my session will timeout within an application, but, it doesn't redisplay the login page. I want to try to set it up so that the session timeout period is the same for all my applications (and the same for the global one) and that whenever the session times out, the login page is displayed. Jon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Specifying logging.properties file via system property doesn't work?
Until Tomcat 5.5.9 I was specifying my java.util.logging.config.file using a system property set using CATALINA_OPTS like the following. CATALINA_OPTS='-Djava.util.logging.config.file=/opt/jakarta-tomcat-dev/conf/logging.properties -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger'After removing, the logging.properties file from common/classes (Call mecrazy, but, I like having all my apps log to a single file (that way I don'thave to check 5 files for errors)) I found that nothing would get logged(even though I specified the logging.properties file using the systemproperty).I was able to solve the problem by simply copying my logging.properties fileto common/classes. It seems like using the system property should work toothough...Jon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
calling ejb on another app server
Does anyone have any experience getting a servlet that calls an ejb on a different application server to work, running tomcat 5.0.28? I know we got this to work under 3.x a while ago. At this point I feel like we've tried everything but we always get that name ejb is not bound in this context. I even tried changing my jndi.properties to point to an invalid host, and although when I print out the environment for the context just before looking up the bean it indeed says that the naming provider url is foo:1066, I don't get a communication exception, I get that the ejb context is not bound. My suspicion is it is going against a jndi server running within tomcat that doesn't have the ejb context bound. Help would be appreciated, we've been floundering for a couple of days. Regards Eric
RE: calling ejb on another app server
Yes it is. I changed it in my jndi.properties file to see if I would get a different error. It was originally 1099. Given that, and the fact that you have this working (we are also using jboss) do you have any other ideas? I assume you are on tomcat 5x or greater? My setup is pretty vanilla. I'm sure it's just a configuration switch, but not sure which one. Regards Eric -Original Message- From: Neil Upfalow [mailto:[EMAIL PROTECTED] Sent: Thursday, April 07, 2005 1:30 PM To: 'Tomcat Users List' Subject: RE: calling ejb on another app server We do tomcat (servlet) to remote jboss (EJB). Isn't JNDI usually bound to 1099 ? Also, is usually a critical port. Some ISPs block it. Remapping to usually solves this problem. Hope it helps. Sincerely, Neil Upfalow -Original Message- From: Eric J Kaplan [mailto:[EMAIL PROTECTED] Sent: Thursday, April 07, 2005 1:23 PM To: 'Tomcat Users List' Subject: calling ejb on another app server Does anyone have any experience getting a servlet that calls an ejb on a different application server to work, running tomcat 5.0.28? I know we got this to work under 3.x a while ago. At this point I feel like we've tried everything but we always get that name ejb is not bound in this context. I even tried changing my jndi.properties to point to an invalid host, and although when I print out the environment for the context just before looking up the bean it indeed says that the naming provider url is foo:1066, I don't get a communication exception, I get that the ejb context is not bound. My suspicion is it is going against a jndi server running within tomcat that doesn't have the ejb context bound. Help would be appreciated, we've been floundering for a couple of days. Regards Eric - 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]
RE: calling ejb on another app server
That's the strange thing because I print out the environment of the context being used at the time the failure occurs and it does seem to be taking it from my jndi.properties file! Of course, simply printing out the context is different than what the context may ACTUALLY be doing. Regards Eric -Original Message- From: N G [mailto:[EMAIL PROTECTED] Sent: Thursday, April 07, 2005 1:54 PM To: Tomcat Users List Subject: Re: calling ejb on another app server If you are not getting some communication exception when you change the port number to the wrong port, it tells me that your jndi.properties are being ignored. As you pointed out, it's probably returning an instance of Tomcat readonly JNDI. I suggest you load your jndi.properties explicitely use new InitialContext(properties) constructor. This should for sure force it to try to connect to the proper JNDI provider. HTH, NG. On Apr 7, 2005 1:35 PM, Eric J Kaplan [EMAIL PROTECTED] wrote: Yes it is. I changed it in my jndi.properties file to see if I would get a different error. It was originally 1099. Given that, and the fact that you have this working (we are also using jboss) do you have any other ideas? I assume you are on tomcat 5x or greater? My setup is pretty vanilla. I'm sure it's just a configuration switch, but not sure which one. Regards Eric -Original Message- From: Neil Upfalow [mailto:[EMAIL PROTECTED] Sent: Thursday, April 07, 2005 1:30 PM To: 'Tomcat Users List' Subject: RE: calling ejb on another app server We do tomcat (servlet) to remote jboss (EJB). Isn't JNDI usually bound to 1099 ? Also, is usually a critical port. Some ISPs block it. Remapping to usually solves this problem. Hope it helps. Sincerely, Neil Upfalow -Original Message- From: Eric J Kaplan [mailto:[EMAIL PROTECTED] Sent: Thursday, April 07, 2005 1:23 PM To: 'Tomcat Users List' Subject: calling ejb on another app server Does anyone have any experience getting a servlet that calls an ejb on a different application server to work, running tomcat 5.0.28? I know we got this to work under 3.x a while ago. At this point I feel like we've tried everything but we always get that name ejb is not bound in this context. I even tried changing my jndi.properties to point to an invalid host, and although when I print out the environment for the context just before looking up the bean it indeed says that the naming provider url is foo:1066, I don't get a communication exception, I get that the ejb context is not bound. My suspicion is it is going against a jndi server running within tomcat that doesn't have the ejb context bound. Help would be appreciated, we've been floundering for a couple of days. Regards Eric - 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] - 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]
RE: calling ejb on another app server
Neil I'll give it a try, though note that we have been using jboss for a few years and have plenty of standalone apps communicating fine with jboss through the same api as that used by the servlet. Regards Eric -Original Message- From: Neil Upfalow [mailto:[EMAIL PROTECTED] Sent: Thursday, April 07, 2005 1:53 PM To: 'Tomcat Users List' Subject: RE: calling ejb on another app server Another critical jboss element is setting jnp rmi port to something, here it's 34159 I set it in jboss/server/default/conf/jboss-service.xml attribute name=Properties invokerServletPath=http://localhost:8080/invoker/JMXInvokerServlet jnp.rmiPort=34159 /attribute like that. You may also need to make jboss bind to your WAN ip. Add these options in run.bat: -Djava.rmi.server.hostname=JBOSS-WAN-STATIC-IP -Djava.rmi.server.useLocalHostname=false Sincerely, Neil Upfalow -Original Message- From: Eric J Kaplan [mailto:[EMAIL PROTECTED] Sent: Thursday, April 07, 2005 1:36 PM To: 'Tomcat Users List' Subject: RE: calling ejb on another app server Yes it is. I changed it in my jndi.properties file to see if I would get a different error. It was originally 1099. Given that, and the fact that you have this working (we are also using jboss) do you have any other ideas? I assume you are on tomcat 5x or greater? My setup is pretty vanilla. I'm sure it's just a configuration switch, but not sure which one. Regards Eric -Original Message- From: Neil Upfalow [mailto:[EMAIL PROTECTED] Sent: Thursday, April 07, 2005 1:30 PM To: 'Tomcat Users List' Subject: RE: calling ejb on another app server We do tomcat (servlet) to remote jboss (EJB). Isn't JNDI usually bound to 1099 ? Also, is usually a critical port. Some ISPs block it. Remapping to usually solves this problem. Hope it helps. Sincerely, Neil Upfalow -Original Message- From: Eric J Kaplan [mailto:[EMAIL PROTECTED] Sent: Thursday, April 07, 2005 1:23 PM To: 'Tomcat Users List' Subject: calling ejb on another app server Does anyone have any experience getting a servlet that calls an ejb on a different application server to work, running tomcat 5.0.28? I know we got this to work under 3.x a while ago. At this point I feel like we've tried everything but we always get that name ejb is not bound in this context. I even tried changing my jndi.properties to point to an invalid host, and although when I print out the environment for the context just before looking up the bean it indeed says that the naming provider url is foo:1066, I don't get a communication exception, I get that the ejb context is not bound. My suspicion is it is going against a jndi server running within tomcat that doesn't have the ejb context bound. Help would be appreciated, we've been floundering for a couple of days. Regards Eric - 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] - 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]
jndi.properties file and classpath
We are using tomcat 5.0.28 and our servlet needs to load jndi.properties from a jndi.properties file in our WEB-INF/classes directory but it seems to be getting it from elsewhere and so our servlet, which needs to call a bean on a separate application server instance (in this case jboss) fails because its jndi context it pointing it at, I assume, the jndi instance running in tomcat. I even tried appending this classes directory to the front of the classpath when starting within the script (shiver) but that didn't work. What do I need to do? Regards Eric
RE: jndi.properties file and classpath
Perhaps this was missed the first time. I think the answer should be fairly simple. How do I get my servlet to pull in my jndi.properties file, which right now is in the WEB-INF/classes directory, instead of whatever one it seems to be pulling in that is directing it to tomcat? Regards Eric -Original Message- From: Eric J Kaplan [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 06, 2005 11:18 AM To: 'Tomcat Users List' Subject: jndi.properties file and classpath We are using tomcat 5.0.28 and our servlet needs to load jndi.properties from a jndi.properties file in our WEB-INF/classes directory but it seems to be getting it from elsewhere and so our servlet, which needs to call a bean on a separate application server instance (in this case jboss) fails because its jndi context it pointing it at, I assume, the jndi instance running in tomcat. I even tried appending this classes directory to the front of the classpath when starting within the script (shiver) but that didn't work. What do I need to do? Regards Eric - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
NoClassDefFoundError: org/apache/avalon/framework/logger/Logger
All I recently downloaded tomcat version 5.0.28 and created a webapp in the webapps directory which looks as follows: tomcat_home webapps armanta-war WEB-INF lib armanta.jar armanta.jar has two classes in it, my servlet and a class used by the servlet. My web.xml is shown below. When I go to run my servlet, I get the following exception report and can't explain why, since my install of tomcat is pretty vanilla. I know historically there have been issues related to conflicts between jars, but in my case I've only added two class files into the mix. Can someone please help? type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: Error instantiating servlet class com.armanta.servlets.ReportServlet org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118 ) org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne ction(Http11Protocol.java:705) org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:683) java.lang.Thread.run(Thread.java:536) root cause java.lang.NoClassDefFoundError: org/apache/avalon/framework/logger/Logger java.lang.Class.getDeclaredConstructors0(Native Method) java.lang.Class.privateGetDeclaredConstructors(Class.java:1590) java.lang.Class.getConstructor0(Class.java:1762) java.lang.Class.newInstance0(Class.java:276) java.lang.Class.newInstance(Class.java:259) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118 ) org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne ction(Http11Protocol.java:705) org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:683) java.lang.Thread.run(Thread.java:536) note The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs. ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app !-- General description of your web application -- display-nameArmanta Report Web Application/display-name description Consists of a servlet to send report commands to. /description servlet servlet-nameArmantaServlet/servlet-name servlet-classcom.armanta.servlets.ReportServlet/servlet-class /servlet servlet-mapping servlet-nameArmantaServlet/servlet-name url-pattern/ReportServlet/url-pattern /servlet-mapping /web-app Eric J. Kaplan Armanta, Inc. 350 Mt. Kemble Ave. Morristown, NJ 07960
RE: NoClassDefFoundError: org/apache/avalon/framework/logger/Logger
Fyi, I am running java 1.4.1_07 on windows XP -Original Message- From: Eric J Kaplan [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 05, 2005 2:44 PM To: tomcat-user@jakarta.apache.org Subject: NoClassDefFoundError: org/apache/avalon/framework/logger/Logger All I recently downloaded tomcat version 5.0.28 and created a webapp in the webapps directory which looks as follows: tomcat_home webapps armanta-war WEB-INF lib armanta.jar armanta.jar has two classes in it, my servlet and a class used by the servlet. My web.xml is shown below. When I go to run my servlet, I get the following exception report and can't explain why, since my install of tomcat is pretty vanilla. I know historically there have been issues related to conflicts between jars, but in my case I've only added two class files into the mix. Can someone please help? type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: Error instantiating servlet class com.armanta.servlets.ReportServlet org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118 ) org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne ction(Http11Protocol.java:705) org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:683) java.lang.Thread.run(Thread.java:536) root cause java.lang.NoClassDefFoundError: org/apache/avalon/framework/logger/Logger java.lang.Class.getDeclaredConstructors0(Native Method) java.lang.Class.privateGetDeclaredConstructors(Class.java:1590) java.lang.Class.getConstructor0(Class.java:1762) java.lang.Class.newInstance0(Class.java:276) java.lang.Class.newInstance(Class.java:259) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118 ) org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne ction(Http11Protocol.java:705) org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:683) java.lang.Thread.run(Thread.java:536) note The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs. ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app !-- General description of your web application -- display-nameArmanta Report Web Application/display-name description Consists of a servlet to send report commands to. /description servlet servlet-nameArmantaServlet/servlet-name servlet-classcom.armanta.servlets.ReportServlet/servlet-class /servlet servlet-mapping servlet-nameArmantaServlet/servlet-name url-pattern/ReportServlet/url-pattern /servlet-mapping /web-app Eric J. Kaplan Armanta, Inc. 350 Mt. Kemble Ave. Morristown, NJ 07960 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: NoClassDefFoundError: org/apache/avalon/framework/logger/Logger
Reynir That does help, although it is what I suspected. I did indeed have a ref to this lib that I wasn't aware of. The reason I was confused initially thought was that armanta.jar has a classloader Manifest that references a bunch of libs, this Avalon one included, that are expected to be in an ext directory that is off the lib directory. It seems that this manifest classpath is ignored though? Anyway, I moved the libs up next to Armanta.jar in the lib dir and it works fine. Thanks Eric -Original Message- From: reynir [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 05, 2005 3:53 PM To: Tomcat Users List Subject: Re: NoClassDefFoundError: org/apache/avalon/framework/logger/Logger hi, This is a simple class not found exception, that would be fixed if you add the avalon jars into WEB-INF/lib The classloader can not find : org.apache.avalon.framework.logger.Logger This is a class that you are using in your aramanta application (com.armanta.servlets.ReportServlet) You must provide this class into the classpath to get this to work. Its not to my knowledge a part of tomcat, and even so, you should provide libraries your applications depend on your self. BTW. avalon project is closed, but I think you can download those libraries. For logging I recomend log4J. see : http://avalon.apache.org/ hope it helps -reynir Eric J Kaplan wrote: Fyi, I am running java 1.4.1_07 on windows XP -Original Message- From: Eric J Kaplan [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 05, 2005 2:44 PM To: tomcat-user@jakarta.apache.org Subject: NoClassDefFoundError: org/apache/avalon/framework/logger/Logger All I recently downloaded tomcat version 5.0.28 and created a webapp in the webapps directory which looks as follows: tomcat_home webapps armanta-war WEB-INF lib armanta.jar armanta.jar has two classes in it, my servlet and a class used by the servlet. My web.xml is shown below. When I go to run my servlet, I get the following exception report and can't explain why, since my install of tomcat is pretty vanilla. I know historically there have been issues related to conflicts between jars, but in my case I've only added two class files into the mix. Can someone please help? type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: Error instantiating servlet class com.armanta.servlets.ReportServlet org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:11 8 ) org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConn e ction(Http11Protocol.java:705) org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.ja v a:683) java.lang.Thread.run(Thread.java:536) root cause java.lang.NoClassDefFoundError: org/apache/avalon/framework/logger/Logger java.lang.Class.getDeclaredConstructors0(Native Method) java.lang.Class.privateGetDeclaredConstructors(Class.java:1590) java.lang.Class.getConstructor0(Class.java:1762) java.lang.Class.newInstance0(Class.java:276) java.lang.Class.newInstance(Class.java:259) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:11 8 ) org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConn e ction(Http11Protocol.java:705) org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.ja v a:683) java.lang.Thread.run(Thread.java:536) note The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs. ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app !-- General description of your web application -- display-nameArmanta Report Web Application/display-name description Consists of a servlet to send report commands to. /description servlet servlet-nameArmantaServlet/servlet-name servlet-classcom.armanta.servlets.ReportServlet/servlet-class /servlet servlet-mapping servlet-nameArmantaServlet/servlet-name url-pattern/ReportServlet/url-pattern /servlet-mapping /web-app Eric J. Kaplan Armanta, Inc. 350 Mt. Kemble Ave. Morristown, NJ 07960
jndi conflict?
All When I initially run my servlet, it needs to communicate with a session bean on the application server. In this case, our beans are running on a separate instance of the jboss application server. It looks like, however, the jndi lookups are going against tomcat, since even if jboss isn't running, instead of getting a socket exception, we get Name ejb is not bound in this Context. We are looking for a bean in the ejb context. My guess is it is a classpath issue. I have a jndi.properties file in the servlet-module/WEB-INF/classes directory which is correct. What else do I need to do? Regards Eric
tomcat 5.0.25 question
Hello, Last year I downloaded the Tomcat 5.0.25 binary for Solaris and installed it with java sdk 1.4.2. I now want to upgrade to the java sdk 1.5 but I don't want to upgrade Tomcat yet. I am trying to determine if this upgrade will affect my version of Tomcat. One piece of information that I cannot find on the Tomcat website is information about how the Tomcat binaries were built. Specifically, was it compiled using the java compiler from sdk 1.4, 1.5 or some other version of the sdk? If my version of Tomcat was built with javac from the java sdk 1.5 then I know my upgrade should go smoothly. If anyone knows where I can find the details of how the Tomcat binaries were built it would be greatly appreciated. Thanks, Eric Moreo Web Developer Art Center College of Design x2392 [EMAIL PROTECTED]
RE: tomcat 5.0.25 question
David and Lionel, Thank you both for your input. I think I am going to experiment with upgrading to jdk 1.5 in development to see how it works. I'll post my results just in case anyone else ever has this issue. Eric -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 23, 2005 11:25 AM To: Tomcat Users List Subject: Re: tomcat 5.0.25 question I have it working here on Tomcat 5.0.x, JDK 5, WinXP -- no problems to note so far and I installed it from a binary download. The only gotcha that I know about is you can't build for JDK 5 and then use it on JDK 1.4.x --David Lionel Farbos wrote: I don't know where you can find more details ... but Tomcat 5.0.x is built for jdk1.4 So, I don't think you can use jdk1.5 with it... On Wed, 23 Mar 2005 09:32:28 -0800 Eric Moreo [EMAIL PROTECTED] wrote: Hello, Last year I downloaded the Tomcat 5.0.25 binary for Solaris and installed it with java sdk 1.4.2. I now want to upgrade to the java sdk 1.5 but I don't want to upgrade Tomcat yet. I am trying to determine if this upgrade will affect my version of Tomcat. One piece of information that I cannot find on the Tomcat website is information about how the Tomcat binaries were built. Specifically, was it compiled using the java compiler from sdk 1.4, 1.5 or some other version of the sdk? If my version of Tomcat was built with javac from the java sdk 1.5 then I know my upgrade should go smoothly. If anyone knows where I can find the details of how the Tomcat binaries were built it would be greatly appreciated. Thanks, Eric Moreo Web Developer Art Center College of Design x2392 [EMAIL PROTECTED] - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Trying to disable Coyote gzip compression only when there is a server response status code of 500...
First of all, thanks to all the developers and users that have contributed to Tomcat. It's quite an amazing piece of software. I'll start by telling you why I am trying to do this, what approaches I have taken in my attempts to do it, and then I'll ask for some suggestions on other approaches that may work better. *Why* We have an MS .Net (1.1) client talking SOAP over HTTP to Webservices built on Sun's JWSDP 1.3 (via Tomcat). There is a pretty strict requirement to compress responses as they are usually 200-1000KB. There is a 'lack of feature' in the MS .Net Webservice client implementation in that it is not possible to decompress the HTTP response when there is a server response code of 500. The SOAP spec requires that SOAP Faults on the server set the response code to 500, and thus we are unable to process any SOAP faults on the client. In all other cases we are cool in decompressing the responses. Since there don't exist any options for us on the client we are limited to the server for solutions. *Approaches attempted and failed* -Servlet filters - a servlet filter only has access to the HttpServletRequest and the HttpServletResponse and neither of these is aware of the response status code. -Coyote's compression option with a numerical value higher than all Soap Fault sizes - it seems that the content-length of the response is always set to -1, either by Sun's JWSDP or because the HTTP response is chunked. I'm not sure which is the cause, but when the content-length is -1, the response is always compressed. -We tried an endless list of things on the .Net client in an attempt to decompress the SOAP Fault responses to no avail. *Approaches attempted and suceeded* -Modifying org.apache.coyote.http11.Http11Processor.class by adding this immediately inside of isCompressible() if ( response.getStatus() == 500 ) { return false; } I know this isn't pretty but it works. This will be acceptable if I can't find a better option, but it will require that each time we upgrade Tomcat, we'll need to compile a custom Http11Processor. I'll also need to check that we aren't violating the Apache License. Anyone have any ideas? Thanks in advance. -- -- Eric Butler VP Product Development Founder MDinTouch 786.268.1161 X20 http://www.mdintouch.com [EMAIL PROTECTED] -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Trying to disable Coyote gzip compression only when there is a server response status code of 500...
see inline comments regarding HttpServletResponseWrapper Remy Maucherat wrote: On Tue, 22 Mar 2005 13:39:55 -0500, Eric Butler [EMAIL PROTECTED] wrote: First of all, thanks to all the developers and users that have contributed to Tomcat. It's quite an amazing piece of software. I'll start by telling you why I am trying to do this, what approaches I have taken in my attempts to do it, and then I'll ask for some suggestions on other approaches that may work better. *Why* We have an MS .Net (1.1) client talking SOAP over HTTP to Webservices built on Sun's JWSDP 1.3 (via Tomcat). There is a pretty strict requirement to compress responses as they are usually 200-1000KB. There is a 'lack of feature' in the MS .Net Webservice client implementation in that it is not possible to decompress the HTTP response when there is a server response code of 500. The SOAP spec requires that SOAP Faults on the server set the response code to 500, and thus we are unable to process any SOAP faults on the client. In all other cases we are cool in decompressing the responses. Since there don't exist any options for us on the client we are limited to the server for solutions. *Approaches attempted and failed* -Servlet filters - a servlet filter only has access to the HttpServletRequest and the HttpServletResponse and neither of these is aware of the response status code. Wrap the response object. A servlet like the compression filter has to wrap anyway to be able to work. I tried using the HttpServletResponseWrapper however there is no method on this class to obtain the response status...only a method to set the status. The core problem I have is that I have not been able to determine where I can get the response status in order to know if I should compress the response. The only place where the response status is known is in the Http11Processor class. Can you think of a way to get the response status from a filter? -Coyote's compression option with a numerical value higher than all Soap Fault sizes - it seems that the content-length of the response is always set to -1, either by Sun's JWSDP or because the HTTP response is chunked. I'm not sure which is the cause, but when the content-length is -1, the response is always compressed. -We tried an endless list of things on the .Net client in an attempt to decompress the SOAP Fault responses to no avail. *Approaches attempted and suceeded* -Modifying org.apache.coyote.http11.Http11Processor.class by adding this immediately inside of isCompressible() if ( response.getStatus() == 500 ) { return false; } I know this isn't pretty but it works. This will be acceptable if I can't find a better option, but it will require that each time we upgrade Tomcat, we'll need to compile a custom Http11Processor. I'll also need to check that we aren't violating the Apache License. It obviously does not violate the Apache license. -- -- Eric Butler VP Product Development Founder MDinTouch 786.268.1161 X20 http://www.mdintouch.com [EMAIL PROTECTED] -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Apache/Tomcat 4.1.18 - Displaying empty Strings as null
Hello, I recently installed Apache/Tomcat v 4.1.18 on my new server, and I have a JSP page that extracts values from an Oracle database, if the value in the database is an empty String (), it returns as a null value in my JSP page. I have another server with Tomcat v. 4.1.31, and I am not having this issue. The new server has JDK v. 1.4.2 and my old server has v. 1.4.1. Any ideas will help. Thanks Confidentiality Note: The preceding e-mail message (including any attachments) contains information that may be confidential, protected by applicable legal privileges, or constitute non-public information. It is intended to be conveyed only to the designated recipient(s). If you are not an intended recipient of this message, please notify the sender by replying to this message and then delete it from your system. Use, dissemination, distribution or reproduction of this message by unintended recipients is not authorized and may be unlawful. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Issue displaying empty Strings as null
I recently installed Apache/Tomcat v 4.1.31 on my server, and I have several JSP sites that extract values from an Oracle database, if the value in the database is an empty String (), it returns as a null value in my JSP page. The server has JDK v. 1.4.2. Any ideas will help. Thanks Confidentiality Note: The preceding e-mail message (including any attachments) contains information that may be confidential, protected by applicable legal privileges, or constitute non-public information. It is intended to be conveyed only to the designated recipient(s). If you are not an intended recipient of this message, please notify the sender by replying to this message and then delete it from your system. Use, dissemination, distribution or reproduction of this message by unintended recipients is not authorized and may be unlawful. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to get know what version of TC is running behind Apache
If you just want to see it in your browser, use Mozilla Firefox and install this extension: http://livehttpheaders.mozdev.org/ Then you can see all the http headers, including server, which will tell you which version of Tomcat. -Original Message- From: Antony Paul [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 16, 2005 4:47 AM To: Tomcat Users List Subject: How to get know what version of TC is running behind Apache Hi all, Is it possible to know what version of Tomcat is running behind an Apache. The connector used is JK. -- rgds Antony Paul http://www.geocities.com/antonypaul24/ - 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]
RE: Unexpected Signal : 11
Upgrade to 1.4.2_04 http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4927116 -Original Message- From: Thomas Chille [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 16, 2005 9:49 AM To: Tomcat Users List Subject: Unexpected Signal : 11 Hi, we are using a reporting webapp wich is deployed on 20 client systems in different companies. all is working fine except for one customer. if he generates an long report, the report will displayed correct, but after finishing the request tomcat is crashing. the error is there replicable but no where else. the diffenrent installations were created by cloning one master-harddrive-image, so i can assume the same software environment for all installations. the hardware ist identically too. has someone experienced the same error? Error dump attached CPU: 2.6 Ghz Intel Celeron i686 OS: Red Hat 9b Kernel: 2.4.20-18.9 JVM: 1.4.2_02_b03 RAM: 768MB DDR-Ram Tomcat: 4.0.6 regards, thomas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Trouble w/ remote debugging w/ Tomcat 5.5 and JDK 5.0
I found the FAQ (http://jakarta.apache.org/tomcat/faq/development.html) and followed the instructions there, including: added env variable JPDA_ADDRESS=8000 added env variable JPDA_TRANSPORT=dt_socket added -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n to java command line options, but my Tomcat still doesn't seem to be running with the debug port enabled. I can't connect via Eclipse, or even telnet to the port. I'm running on WinXP SP2 w/ Tomcat as a service. Here's a screenshot of the service config: http://images.fender.net/tomcat.png I'm guessing this is a really a JDK 1.5/5.0 issue and not a problem w/ Tomcat, but any help would be appreciated. Thanks. Eric - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Trouble w/ remote debugging w/ Tomcat 5.5 and JDK 5.0
Yes, but I can connect to http on port 8080 just fine. Is there some setting that might be allowing 8080, but blocking 8000? I'll have to check this when I get home. I'm posting from work where my configuration is different. -Original Message- From: Giuseppe Briotti [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 15, 2005 8:21 AM To: tomcat-user@jakarta.apache.org Subject: Re: Trouble w/ remote debugging w/ Tomcat 5.5 and JDK 5.0 == Date: Tue, 15 Mar 2005 08:12:07 -0500 From: Fenderbosch, Eric [EMAIL PROTECTED] To: tomcat-user@jakarta.apache.org Subject: Trouble w/ remote debugging w/ Tomcat 5.5 and JDK 5.0 == Firewall of SP2 enabled? G. - 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]
RE: where serialized session objects stored?
You can find that info here: http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/manager.html The easy way to disable saving of sessions is to add this to you webapp xml under conf/Catalina/localhost Manager className=org.apache.catalina.session.StandardManager pathname=/ For example, here's the start of mine: ?xml version=1.0 encoding=utf-8? Context docBase=bazaar path=/bazaar workDir=work\Catalina\localhost\bazaar Manager className=org.apache.catalina.session.StandardManager pathname=/ -Original Message- From: Mark [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 15, 2005 1:45 PM To: tomcat-user@jakarta.apache.org Subject: where serialized session objects stored? Hi, How can I find out where session serialized objects get stored and how can I force _not_ to load session serialized objects ( I need it when a new version of web application get deployed) __ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ - 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]
RE: Trouble w/ remote debugging w/ Tomcat 5.5 and JDK 5.0
I just disabled the firewall and I'm still getting the same thing. Connection refused. -Original Message- From: Giuseppe Briotti [mailto:[EMAIL PROTECTED] Sent: Tue 3/15/2005 8:21 AM To: tomcat-user@jakarta.apache.org Cc: Subject:Re: Trouble w/ remote debugging w/ Tomcat 5.5 and JDK 5.0 == Date: Tue, 15 Mar 2005 08:12:07 -0500 From: Fenderbosch, Eric [EMAIL PROTECTED] To: tomcat-user@jakarta.apache.org Subject: Trouble w/ remote debugging w/ Tomcat 5.5 and JDK 5.0 == Firewall of SP2 enabled? G. - 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]
RE: Trouble w/ remote debugging w/ Tomcat 5.5 and JDK 5.0
I tried downloading the .tar.gz package and extracted the startup scripts to bin. Starting with catalina.bat run or cataline.bat start works fine. However, catalina.bat jdpa start simply returns to the command prompt. Now I'm really confused... -Original Message- From: Fenderbosch, Eric Sent: Tue 3/15/2005 10:18 PM To: Tomcat Users List; tomcat-user@jakarta.apache.org Cc: Subject:RE: Trouble w/ remote debugging w/ Tomcat 5.5 and JDK 5.0 I just disabled the firewall and I'm still getting the same thing. Connection refused. - 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]
Re: how to print to web page instead of catalina.out
if youre trying to print to a webpage, then you probably want a jsp file or a servlet in which case this would be one of the reasons you are using tomcat. If you are just trying to log messages though, i recommend checking out log4j instead of using system.out and system.error - Original Message - From: Jin Wu [EMAIL PROTECTED] To: Tomcat Users List tomcat-user@jakarta.apache.org; Antony Paul [EMAIL PROTECTED] Sent: Wednesday, February 23, 2005 1:38 PM Subject: Re: how to print to web page instead of catalina.out I tried out.print(). The complation failed. The error is: cannot resolve symbol symbol : variable out Thanks Jin Antony Paul [EMAIL PROTECTED] wrote: Why not use out.print() or you are trying to do something else ?. rgds Antony Paul On Tue, 22 Feb 2005 20:26:41 -0800 (PST), Jin Wu wrote: Hi, It seems that System.out.printlin(...) prints to catalina.out. Is there a way I can print to web page? Thanks, James __ 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] __ 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]
stdout - console instead of catalina.out
I just started logging via log4j and although my question stems from that, I believe it is more of a Tomcat question. How can I re-direct log messages to print to a Linux command window instead of printing to the file catalina.out, i.e. how do I tell Tomcat that standard out is the console from which I started Tomcat in? I believe the standard output stream is directed to catalina.out by default. I have yet to find the answer in the Tomcat docs. running tomcat 5.0.28 on Linux Fedora Core 2 thx Eric - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: stdout - console instead of catalina.out
Great, many thx for the advise. I also found that using command './catalina.sh run' to start Tomcat, as apposed to traditional './startup.sh', ensures that stdout goes to the console instead of catalina.out. Eric On Wed, 16 Feb 2005 11:22:20 -0500, David Smith [EMAIL PROTECTED] wrote: The startup shell script is responsible for redirecting output to catalina.out. remove ' catalina.out' and you should be good to go. You could also pipe your output to the 'tee' utility. See the man pages for details. --David Eric Wulff wrote: I just started logging via log4j and although my question stems from that, I believe it is more of a Tomcat question. How can I re-direct log messages to print to a Linux command window instead of printing to the file catalina.out, i.e. how do I tell Tomcat that standard out is the console from which I started Tomcat in? I believe the standard output stream is directed to catalina.out by default. I have yet to find the answer in the Tomcat docs. running tomcat 5.0.28 on Linux Fedora Core 2 thx Eric - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Adding ServletContextListener causes web app to not deploy
I've got a small web app that's working just fine. As soon as I add a listener, it fails to deploy. Here's the relevant part of web.xml: ?xml version=1.0 encoding=UTF-8? web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 context-param param-namejavax.servlet.jsp.jstl.fmt.localizationContext/param-name param-valuenet.fender.bazaar.struts.BazaarMessageResources/param-value /context-param listener listener-classnet.fender.bazaar.servlet.BazaarServletContextListener/listener-class /listener And the VERY simple listener: package net.fender.bazaar.servlet; import javax.servlet.ServletContext; import javax.servlet.ServletContextEvent; import javax.servlet.ServletContextListener; class BazaarServletContextListener implements ServletContextListener { private ServletContext context; public void contextDestroyed(ServletContextEvent event) { context = null; } public void contextInitialized(ServletContextEvent event) { context = event.getServletContext(); } } And the server log: INFO: Removing web application at context path /bazaar Feb 11, 2005 11:16:37 AM org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:C:\java\jakarta-tomcat-5.0.28\conf\Catalina\localhost\bazaar.xml Feb 11, 2005 11:17:30 AM org.apache.catalina.core.StandardContext listenerStart SEVERE: Skipped installing application listeners due to previous error(s) Feb 11, 2005 11:17:30 AM org.apache.catalina.core.StandardContext start SEVERE: Error listenerStart Feb 11, 2005 11:17:30 AM org.apache.catalina.core.StandardContext start SEVERE: Context startup failed due to previous errors I'm using Tomcat 5.0.28 and Sun JDK 1.4.2_06-b03. Any ideas? TIA - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Adding ServletContextListener causes web app to not deploy
How embarrassing. I feel like such a newbie. Can I blame the missing public modifier on my IDE? Please? Thanks for the help. That was it. -Original Message- From: Martin Grotzke [mailto:[EMAIL PROTECTED] Sent: Friday, February 11, 2005 1:02 PM To: Tomcat Users List Subject: Re: Adding ServletContextListener causes web app to not deploy hi, you should make the class public. cheers, martin On Fri, 2005-02-11 at 12:27 -0500, Fenderbosch, Eric wrote: I've got a small web app that's working just fine. As soon as I add a listener, it fails to deploy. Here's the relevant part of web.xml: ?xml version=1.0 encoding=UTF-8? web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 context-param param-namejavax.servlet.jsp.jstl.fmt.localizationContext/param-name param-valuenet.fender.bazaar.struts.BazaarMessageResources/param-value /context-param listener listener-classnet.fender.bazaar.servlet.BazaarServletContextListener/listener-class /listener And the VERY simple listener: package net.fender.bazaar.servlet; import javax.servlet.ServletContext; import javax.servlet.ServletContextEvent; import javax.servlet.ServletContextListener; class BazaarServletContextListener implements ServletContextListener { private ServletContext context; public void contextDestroyed(ServletContextEvent event) { context = null; } public void contextInitialized(ServletContextEvent event) { context = event.getServletContext(); } } And the server log: INFO: Removing web application at context path /bazaar Feb 11, 2005 11:16:37 AM org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:C:\java\jakarta-tomcat-5.0.28\conf\Catalina\localhost\bazaar.xml Feb 11, 2005 11:17:30 AM org.apache.catalina.core.StandardContext listenerStart SEVERE: Skipped installing application listeners due to previous error(s) Feb 11, 2005 11:17:30 AM org.apache.catalina.core.StandardContext start SEVERE: Error listenerStart Feb 11, 2005 11:17:30 AM org.apache.catalina.core.StandardContext start SEVERE: Context startup failed due to previous errors I'm using Tomcat 5.0.28 and Sun JDK 1.4.2_06-b03. Any ideas? TIA - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Martin Grotzke Hohenesch 38, 22765 Hamburg Tel. +49 (0) 40.39905668 Mobil +49 (0) 170.9365656 E-Mail[EMAIL PROTECTED] Onlinehttp://www.javakaffee.de - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Attn developers of Tomcat and JK
To the developers of Tomcat and JK: As I can sense that not one single person is willing to respond to this issue, I can only assume that this tomcat-user community is worthless. Not only have I submitted this issue back 6 months ago, but a similar post was made by the user A jie twice within the last week. If you are too ashamed that your software is not reliable enough to be installed in a production environment, at least have the decency of telling us that. When I have to deal with user session data being sent back to the wrong client, sessions getting lost, and numerous log errors stating that the request/response cannot be fulfilled, I can only come to one conclusion.. Tomcat and the JK/JK2 connector are not reliable. See below and tell me that those messages would not cause problems for the client. [Mon Feb 07 13:30:20 2005] [info] jk_open_socket::jk_connect.c (183): connect() failed errno = 61 [Mon Feb 07 13:30:20 2005] [info] ajp_connect_to_endpoint::jk_ajp_common.c (862): Failed connecting to tomcat. Tomcat is probably not started or is listening on the wrong host/port (127.0.0.1:8009). Failed errno = 61 [Mon Feb 07 13:30:20 2005] [info] ajp_send_request::jk_ajp_common.c (1186): Error connecting to the Tomcat process. [Mon Feb 07 13:30:20 2005] [info] ajp_service::jk_ajp_common.c (1665): Sending request to tomcat failed, recoverable operation attempt=2 [Mon Feb 07 13:30:20 2005] [error] ajp_service::jk_ajp_common.c (1673): Error connecting to tomcat. Tomcat is probably not started or is listening on the wrong port. worker=ajp13w failed errno = 61 [Mon Feb 07 13:30:20 2005] [error] HttpExtensionProc::jk_isapi_plugin.c (937): service() failed If Tomcat + JK cannot process every request/response on a Windows server that is dual-xeon 3.0 Ghz processors with 4 GB of memory, then what machine would? And doesn't it seem strange how the JK2 project has been mysteriously abandoned? Thanks for going off in a seemingly better direction only to jump ship and leave everyone SOL. It makes me think that this whole Tomcat development effort is more of just a hobby and not something to be taken seriously. If anyone is willing to contact me on this issue, I would be more than happy to talk one-on-one. If you want to tell me that this is not the forum for ranting about Tomcat or JK, it should be. If you want to blackball me from this community, go ahead, I'm not getting any help from it as it is. I can only hope that this message reaches the people who supposedly support this software and lights a fire underneath them to improve it or tell us that it just doesn't work. Eric -Original Message- From: Eric Sandusky [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 02, 2005 11:40 AM To: Tomcat Users List Subject: ISAPI redirector warnings While running Tomcat 5 with IIS and JK2.. The Windows Application Logs often log several Warnings at the same point in time, see below for example. The problem is, these Warnings pile up in the Windows Event logs and force the Administrator to manually clear out the logs daily or weekly. I am not looking to simply suppress these messages, but find a solution to the actual problem. This issue seems to occur at random and things such as session confusion (user A sees user B's data) and other noticeable issues happen at or around the same time as these warnings. What is the reason for these log entries? How can I eliminate these log entries? Error: [jk_worker_ajp13.c (648)]: ajp13.service() Error forwarding ajp13:localhost:8009 1 0 Error: [jk_worker_ajp13.c (546)]: ajp13.service() ajpGetReply recoverable error 3 Error: [jk_handler_response.c (140)]: handler.response() Error sending response Error: [jk_service_iis.c (126)]: jk_ws_service_t::head, ServerSupportFunction failed Error: [jk_worker_ajp13.c (546)]: ajp13.service() ajpGetReply recoverable error 3 Error: [jk_handler_response.c (140)]: handler.response() Error sending response Error: [jk_service_iis.c (126)]: jk_ws_service_t::head, ServerSupportFunction failed Configuration: Windows 2000 or Windows 2003 Server Apache Tomcat 5.0.25 or 5.0.28 Microsoft IIS 5 or 6 JK2 2.0.4 connector Workers2.properties [shm:] info=Shared memory file. Required for multiprocess servers file=d:\tomcat5.0.28\work\jk20.shm size=100 # Define the communication channel [channel.socket:localhost:8009] tomcatId=localhost:8009 [ajp13:localhost:8009] channel=channel.socket:localhost:8009 [uri:/Concept60/*] worker=ajp13:localhost:8009 Server.xml Connector port=8088 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false redirectPort=8443 acceptCount=100 debug=0 connectionTimeout=2 disableUploadTimeout=true / Connector port=8009 enableLookups=false connectionTimeout=0 redirectPort=8443 debug=0 protocol=AJP/1.3 / isapi_redirector2.reg
RE: [OT] RE: Attn developers of Tomcat and JK
Classic! What's your problem? have you found something better at the same cost (0$)? If it doesn't fit your needs, don't use it. If you want support, buy a supported product or a version of Tomcat that is re-sold by a company that offers commercial support. If you wish to pay for somebody's time to fix this, feel free to make the offer. If you want a free product, be prepared for the lack of support that entails. If you want a free product *and* free support, move to Oz; you're on the wrong planet. See http://jakarta.apache.org/tomcat/faq/tomcatuser.html#why And another person telling me to play World of Warcraft. So far I've gotten several responses back. And they all say the same thing. The product sucks so go find another one. I guess I am living on Earth, just like the rest of you.
RE: Webapps won't go out of manager when deleted
Ethan - If there is a .xml file in the CATALINA_HOME/conf/Catalina/localhost directory that is named after your application, delete it and restart Tomcat. When you undeploy using the admin tool it deletes this application configuration file. I have found if this file is not deleted Tomcat still thinks the application is there. Eric Murphy Software Developer (NFIS) [EMAIL PROTECTED] tel/tél: 250-363-6038 fax / télécopieur 250-363-6004 Natural Resources Canada Pacific Forestry Centre 506 West Burnside Road Victoria BC V8Z 1M5 Ressources naturelles Canada Centre de foresterie du Pacifique 506 rue Burnside ouest Victoria, Colombie-Britanique V8Z 1M5 -Original Message- From: Ethan Michaels [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 02, 2005 9:55 PM To: Tomcat Users List Subject: Webapps won't go out of manager when deleted I'm using Tomcat 5.5.4 on Windows XP. My question is about the manager application. I deployed a web app called commutercorps and then wanted to undeploy it. Instead of using the undeploy command, I deleted CATALINA_HOME/webapps/commutercorps/ and CATALINA_HOME/work/commutercorps/, and then restarted Tomcat. However, the app still shows when I use List Web applications. It can't be started, it can't be undeployed through the manager app. It just sits there and won't go away. Moreover, I'm also using Ant to work with this application, trying to deploy a new version of my app using the custom Ant tasks for working with the Tomcat manager application such as org.apache.catalina.ant.DeployTask, etc. But that doesn't work now -- the task fail with a message saying there's already an application on that path. How can I get things back to normal without reinstalling Tomcat? Any help would be greatly appreciated. Thanks. __ Do you Yahoo!? Yahoo! Mail - You care about security. So do we. http://promotions.yahoo.com/new_mail - 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]
Cross-context
Tomcat Users - We are distributing a servlet application that relies on the application's Context element's 'cross-context' attribute to be set to 'true'. Is it possible to set the 'cross-context' in the application's web.xml? This would simplify the configuring of this application for clients as the value could come already configured. Eric Murphy Software Developer (NFIS) [EMAIL PROTECTED] tel/tél: 250-363-6038 fax / télécopieur 250-363-6004 Natural Resources Canada Pacific Forestry Centre 506 West Burnside Road Victoria BC V8Z 1M5 Ressources naturelles Canada Centre de foresterie du Pacifique 506 rue Burnside ouest Victoria, Colombie-Britanique V8Z 1M5 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
ISAPI redirector warnings
While running Tomcat 5 with IIS and JK2.. The Windows Application Logs often log several Warnings at the same point in time, see below for example. The problem is, these Warnings pile up in the Windows Event logs and force the Administrator to manually clear out the logs daily or weekly. I am not looking to simply suppress these messages, but find a solution to the actual problem. This issue seems to occur at random and things such as session confusion (user A sees user B's data) and other noticeable issues happen at or around the same time as these warnings. What is the reason for these log entries? How can I eliminate these log entries? Error: [jk_worker_ajp13.c (648)]: ajp13.service() Error forwarding ajp13:localhost:8009 1 0 Error: [jk_worker_ajp13.c (546)]: ajp13.service() ajpGetReply recoverable error 3 Error: [jk_handler_response.c (140)]: handler.response() Error sending response Error: [jk_service_iis.c (126)]: jk_ws_service_t::head, ServerSupportFunction failed Error: [jk_worker_ajp13.c (546)]: ajp13.service() ajpGetReply recoverable error 3 Error: [jk_handler_response.c (140)]: handler.response() Error sending response Error: [jk_service_iis.c (126)]: jk_ws_service_t::head, ServerSupportFunction failed Configuration: Windows 2000 or Windows 2003 Server Apache Tomcat 5.0.25 or 5.0.28 Microsoft IIS 5 or 6 JK2 2.0.4 connector Workers2.properties [shm:] info=Shared memory file. Required for multiprocess servers file=d:\tomcat5.0.28\work\jk20.shm size=100 # Define the communication channel [channel.socket:localhost:8009] tomcatId=localhost:8009 [ajp13:localhost:8009] channel=channel.socket:localhost:8009 [uri:/Concept60/*] worker=ajp13:localhost:8009 Server.xml Connector port=8088 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false redirectPort=8443 acceptCount=100 debug=0 connectionTimeout=2 disableUploadTimeout=true / Connector port=8009 enableLookups=false connectionTimeout=0 redirectPort=8443 debug=0 protocol=AJP/1.3 / isapi_redirector2.reg [HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Jakarta Isapi Redirector\2.0] workersFile=d:\\tomcat5.0.28\\conf\\workers2.properties extensionUri=/jakarta2/isapi_redirector2.dll logLevel=debug serverRoot=d:\\tomcat5.0.28\\
Re: How to change the timezone for Tomcat?
On Thu, 20 Jan 2005 11:18:12 -0500, Tim Funk [EMAIL PROTECTED] wrote: Odd. Is it possible the userid being used to launch tomcat has a borked environment variable? For example: public class Foo { public static void main(String args[]) { System.out.println(+ new java.util.Date()); } } [EMAIL PROTECTED]: echo $TZ; java Foo EST5EDT Thu Jan 20 11:12:15 EST 2005 [EMAIL PROTECTED]: export TZ=GMT [EMAIL PROTECTED]: echo $TZ; java Foo GMT Thu Jan 20 16:12:39 GMT+00:00 2005 [EMAIL PROTECTED]: export TZ=PST8PDT [EMAIL PROTECTED]: echo $TZ; java Foo PST8PDT Thu Jan 20 08:13:36 PST 2005 Using java 1.4.2 - HP-UX 11.00 -Tim Wendy Smoak wrote: From: Tim Funk [EMAIL PROTECTED] Before you start tomcat - change the TZ environment variable. export TZ=GMT (Or your favorite timezone) Thanks! The timezone appears to be set already, and everything else on the server knows what time it is. Only Tomcat thinks it lives in GMT. # date Thu Jan 20 08:40:34 MST 2005 # echo $TZ MST7 Anything else we can check? We're going to set CATALINA_OPTS and see if that helps, it's just strange that we've never had to mess with it before. :/ (I have an app that uses the current date as part of a filename-- and it stops working at 5pm when Tomcat thinks it's already tomorrow.) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Modern unices are more elaborate than just setting the TZ environment variable. In Redhat Linux, for example, the file /etc/localtime is a link to a file in the /usr/share/zoneinfo directories which specifies lots of time related things. However, some applications like Java also use the ZONE value in /etc/sysconfig/clock which contains the timezone name. These two should match. HTH. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Want to know better way of deploying
Yes I also encounter this problem with Tomcat 5.0.28 on a Wintel box. However it did not occur with 5.0.18. Neither does it occur on MacOS. Looks like something was broken recently, because it's working with 5.0.18 on another Wintel box which I have not upgraded. I believe Tomcat is unable to delete the war file for some reason, so the file remains locked. Maybe this is a global problem on Wintel boxes because I also noticed that in my servlet, deleting a file that I just created to temporarily save an upload, also fails randomly. Could this be related to permissions ? I am using ant to create war file. Then i undeploy previous version and try to deploy new version. But when i try to do this it says FAIL - War file strutstest.war already exists on server Inside /webapp - previous uploaded war file is still present. I can not delete just like that as it says sharing violation. So i need to stop Tomcat, delete /webapp/{my prev war file}. Then start the Tomcat again and deploy the new file. Is there any other soln ? so that w/o restarting my tomcat can i just deploy new version ? regards --- Eric VERGNAUD - JLynx Software Cutting-edge technologies and services for software companies web: http://www.jlynx.com --- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
connection pool ? tomcat hangs
Hi all, I am still experiencing a problem by which tomcat hangs upon attempting to execute a query under a specific circumstance, but I don't know why. I am attempting to utilize a connection pool and the problem here in lies the problem I believe. This is what happens, Tomcat will hang until my session times out and then report the following... java.sql.SQLException: System or internal error... then the app seems to login again immediately after that, without user prompt, and immediately returns... java.net.SocketException: Broken pipe Then I am required to restart my app. All works fine until there is inactivity for 20 minutes. Note that my session is set to time out after 20 minutes and it does... still this problem occurs after inactivity of 30 minutes. I am able to log out and log back in after the session times out (20 minutes) but before the 30 minute mark. Then the problem occurs at my rset = stmt.executeQuery() code in the login process. Details... - OS: fedora core 2 - tomcat 5.0.28 - connecting to informix dynamic server 9.1 - $CATALINA_HOME/common/lib/ contains, among other jars... commons-collections-3.1.jar commons-dbcp-1.2.1.jar commons-pool.1.2.jar ifxjdbc.jar Notes: these jars are located NOWHERE else as recommended by the Tomcat docs. Also my $CLASSPATH does not include the commons jars or ifxjdbcx.jar drivers specifically but they are placed in the $CATALINA_HOME/common/lib/ as per the Tomcat config docs... - my context descriptor is located @ $CATALINA_HOME/conf/engine/host/ - my app sits in $CATALINA_HOME/webapps/ - I have no context descriptor in my server.xml - I have a SessionListener class that closes the connection and invalidates the session when it's destroyed - below copied is code I use to connect and where it gets stuck, context, server.xml, web.xml. Sorry for all the DEBUG stmts... obviously I've been working on this for awhile... Thx much Eric CONNECTION POOL METHOD LOCATED IN THE CONTROLLER O FMY APP private void setConnectionPool() { try{ // next two lines obtain our environment naming context Context initialContext = new InitialContext(); // throws NamingException Context environmentContext = (Context) initialContext.lookup(java:comp/env); // throws NamingException // look up our data source dataSource = (DataSource) environmentContext.lookup(jdbc/wms); // throws NamingException console.println(DEBUG: Dispatcher.setConnectionPool(): dataSource set...); } catch(NamingException e) { console.println(EXCEPTION: Dispatcher.setConnectionFromConnectionPool(): + e); } } LOGIN METHOD OF CONTROLLER/DISPATCHER OF APP: private void login(HttpSession session, HttpServletRequest req, HttpServletResponse res) { //if(dataSource == null) { //if(DEBUG){console.println(DEBUG: Dispatcher.login(): dataSource null...);} setConnectionPool(); // setting data source if(DEBUG){console.println(DEBUG: Dispatcher.login(): set connection pool...);} //} if(connection == null) { if(DEBUG){console.println(DEBUG: Dispatcher.login(): connection null...);} try { // allocate and use a connection from the pool connection = dataSource.getConnection(); if(DEBUG){console.println(DEBUG: Dispatcher.login(): connection received... );} session.setAttribute(connection, connection); } catch(SQLException e) { if(DEBUG){console.println(EXCEPTION: Dispatcher.login(): dataSource - getConnection() failed: + e);} } } EmployeeBean employee = new EmployeeBean(); MessageBean message = getMessage(session); message.setView(login); String employeeId = req.getParameter(employeeId); String employeePassword = req.getParameter(employeePassword); // EMPLOYEE ID OR PASSWORD DO NOT CONTAIN INPUT VALUES ? if(UtilityBean.isEmpty(employeeId) || UtilityBean.isEmpty(employeePassword)) { message.setInputError(employee id or password are empty. Please try again.); session.setAttribute(message, message); forwardTo(req, res, .); } else { // EMPLOYEE ID AND PASSWORD CONTAIN VALUES employee.login(session, employeeId, employeePassword, message); // LOGIN AND SET EMPLOYEE //employee.login(connection, employeeId
Re: Tomcat/JVM crashes on Linux
I've not tried this myself but you could add a Runtime.addShutdownHook and get it to print out anything which will give you a clue. On Tue, 21 Dec 2004 08:47:49 -0500, Greg Lappen [EMAIL PROTECTED] wrote: Well, turns out the RAM is fine in the server. Our hosting provider tested it last night and said it checked out fine. Is there any other reason that the JVM/Tomcat would just exit like this? Could System.exit() be called somewhere? Isn't there a way to prevent System.exit() from being called? I know I'm grasping at straws, but what else is there to do in this situation? Greg On Dec 20, 2004, at 1:57 PM, Eric Rotick wrote: I had a similar problem with an almost identical setup to yours which turned out to be bad memory. An extra 1GB stick was added which had a bad section in the top of the memory map. This memory only got used when things got busy so everyone suspected some threading issue. We got lucky and spotted something totally absurd in the logs which prompted a memtest86 run and hey presto we got our answer. On Mon, 20 Dec 2004 13:28:56 -0500, Wade Chandler [EMAIL PROTECTED] wrote: Greg Lappen wrote: Hello- Has anyone had a problem with Tomcat 5.0.28 crashing on Linux with no error messages? My production server running with JDK 1.4.2_06, RedHat EL 3.0 just crashes, no core dump, no errors in catalina.out, no clues. Sometimes it goes for days, sometimes it happens several times in one day. I am running the tomcat process behind Apache 2 with mod_proxy. Setting ulimit -c unlimited in the catalina.sh startup file still did not produce a core file. If nobody else has experienced this, do you have any suggestions on how to debug it further? Thanks, Greg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] I'm using the same setup as you less Apache2. I use tomcat as the web server. Using TC5.0.28 and JDK1.4.2_06, and I have yet to have the server crash once. Not much help, but might give you some clues where to look. Connector log (mod_proxyassuming you mean you're using the new connector code)is there anything in the Apache2 log? I assume from your post you mean that the java process just completely goes away. You might find (depending on the running directory of the java process running tomcat) a pid dump log file or something...not sure if the vm produces one of these or not. You also might check in /var/log/messages file to see if for some reason the kernel or some lib got some error it logged. Wade - 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] - 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]
Re: Tomcat/JVM crashes on Linux
I'd be interested to know the outcome of this one when you crack it. On Tue, 21 Dec 2004 09:32:42 -0500, Greg Lappen [EMAIL PROTECTED] wrote: That's a good idea, I'm going to try that. Its a cheap way to confirm or deny my suspicions. Thanks! On Dec 21, 2004, at 9:20 AM, Eric Rotick wrote: I've not tried this myself but you could add a Runtime.addShutdownHook and get it to print out anything which will give you a clue. On Tue, 21 Dec 2004 08:47:49 -0500, Greg Lappen [EMAIL PROTECTED] wrote: Well, turns out the RAM is fine in the server. Our hosting provider tested it last night and said it checked out fine. Is there any other reason that the JVM/Tomcat would just exit like this? Could System.exit() be called somewhere? Isn't there a way to prevent System.exit() from being called? I know I'm grasping at straws, but what else is there to do in this situation? Greg On Dec 20, 2004, at 1:57 PM, Eric Rotick wrote: I had a similar problem with an almost identical setup to yours which turned out to be bad memory. An extra 1GB stick was added which had a bad section in the top of the memory map. This memory only got used when things got busy so everyone suspected some threading issue. We got lucky and spotted something totally absurd in the logs which prompted a memtest86 run and hey presto we got our answer. On Mon, 20 Dec 2004 13:28:56 -0500, Wade Chandler [EMAIL PROTECTED] wrote: Greg Lappen wrote: Hello- Has anyone had a problem with Tomcat 5.0.28 crashing on Linux with no error messages? My production server running with JDK 1.4.2_06, RedHat EL 3.0 just crashes, no core dump, no errors in catalina.out, no clues. Sometimes it goes for days, sometimes it happens several times in one day. I am running the tomcat process behind Apache 2 with mod_proxy. Setting ulimit -c unlimited in the catalina.sh startup file still did not produce a core file. If nobody else has experienced this, do you have any suggestions on how to debug it further? Thanks, Greg --- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] I'm using the same setup as you less Apache2. I use tomcat as the web server. Using TC5.0.28 and JDK1.4.2_06, and I have yet to have the server crash once. Not much help, but might give you some clues where to look. Connector log (mod_proxyassuming you mean you're using the new connector code)is there anything in the Apache2 log? I assume from your post you mean that the java process just completely goes away. You might find (depending on the running directory of the java process running tomcat) a pid dump log file or something...not sure if the vm produces one of these or not. You also might check in /var/log/messages file to see if for some reason the kernel or some lib got some error it logged. Wade - 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] - 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] - 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]
Re: strange tomcat Behavior need urgent help.
This is a MySql problem. It shuts down connections if they have been idle for too long. You need a pool manager that takes care of this. Something like c3p0 will do the job. On Sun, 19 Dec 2004 12:28:09 + (GMT), Krishnakant Mane [EMAIL PROTECTED] wrote: hello all, I am Krishnakant Mane from India. I own a software firm and we generally implement our systems on linux and all open source servers like jakarta tomcat and apache server in particular. of late I have been facing a strange problem with tomcat. I am a tomcat 5 aka 5.0.25 user. I have deployed an database based application using mysql as the back-end. I use mysql jdbc driver to connect to the database. the application runs fine for a long time. I check it personally for the entire day. since our developers work on the server the entire day, I am sure there is that it works. but when we shut our office and come next day morning, the application does not respond. what could be the problem. it is strange to see that when the server is under some kind of a small work load it works absolutely fine. but when we don't touch it for the entire night the thing sympally does not work. does tomcat also require warm-up? haha. by the way, I have kept the jdbc (jar) library in the common/lib directory as all my applications are database based. is it the right thing to do? and lastly what steps should I take to avoid the above mentioned problem. one thing I will like to mention. when the application give problem in the morning, it responds with just the title and when it comes to the database connection it gets stuck I believe. but when I run some console app with the same jdbc driver it properly connects to the same database/table. and the application works fine when I reload again. Please provide some valuable feedback thanks Krishnakant. ___ Win a castle for NYE with your mates and Yahoo! Messenger http://uk.messenger.yahoo.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]
Re: Tomcat/JVM crashes on Linux
I had a similar problem with an almost identical setup to yours which turned out to be bad memory. An extra 1GB stick was added which had a bad section in the top of the memory map. This memory only got used when things got busy so everyone suspected some threading issue. We got lucky and spotted something totally absurd in the logs which prompted a memtest86 run and hey presto we got our answer. On Mon, 20 Dec 2004 13:28:56 -0500, Wade Chandler [EMAIL PROTECTED] wrote: Greg Lappen wrote: Hello- Has anyone had a problem with Tomcat 5.0.28 crashing on Linux with no error messages? My production server running with JDK 1.4.2_06, RedHat EL 3.0 just crashes, no core dump, no errors in catalina.out, no clues. Sometimes it goes for days, sometimes it happens several times in one day. I am running the tomcat process behind Apache 2 with mod_proxy. Setting ulimit -c unlimited in the catalina.sh startup file still did not produce a core file. If nobody else has experienced this, do you have any suggestions on how to debug it further? Thanks, Greg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] I'm using the same setup as you less Apache2. I use tomcat as the web server. Using TC5.0.28 and JDK1.4.2_06, and I have yet to have the server crash once. Not much help, but might give you some clues where to look. Connector log (mod_proxyassuming you mean you're using the new connector code)is there anything in the Apache2 log? I assume from your post you mean that the java process just completely goes away. You might find (depending on the running directory of the java process running tomcat) a pid dump log file or something...not sure if the vm produces one of these or not. You also might check in /var/log/messages file to see if for some reason the kernel or some lib got some error it logged. Wade - 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]
Re: Tomcat/JVM crashes on Linux
No core dump and nothing significant in the log files. The process just went away. Actually now I think about it we did have some other weirdness like JARs that were corrupt that also went away with the good memory. On Mon, 20 Dec 2004 15:13:35 -0500, Greg Lappen [EMAIL PROTECTED] wrote: When you say the problem was similar, did you also have no core dump or log messages, just a missing JVM process? I am asking our hosting provider to test the server's RAM - I was going to do this before but since no other process ever crashes (Apache, MySql, etc.) we didn't think it could be the RAM. Greg On Dec 20, 2004, at 1:57 PM, Eric Rotick wrote: I had a similar problem with an almost identical setup to yours which turned out to be bad memory. An extra 1GB stick was added which had a bad section in the top of the memory map. This memory only got used when things got busy so everyone suspected some threading issue. We got lucky and spotted something totally absurd in the logs which prompted a memtest86 run and hey presto we got our answer. On Mon, 20 Dec 2004 13:28:56 -0500, Wade Chandler [EMAIL PROTECTED] wrote: Greg Lappen wrote: Hello- Has anyone had a problem with Tomcat 5.0.28 crashing on Linux with no error messages? My production server running with JDK 1.4.2_06, RedHat EL 3.0 just crashes, no core dump, no errors in catalina.out, no clues. Sometimes it goes for days, sometimes it happens several times in one day. I am running the tomcat process behind Apache 2 with mod_proxy. Setting ulimit -c unlimited in the catalina.sh startup file still did not produce a core file. If nobody else has experienced this, do you have any suggestions on how to debug it further? Thanks, Greg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] I'm using the same setup as you less Apache2. I use tomcat as the web server. Using TC5.0.28 and JDK1.4.2_06, and I have yet to have the server crash once. Not much help, but might give you some clues where to look. Connector log (mod_proxyassuming you mean you're using the new connector code)is there anything in the Apache2 log? I assume from your post you mean that the java process just completely goes away. You might find (depending on the running directory of the java process running tomcat) a pid dump log file or something...not sure if the vm produces one of these or not. You also might check in /var/log/messages file to see if for some reason the kernel or some lib got some error it logged. Wade - 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] - 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]
Re: Tomcat/JVM crashes on Linux
The application receives data packets from acoustic sensors. While the total load is not huge, because of the way the data is collected there are periods of no activity and then periods when all hell breaks loose. This happens every 15 minutes and we size the memory based on the use of swap over a 24 hour period. Tomcat is by far this biggest process and it can grow quite large due to internal queuing waiting for other services to become available. On average there are 2,500 hits every 15 minutes spread across 2 machines in a cluster. On Mon, 20 Dec 2004 15:15:17 -0500, Greg Lappen [EMAIL PROTECTED] wrote: What kind of load does your application handle? I am not processing a HUGE amount of requests, but we server about 6000 visitors a day, 15,000 pages. Greg On Dec 20, 2004, at 1:28 PM, Wade Chandler wrote: Greg Lappen wrote: Hello- Has anyone had a problem with Tomcat 5.0.28 crashing on Linux with no error messages? My production server running with JDK 1.4.2_06, RedHat EL 3.0 just crashes, no core dump, no errors in catalina.out, no clues. Sometimes it goes for days, sometimes it happens several times in one day. I am running the tomcat process behind Apache 2 with mod_proxy. Setting ulimit -c unlimited in the catalina.sh startup file still did not produce a core file. If nobody else has experienced this, do you have any suggestions on how to debug it further? Thanks, Greg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] I'm using the same setup as you less Apache2. I use tomcat as the web server. Using TC5.0.28 and JDK1.4.2_06, and I have yet to have the server crash once. Not much help, but might give you some clues where to look. Connector log (mod_proxyassuming you mean you're using the new connector code)is there anything in the Apache2 log? I assume from your post you mean that the java process just completely goes away. You might find (depending on the running directory of the java process running tomcat) a pid dump log file or something...not sure if the vm produces one of these or not. You also might check in /var/log/messages file to see if for some reason the kernel or some lib got some error it logged. Wade - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
setting scheme in CoyoteConnector
According to: http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/http.html setting the scheme attribute should force all calls to getScheme() to return whatever protocol was put for the value of scheme. I've found this to not be true. Has anyone successfully set the scheme for tomcat 4.1.31 or tomcat 5.5.4? The connector is as follows: Connector className=org.apache.coyote.tomcat5(4).CoyoteConnector acceptCount=100 connectionTimeout=15000 debug=6 disableUploadTimeout=false maxThreads=150 minSpareThreads=5 maxSpareThreads=75 enableLookups=false port=8080 redirectPort=443 scheme=https secure=false proxyPort=443 useURIValidationHack=false/ Calling getScheme() in a jsp [ htmlhead/headbody getScheme=%= request.getScheme() % /body/html ] results in 'http' being displayed instead of 'https' Has anyone else noticed this behaviour or know a way around it? Thanks, Eric - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Soap and classpaths
Hi, On MacOS X, I'm trying to run a web service which looks like this: package com.jlynx.soap; class service { public String test() { return Hello; } } This class is part of a servlet which is installed as jlynx_servlet. In the soap admin utility, I deploy this service as follows: ID: jlynx_service Scope: Request Provider Type: java Provider Class: com.jlynx.soap.service Use Static Class: false Methods: Test Options 1: Key: classpath Value: /Applications/jakarta/webapps/jlynx_servlet/WEB-INF/classes In catalina.policy, I have granted all permissions to soap. However, when I connect to the server, I get the following error: Unable to resolve target object: com.jlynx.soap.service What am I doing wrong ? --- Eric VERGNAUD - JLynx Software Cutting-edge technologies and services for software companies web: http://www.jlynx.com --- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Displaying XML in Safari
Hi, The current version of Safari has no support for pure XML à la Internet Explorer. What a pity ! I was wondering if there is a simple way to convert an XML document to HTML that would display properly in Safari. This is merely an utility, and all I'm looking for is something that will make XML look like XML. No special features. --- Eric VERGNAUD - JLynx Software Cutting-edge technologies and services for software companies web: http://www.jlynx.com --- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Displaying XML in Safari
le 8/12/04 22:33, Larry Meadors à [EMAIL PROTECTED] a écrit : If you have a String, you could use c:out, and the escapeXml attribute. [EMAIL PROTECTED] 12/8/2004 1:33:00 PM Hi, The current version of Safari has no support for pure XML à la Internet Explorer. What a pity ! I was wondering if there is a simple way to convert an XML document to HTML that would display properly in Safari. This is merely an utility, and all I'm looking for is something that will make XML look like XML. No special features. Here is what I found: http://www.webreference.com/js/tips/011227.html says: You can convert an XML file to HTML on the fly, instead of building DOMDocument objects and running a conversion utility between them. You just load the XML file in your browser, and out will come the desired HTML. In order to do this conversion on the fly, you need to specify the XSLT file (formatting directives) in the body of the XML file. The top two lines of the XML file should be as follows: ?xml version=1.0? ?xml-stylesheet type=text/xsl href=transform.xsl? where transform.xsl is the name of the formatting utility. It works like a charm. --- Eric VERGNAUD - JLynx Software Cutting-edge technologies and services for software companies web: http://www.jlynx.com --- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Best place to store files ?
Hi, I'm developing a servlet which needs to handle file uploads and downloads. I manage to store the files in a directory inside my servlet, but each time I upload a new version of my servlet, the files are destroyed. Is there a preferred place to store such files in Tomcat, or is this entirely up to the developer and the catalina.policy file ? Is there a way to tell Tomcat NOT to erase existing files in a servlet, but only overwrite them with files from the war file ? --- Eric VERGNAUD - JLynx Software Cutting-edge technologies and services for software companies web: http://www.jlynx.com --- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Best place to store files ?
le 7/12/04 23:20, Larry Meadors à [EMAIL PROTECTED] a écrit : Put them in a database instead? Thanks, but not an option in this case. --- Eric VERGNAUD - JLynx Software Cutting-edge technologies and services for software companies web: http://www.jlynx.com --- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Best place to store files ?
le 7/12/04 23:33, Parsons Technical Services à [EMAIL PROTECTED] a écrit : I use a directory that belongs to the owner of Tomcat and is located outside of the Tomcat directory. It really is a matter of preference. As for not overwriting the files, I have yet to read anything on this. How would you determine which file to keep and which to overwrite? If you never deleted any files then the directory would fill with abandoned file that belonged to prior versions of your app. That means you would have to manage the files manually and with that is the chance to delete a file belonging to your app. Simple terms, pick a place just for them use it. Doug Yes it's simple. I was just wondering whether there was a preferred method for this, and maybe a folder in the Tomcat directory for that purpose. --- Eric VERGNAUD - JLynx Software Cutting-edge technologies and services for software companies web: http://www.jlynx.com --- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Best place to store files ?
le 8/12/04 0:15, Wendy Smoak à [EMAIL PROTECTED] a écrit : From: Eric VERGNAUD [EMAIL PROTECTED] Yes it's simple. I was just wondering whether there was a preferred method for this, and maybe a folder in the Tomcat directory for that purpose. Nothing in the Servlet Specification requires Tomcat to provide you with a permanent place to put uploaded files. My advice would be to put them outside of Tomcat, and write a thin layer to insulate the Servlet from whatever decisions you're making today. That way, if you decide at some point in the future to put the files in a database, or do something else with them, you don't have to mess with the Servlet code. Your Servlet shouldn't know or care where the files are, it should just call 'read' or 'write' and let the data access layer deal with the details. Which is what I already do. As a matter of fact, the layer I'm using makes it look like a database. The only thing I was looking for is the preferred place for storing files. If there is none, that's ok. --- Eric VERGNAUD - JLynx Software Cutting-edge technologies and services for software companies web: http://www.jlynx.com --- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat diagnostic tools
You could use 'netstat -an' to see if there is a process listening on your chosen ports and 'tcpdump port ' to see the packets going to and from the port. You could also use ethereal to capture the packets and then use the 'follow TCP stream' option to see inside the packets. On 05 Dec 2004 14:15:53 +0100, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, I have a problem with my application which is running on Tomcat Struts. I am begginer so my question can maybe lame. My Tomcat is running on port 8080 and there I can see manager and my application sessions and so on. But from time to time the server stops reacting on HTTP requests. And I cannot see what is happening, how many sessions are opened on my app and if it is started and so on because I cannot open http://server:8080 (web browser hangs on it). As looking on processes on Linux machine I see that Tomcat is running. Of course I can stop and start Tomcat again and then everything is ok, but that way I cannot diagnose the reason of application hang. There comes my question: how can I see the parameters of the system not by using Web interface of Tomcat Manager? Are there any terminal programs or file logs or sth like that which I can always use when processes are running? Are there any usable tools like HTTP monitors which can debug HTTP requests and Tomcat reactions on it or something? Maciek -- Ponad 400 tysiecy kandydatow na meza? Poszukaj wlasnego! http://link.interia.pl/f183c - 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]
Re: Why some variables and methods have leading _ in the servlet compiled from JSP?
I think the variables defined by the JSP compiler are named with the leading underscore to avoid any naming clashes with names you may have used yourself. Of course, if you've used leading underscores yourself On Sun, 5 Dec 2004 10:11:01 -0500, Rhino [EMAIL PROTECTED] wrote: - Original Message - From: zerol tib [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, December 05, 2004 9:30 AM Subject: Why some variables and methods have leading _ in the servlet compiled from JSP? Howdy, When I am reading the servlet compiled from JSPs, I find that There are some variables and methods have leading _ while others not: _jspxFactory _jspx_out _jspx_includes Why these identities have the leading underline? Is there a naming rule? I have seen programs where programmers used an underscore as the first character of all class variables and used variable names that didn't start with underscores as local variables. This practice is actually *against* the principles that are stated in Code Conventions for the Java Programming Language at http://java.sun.com/docs/codeconv/index.html. If you look at Chapter 9, Naming Conventions, it has the following under Variables: Except for variables, all instance, class, and class constants are in mixed case with a lowercase first letter. Internal words start with capital letters. Variable names should NOT [emphasis added] start with underscore _ or dollar sign $ characters, even though both are allowed. Variable names should be short yet meaningful. The choice of a variable name should be mnemonic- that is, designed to indicate to the casual observer the intent of its use. One-character variable names should be avoided except for temporary throwaway variables. Common names for temporary variables are i, j, k, m, and n for integers; c, d, and e for characters. Of course these are only conventions, not rules, so people are free to ignore them unless their shop standards say otherwise. Rhino - 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]
Re: Why it is better to call response.isCommitted() before calling sendRedirect()?
If the response has already committed then you cannot send a redirect. The various header details contain the redirect information and the response is said to be committed if these headers have already been sent back to the client. On Sun, 5 Dec 2004 23:21:34 +0800, zerol tib [EMAIL PROTECTED] wrote: Howdy, When reading source codes of JSP/JavaBeans , I always meet with such codes : if (response.isCommitted() == false) { // ... response.sendRedirect(ConstTable.ERROR_MENU); } else { // some action } then I am wondering Why it is better to call response.isCommitted() before calling sendRedirect()? Could anybody please explain something for me? - 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]
Re: How to set Error Log for Unpacked Web Application in Tomcat 5.5
le 20/02/02 17:17, inr à [EMAIL PROTECTED] a écrit : Hai all, I need the Configuration for setting the error Log file for my WebApplication running on Tomcat 5.5. How to set the Error log file in the Server.xml file. [ In Tomcat 5.5 ] Thanks for ever, inr - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Your clock is not set properly. A little annoying... --- Eric VERGNAUD - JLynx Software Cutting-edge technologies and services for software companies web: http://www.jlynx.com --- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Redirecting not https to https
Also, you'll need something like the following in your web.xml. security-constraint web-resource-collection web-resource-name/web-resource-name url-pattern/*/url-pattern /web-resource-collection user-data-constraint transport-guaranteeCONFIDENTIAL/transport-guarantee /user-data-constraint /security-constraint Jon - Original Message - From: Shapira, Yoav [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED]; Xeth Waxman [EMAIL PROTECTED] Sent: Friday, November 19, 2004 10:05 AM Subject: RE: Redirecting not https to https Hi, That's the redirectPort connector attribute. If an https request comes into a non-secure connector, and that connector has a redirectPort, the request will be redirected. Yoav Shapira http://www.yoavshapira.com -Original Message- From: Xeth Waxman [mailto:[EMAIL PROTECTED] Sent: Friday, November 19, 2004 10:56 AM To: [EMAIL PROTECTED] Subject: Redirecting not https to https Greetings all. I am moving one application I have from standard http over to https. I found this article http://jakarta.apache.org/tomcat/tomcat-5.0-doc/ssl-howto.html which I think will help me get it configured. My question is, is there a tag I need to add in the web.xml descriptor file to make sure that http requests get redirectedf automatically into a https request? Any assistance is greatly appreciated. -- Xeth Waxman [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - 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]
Disadvantages to using unpackWARs=false?
Does anyone know if there are disadvantages to setting unpackWARs=false? What I'm wondering is if it then has to uncompress the .war file everytime a resource is accessed thus causing a performance hit? Jon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Disadvantages to using unpackWARs=false?
OK, thanks for the info. Like you mentioned, I was thinking that redeployment would be easier with it set to false. I just wanted to make sure that I wouldn't be incurring a performance hit and the expense of not having to mess around with an extra directory. Thanks. Jon - Original Message - From: Shapira, Yoav [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, November 18, 2004 11:08 AM Subject: RE: Disadvantages to using unpackWARs=false? Hi, Does anyone know if there are disadvantages to setting unpackWARs=false? What I'm wondering is if it then has to uncompress the .war file everytime a resource is accessed thus causing a performance hit? We don't uncompress the file on every resource request ;) That'd be fairly awful design. In fact, even with unpackWARs set to true, the WAR may still be unpacked by Tomcat *in its work directory* for internal use. It just means it won't be unpacked in the webapps directory, and therefore redeployment is easier. Yoav Shapira http://www.yoavshapira.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 5.5 nightly zip files?
Anyone know if there are nightly zip files for Tomcat 5.5? Jon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 5.5 nightly zip files?
Thanks, I saw those, but, I thought they were for 5.0. So, they're for 5.5? Jon - Original Message - From: Shapira, Yoav [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, November 17, 2004 10:40 AM Subject: RE: Tomcat 5.5 nightly zip files? Hi, The Jakarta binaries download page even gives you the link at the bottom ;) http://cvs.apache.org/builds/jakarta-tomcat-5/nightly/. Nightlies are always at your own risk. Yoav Shapira http://www.yoavshapira.com -Original Message- From: Jonathan Eric Miller [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 17, 2004 11:38 AM To: Tomcat User List Subject: Tomcat 5.5 nightly zip files? Anyone know if there are nightly zip files for Tomcat 5.5? Jon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - 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]
Re: Tomcat 5.5 nightly zip files?
Thanks! Jon - Original Message - From: Shapira, Yoav [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, November 17, 2004 12:07 PM Subject: RE: Tomcat 5.5 nightly zip files? Hi, Yeah. They're built from CVS HEAD (there's very little purpose to nightlies otherwise) so they're 5.5. Yoav Shapira http://www.yoavshapira.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 5.5.4, Logging and the death of my friend localhost_log
Actually, I guess the default isn't that bad for UNIX/Linux anyway. In theory, if you are using J2SE 1.5 with the default log settings and you don't have Log4J installed, INFO level messages and above will get written to the console which gets redirected to catalina.out by catalina.sh. So, instead of having catalina.out, plus the other log, everything instead just goes into catalina.out. This is fine for my purposes, I just wanted to make sure that I wouldn't be missing important exceptions. As far as I know, if an unhandled exception occurs, it will get logged to catalina.out. If that's the case, then I'm happy. The only thing that I need to figure out now, is what is supposed to be better about Log4J over standard JDK logging and whether I actually need whatever that is. I'm guessing maybe log rotation or something? The other thing that I noticed is that a JDK logging.properties file seems to only allow you to specify a single FileHandler. I thought that it would let you assign different files to different loggers, but, as far as I can tell, this isn't possible (using the properties file anyway). Maybe this is one of the limitations? Jon - Original Message - From: Remy Maucherat [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, November 11, 2004 2:02 PM Subject: Re: Tomcat 5.5.4, Logging and the death of my friend localhost_log On Thu, 11 Nov 2004 15:25:48 -, Allistair Crossley [EMAIL PROTECTED] wrote: Now, I know Logger has been removed from 5.5 series and that we are supposed to be using some kind of log4j / commons-logging stylee way but am fairly surprised that 5.5.4 did not come with a basic setup for this. I tried to find a reasonable default, but there's none IMO as the logger implementations that Sun provides with JREs 1.4 and 1.5 are quite limited. The only solution would be to write a logger for java logging, but I'm not a big fan of that. -- x Rémy Maucherat Developer Consultant JBoss Group (Europe) SàRL x - 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]
Re: Auto-deploy not working in Tomcat 5.5.4 when .war file has a META-INF/context.xml?
Here's the message without the file attachments since the original message was blocked as spam. I don't see a way to post file attachments to the bug database either... Jon - Original Message - From: Jonathan Eric Miller [EMAIL PROTECTED] To: Remy Maucherat [EMAIL PROTECTED]; Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, November 11, 2004 9:54 AM Subject: Re: Auto-deploy not working in Tomcat 5.5.4 when .war file has a META-INF/context.xml? I created a simplified test case and tested it with a default install of Tomcat 5.5.4 and verified that it doesn't work at least in the case when you have a context.xml with nothing more than a Context/ in it. Please see the attached .war files. Note, I rebuilt the .war files each time before I copied them to the webapps directory so that the timestamp was different. It worked fine everytime with the test-without-context.war and only installed the app the first time with the other one. Should I submit a bug report? Jon - Original Message - From: Remy Maucherat [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, November 10, 2004 5:01 PM Subject: Re: Auto-deploy not working in Tomcat 5.5.4 when .war file has a META-INF/context.xml? On Wed, 10 Nov 2004 16:17:17 -0600, Jonathan Eric Miller [EMAIL PROTECTED] wrote: ?xml version=1.0 encoding=UTF-8? Context reloadable=true/ And what does reloadable do according to the documentation ? Is is useful for what you want to do ? No. Instead, it is exclusively used for monitoring classes. I am almost certain the case where a war is updated works ok. If you really think it doesn't work, please submit a test war. -- x Rémy Maucherat Developer Consultant JBoss Group (Europe) SàRL x - 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]
Re: Tomcat 5.5.4, Logging and the death of my friend localhost_log
So, exceptions aren't logged by default? Does the new log4j method give you full stack traces, or, is it just one line error messages? If I don't configure log4j, does that mean that exceptions can be occurring and I won't know about it? IMHO, a decent default logging configuration should be provided by default. Not all of us are already experts in log4j... Jon - Original Message - From: Allistair Crossley [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, November 11, 2004 9:41 AM Subject: RE: Tomcat 5.5.4, Logging and the death of my friend localhost_log Hi again, I have tried to setup a file appender now without success. When I restart Tomcat it is clear that it does not wish to create the file I am specifying. I am wondering if Tomcat really is initialising the logging subsystem from placing log4j.properties in common/classes. I could be completely wrong and have missed something? log4j.rootLogger=debug, stdout, R log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n log4j.appender.R=org.apache.log4j.RollingFileAppender log4j.appender.R.File=d:/jakarta-tomcat-5.5.4/logs/catalina.log log4j.appender.R.MaxFileSize=100KB log4j.appender.R.MaxBackupIndex=1 log4j.appender.R.layout=org.apache.log4j.PatternLayout log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n log4j.logger.org.apache.catalina=DEBUG, R Cheers! A. -Original Message- From: Allistair Crossley Sent: 11 November 2004 15:35 To: Tomcat Users List Subject: RE: Tomcat 5.5.4, Logging and the death of my friend localhost_log Hey Yoav, tomcat/common/classes/log4j.properties as follows log4j.rootLogger=DEBUG, A1 log4j.appender.A1=org.apache.log4j.ConsoleAppender log4j.appender.A1.layout=org.apache.log4j.PatternLayout log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c - %m%n log4j.logger.org.apache.catalina=DEBUG This was pretty much just copied from the link on the Tomcat Logging FAQ except I changed the log level and also log4j.logger.org.apache to log4j.logger.org.apache.catalina I will try to add a file based appender... Allistair. -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: 11 November 2004 15:31 To: Tomcat Users List Subject: RE: Tomcat 5.5.4, Logging and the death of my friend localhost_log Hi, I have tried what I believed to be how to do this, e.g I placed a basic console appender log4j.properties file into tomcat/common/classes and popped log4j1.2.8 into the common/lib. No logging though. Where did you attach the console appender? To the root logger or on of your own packaged? Try creating an appender (probably a FileAppender) and associated it with the org.apache logger. If you want DEBUG-level logging, set its level DEBUG. Enjoy Halo 2 ;) Yoav This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Auto-deploy not working in Tomcat 5.5.4 when .war file has a META-INF/context.xml?
I don't see it at least on the inital bug report page at http://nagoya.apache.org/bugzilla/enter_bug.cgi?product=Tomcat%205 Maybe I need to commit the page first and there's another page... I don't want to submit a report just yet, because I'm still in the process of trying to figure out how the new logging works and I want to make sure there isn't a error occurring that I'm not seeing because of this. I tried it with Tomcat 5.0.28 and found that it was throwing an exception in the console about the context path not being set. So, I added that path to my context.xml and it then worked with 5.0.28, but, still won't work with 5.5.4, but, like I said, I want to see if I can figure out how to use the new logging. My guess is that it's something similar and I'm just not seeing the error message. Jon - Original Message - From: Shapira, Yoav [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, November 11, 2004 10:12 AM Subject: RE: Auto-deploy not working in Tomcat 5.5.4 when .war file has a META-INF/context.xml? Hi, I don't see a way to post file attachments to the bug database either... Look again ;) You can attach files of any type to any bugzilla issue. You do need to be logged in to Bugzilla to do so. Yoav This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - 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]
Re: AW: connection pooling
What informix db version are you working with? I do not know how to get the serial value. I use an informix driver that supports connection pooling and I'm not familiar with the ifmxStatement. Depending on the informix version, I suggest utilizing a type 4 informix jdbc driver(search). That may help although you may need to change some code such as the ifmxStatement. I'm in a bit over my head on this one. Eric On Thu, 11 Nov 2004 12:04:28 +0100, Akacem Mohammed [EMAIL PROTECTED] wrote: Hello Eric, thank you Eric it works now. but I have another probleme now: in my code I have the following statements: ifmxStatement informixStmt= (IfmxStatement)stmt; // I get hier a ClassCastException // serialvalue = ((IfmxStatement)stmt).getSerial(); serialvalue = informixStmt.getSerial(); actually I am porting my app from tomcat 4.1 jkd 1.3 to tomcat 5.0.28. jdk 1.4. I earlier used the com.bitmechanic.sql package und I had no casting probleme on this statement. I looked in the ifmx.jar docs, the IfmxStatement implement Statement.that means the implementation of dbcp und ifmx.jar driver are not compatible. have you an idea how to get the serialvalue. I do write the serialvalue I get from informix in a column in my table(it is somhow my increment.) or do you use the pooled version of the informix driver? thanks for any hint Mohammed -Ursprüngliche Nachricht- Von: Eric Wulff [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 10. November 2004 19:26 An: [EMAIL PROTECTED] Betreff: AW: connection pooling Sorry, I sent this to the user list but didn't copy you directly. -- Forwarded message -- From: Eric Wulff [EMAIL PROTECTED] Date: Tue, 9 Nov 2004 11:32:15 -0800 Subject: Re: AW: connection pooling To: Tomcat Users List [EMAIL PROTECTED] Hi Mohammed, The resource-ref of your web.xml looks alright. While the DefaultContext should work if you place it in the correct location(see notes below) within your server.xml, I doubt you want this to be your final solution. My final fix was suggested by Steve and noted here... Copy the Context... (you need to change your DefaultContext tag to a Context tag) from your server.xml to a file all its own and name that file myapp.xml(in your case I guess that would be SteaDB.xml). Then mv that file to $CATALINA_HOME/conf/Catalina/localhost/ Restart your app or shutdown and startup Tomcat and you should be all set. Let me know how it goes. Eric Notes: - I'm not sure if DefaultContext or Context within your server.xml have any effect once you have a myapp.xml at $CATALINA_HOME/conf/Catalina/localhost/. I still have a Context in my server.xml. - I don't think it matters but fyi, my Context only includes a Resource, and then Resource-Params as follows: username, password, driverClass, and url. - When working with the DefaultContext, location for that tag should be within the Engine... tag having the Standalone attribute. This likely needs to be un-commented, hence you will need to comment out the Engine... tag with the Catlina attribute, which is likely just below in the server.xml. On Tue, 9 Nov 2004 14:25:41 +0100, Akacem Mohammed [EMAIL PROTECTED] wrote: Hello, I am stuck in the same Probleme as Erik. I did exactly what in the e-mails suggested is with no success. I am runing TC 5.0.28 und try to get a connection to an informix database. I got the following Error Message: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' mycode : try { initCtx = new InitialContext(); envCtx = (Context) initCtx.lookup(java:comp/env); ds = (DataSource) envCtx.lookup(jdbc/SteaDB); } catch (NamingException e) { // TODO Auto-generated catch block e.printStackTrace(); } try { conn=ds.getConnection(); } catch (SQLException e2) { // TODO Auto-generated catch block e2.printStackTrace(); } My Configuration is as follow: web.xml : resource-ref descriptionDB Connection to informix/description res-ref-namejdbc/SteaDB/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref server.xml : DefaultContext Resource name=jdbc/SteaDB auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/SteaDB parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter !-- Maximum time to wait for a dB connection to become available in ms, in this example 10 seconds. An Exception is thrown if this timeout is exceeded. Set to -1 to wait indefinitely. -- parameter
Re: Auto-deploy not working in Tomcat 5.5.4 when .war file has a META-INF/context.xml?
Thanks, I appreciate you testing that. However, it simply doesn't work for me. I don't see how it could work for you and it doesn't work for me. I have a totally stock installation of Tomcat 5.5.4 and used the same exact file that I sent to you. I start Tomcat, copy the file, it gets deployed, update the war (originally, I was just recreating the file so that it had a new modified time, however, I tried adding an additional file to it and that didn't make a difference either), copy it again, and it doesn't do anything. If I do the same thing with the other file that doesn't have the context.xml, it works fine. Also, I just tried it on Solaris. I installed both .war files, they both deployed, touched the one without a context.xml, it redeployed, touched the one with a context.xml, nothing happened. If anyone else is willing to test it, I have the files at the following URLs. http://parakeet.uchicago.edu/test-with-context.war http://parakeet.uchicago.edu/test-without-context.war Thanks, Jon - Original Message - From: Remy Maucherat [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, November 11, 2004 1:17 PM Subject: Re: Auto-deploy not working in Tomcat 5.5.4 when .war file has a META-INF/context.xml? On Thu, 11 Nov 2004 11:09:58 -0600, Jonathan Eric Miller [EMAIL PROTECTED] wrote: I don't see it at least on the inital bug report page at http://nagoya.apache.org/bugzilla/enter_bug.cgi?product=Tomcat%205 Maybe I need to commit the page first and there's another page... I don't want to submit a report just yet, because I'm still in the process of trying to figure out how the new logging works and I want to make sure there isn't a error occurring that I'm not seeing because of this. I tried it with Tomcat 5.0.28 and found that it was throwing an exception in the console about the context path not being set. So, I added that path to my context.xml and it then worked with 5.0.28, but, still won't work with 5.5.4, but, like I said, I want to see if I can figure out how to use the new logging. My guess is that it's something similar and I'm just not seeing the error message. Don't use path or docBase (unless the webapp is not inside the host appBase) in your context.xml file with Tomcat 5.5. I tested it, and it works fine for me, so please don't open a bug report. - start Tomcat - put test-with-context.war in webapps - it gets autodeployed - use a zip tool to modify the war (I added an additional resource in it) - it gets redeployed (the expanded folder is deleted, and then recreated by expanding the war again) -- x Rémy Maucherat Developer Consultant JBoss Group (Europe) SàRL x - 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]
Re: Tomcat 5.5.4, Logging and the death of my friend localhost_log
My current theory is that if you don't have Log4J installed (commons-logging prefers Log4J over standard Java 1.4 logging) and you're using J2SE 1.5, the errors should go to the console and/or catalina.out by default because the default $JAVA_HOME/jre/lib/logging.properties file that comes with J2SE 1.5 logs INFO messages and above to the console. As far as I know that is the same thing as System.out and System.out is redirected to catalina.out on UNIX/Linux as far as I know. On Windows, it just goes to the console. So if my theory is correct, it should work OK right out of the box, but, I'm just starting to test Tomcat 5.5 now and I don't have a lot of experience with configuring logging in general, so, I could be wrong. BTW, does anyone know if there are any advantages to using Log4J over Java 1.4 logging? Currently, I'm thinking of just using standard logging since it's there by default and doesn't require me to install another package, plus that fact that it's more standard since it's part of Java proper. Jon - Original Message - From: Allistair Crossley [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, November 11, 2004 1:54 PM Subject: RE: Tomcat 5.5.4, Logging and the death of my friend localhost_log this is very true actually, i.e the old JSP stack trace errors and so on will not be directed into log4j-type logs .. that's not good at all i agree. And I know there is an exception occurring right now, but it's not being reported into the stdout. where is all the runtime exception stack tracing supposed to go Yoav? that won't be picked up by log4j which is a good point cheers! -Original Message- From: Jonathan Eric Miller [mailto:[EMAIL PROTECTED] Sent: Thu 11/11/2004 16:50 To: Tomcat Users List Cc: Subject: Re: Tomcat 5.5.4, Logging and the death of my friend localhost_log So, exceptions aren't logged by default? Does the new log4j method give you full stack traces, or, is it just one line error messages? If I don't configure log4j, does that mean that exceptions can be occurring and I won't know about it? IMHO, a decent default logging configuration should be provided by default. Not all of us are already experts in log4j... Jon - Original Message - From: Allistair Crossley [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, November 11, 2004 9:41 AM Subject: RE: Tomcat 5.5.4, Logging and the death of my friend localhost_log Hi again, I have tried to setup a file appender now without success. When I restart Tomcat it is clear that it does not wish to create the file I am specifying. I am wondering if Tomcat really is initialising the logging subsystem from placing log4j.properties in common/classes. I could be completely wrong and have missed something? log4j.rootLogger=debug, stdout, R log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n log4j.appender.R=org.apache.log4j.RollingFileAppender log4j.appender.R.File=d:/jakarta-tomcat-5.5.4/logs/catalina.log log4j.appender.R.MaxFileSize=100KB log4j.appender.R.MaxBackupIndex=1 log4j.appender.R.layout=org.apache.log4j.PatternLayout log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n log4j.logger.org.apache.catalina=DEBUG, R Cheers! A. -Original Message- From: Allistair Crossley Sent: 11 November 2004 15:35 To: Tomcat Users List Subject: RE: Tomcat 5.5.4, Logging and the death of my friend localhost_log Hey Yoav, tomcat/common/classes/log4j.properties as follows log4j.rootLogger=DEBUG, A1 log4j.appender.A1=org.apache.log4j.ConsoleAppender log4j.appender.A1.layout=org.apache.log4j.PatternLayout log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c - %m%n log4j.logger.org.apache.catalina=DEBUG This was pretty much just copied from the link on the Tomcat Logging FAQ except I changed the log level and also log4j.logger.org.apache to log4j.logger.org.apache.catalina I will try to add a file based appender... Allistair. -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: 11 November 2004 15:31 To: Tomcat Users List Subject: RE: Tomcat 5.5.4, Logging and the death of my friend localhost_log Hi, I have tried what I believed to be how to do this, e.g I placed a basic console appender log4j.properties file into tomcat/common/classes and popped log4j1.2.8 into the common/lib. No logging though. Where did you attach the console appender? To the root logger or on of your own packaged? Try creating an appender (probably a FileAppender) and associated it with the org.apache logger. If you want DEBUG-level logging, set its level DEBUG. Enjoy Halo 2 ;) Yoav This e-mail, including any attachments, is a confidential business communication, and may contain information
Auto-deploy not working in Tomcat 5.5.4 when .war file has a META-INF/context.xml?
I have an application which has a META-INF/context.xml file. I'm attempting to have the file auto-redeploy itself everytime I copy an updated the updated .war file to the webapps directory. This worked fine in Tomcat 5.0.25. In Tomcat 5.5.4, it will deploy itself the first time through, but, when I update the file, it doesn't auto-redeploy itself. However, I found that if I remove the context.xml file from the META-INF directory. i.e. deploy the .war file without a context.xml file, it reloads itself correctly. Has anyone else ran into this problem? I'm using the following in my context.xml file. Note, this application doesn't technically need the file, but, I have other applications that do, so, I need to get it working. ?xml version=1.0 encoding=UTF-8? Context reloadable=true/ Jon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
ISAPI redirector warnings
While running Tomcat 5 with IIS and JK2.. The Windows Application Logs often log several Warnings at the same point in time, see below for example. The problem is, these Warnings pile up in the Windows Event logs and force the Administrator to manually clear out the logs daily or weekly. What is the reason for these log entries? How can I reduce or eliminate these log entries? Error: [jk_worker_ajp13.c (648)]: ajp13.service() Error forwarding ajp13:localhost:8009 1 0 Error: [jk_worker_ajp13.c (546)]: ajp13.service() ajpGetReply recoverable error 3 Error: [jk_handler_response.c (140)]: handler.response() Error sending response Error: [jk_service_iis.c (126)]: jk_ws_service_t::head, ServerSupportFunction failed Error: [jk_worker_ajp13.c (546)]: ajp13.service() ajpGetReply recoverable error 3 Error: [jk_handler_response.c (140)]: handler.response() Error sending response Error: [jk_service_iis.c (126)]: jk_ws_service_t::head, ServerSupportFunction failed Configuration: Windows 2000 or Windows 2003 Server Apache Tomcat 5.0.25 or 5.0.28 Microsoft IIS 5 or 6 JK2 2.0.4 connector Workers2.properties [shm:] info=Shared memory file. Required for multiprocess servers file=d:\tomcat5.0.28\work\jk20.shm size=100 # Define the communication channel [channel.socket:localhost:8009] tomcatId=localhost:8009 [ajp13:localhost:8009] channel=channel.socket:localhost:8009 [uri:/Concept60/*] worker=ajp13:localhost:8009 Server.xml Connector port=8088 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false redirectPort=8443 acceptCount=100 debug=0 connectionTimeout=2 disableUploadTimeout=true / Connector port=8009 enableLookups=false connectionTimeout=0 redirectPort=8443 debug=0 protocol=AJP/1.3 / isapi_redirector2.reg [HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Jakarta Isapi Redirector\2.0] workersFile=d:\\tomcat5.0.28\\conf\\workers2.properties extensionUri=/jakarta2/isapi_redirector2.dll logLevel=debug serverRoot=d:\\tomcat5.0.28\\
RE: ISAPI redirector warnings
Do you know any more information about the 3 logLevels? I see an ERROR, DEBUG, and INFO. I currently set it to DEBUG, which is the default and is not necessary. I would guess that INFO would give you more warnings, and ERROR would give you less warnings. Does this make sense? Eric Sandusky 630.368.9950x233 [EMAIL PROTECTED] -Original Message- From: Allistair Crossley [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 09, 2004 9:50 AM To: Tomcat Users List Subject: RE: ISAPI redirector warnings you could reduce it by setting logLevel=info in the registry settings. You can also specify logging in the workers2.properties file with an info level. [logger.win32] level=INFO ADC -Original Message- From: Eric Sandusky [mailto:[EMAIL PROTECTED] Sent: 09 November 2004 15:38 To: [EMAIL PROTECTED] Cc: Eric Sandusky Subject: ISAPI redirector warnings While running Tomcat 5 with IIS and JK2.. The Windows Application Logs often log several Warnings at the same point in time, see below for example. The problem is, these Warnings pile up in the Windows Event logs and force the Administrator to manually clear out the logs daily or weekly. What is the reason for these log entries? How can I reduce or eliminate these log entries? Error: [jk_worker_ajp13.c (648)]: ajp13.service() Error forwarding ajp13:localhost:8009 1 0 Error: [jk_worker_ajp13.c (546)]: ajp13.service() ajpGetReply recoverable error 3 Error: [jk_handler_response.c (140)]: handler.response() Error sending response Error: [jk_service_iis.c (126)]: jk_ws_service_t::head, ServerSupportFunction failed Error: [jk_worker_ajp13.c (546)]: ajp13.service() ajpGetReply recoverable error 3 Error: [jk_handler_response.c (140)]: handler.response() Error sending response Error: [jk_service_iis.c (126)]: jk_ws_service_t::head, ServerSupportFunction failed Configuration: Windows 2000 or Windows 2003 Server Apache Tomcat 5.0.25 or 5.0.28 Microsoft IIS 5 or 6 JK2 2.0.4 connector Workers2.properties [shm:] info=Shared memory file. Required for multiprocess servers file=d:\tomcat5.0.28\work\jk20.shm size=100 # Define the communication channel [channel.socket:localhost:8009] tomcatId=localhost:8009 [ajp13:localhost:8009] channel=channel.socket:localhost:8009 [uri:/Concept60/*] worker=ajp13:localhost:8009 Server.xml Connector port=8088 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false redirectPort=8443 acceptCount=100 debug=0 connectionTimeout=2 disableUploadTimeout=true / Connector port=8009 enableLookups=false connectionTimeout=0 redirectPort=8443 debug=0 protocol=AJP/1.3 / isapi_redirector2.reg [HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Jakarta Isapi Redirector\2.0] workersFile=d:\\tomcat5.0.28\\conf\\workers2.properties extensionUri=/jakarta2/isapi_redirector2.dll logLevel=debug serverRoot=d:\\tomcat5.0.28\\ FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - 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]
RE: ISAPI redirector warnings
By setting the LogLevel to INFO, I get more entries in the Event log. By setting the logLevel to ERROR, I still get the following Warnings in the Application log. Each of the entries starts with the word Error so they must be errors, not warnings. Does anybody know what the root cause of these errors/warnings are? There is nothing in the way of documentation for the JK2 connector that talks about this in detail. I have gone through this site, http://jakarta.apache.org/tomcat/connectors-doc/jk2/index.html, and found absolutely nothing about these errors. They happen regularly as requests are made to the server, and are unacceptable to many of my customers. Error: [jk_worker_ajp13.c (648)]: ajp13.service() Error forwarding ajp13:localhost:8009 1 0 Error: [jk_worker_ajp13.c (546)]: ajp13.service() ajpGetReply recoverable error 3 Error: [jk_handler_response.c (140)]: handler.response() Error sending response Error: [jk_service_iis.c (126)]: jk_ws_service_t::head, ServerSupportFunction failed Error: [jk_worker_ajp13.c (546)]: ajp13.service() ajpGetReply recoverable error 3 Error: [jk_handler_response.c (140)]: handler.response() Error sending response Error: [jk_service_iis.c (126)]: jk_ws_service_t::head, ServerSupportFunction failed Eric Sandusky 630.368.9950x233 [EMAIL PROTECTED] -Original Message- From: Allistair Crossley [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 09, 2004 9:58 AM To: Tomcat Users List Subject: RE: ISAPI redirector warnings i don't know much about jk2 logging. I don't think it can use log4j or commons-logging as it's just a DLL. the theory is the same I imagine, i.e the amount of logging gets narrower info/warn/debug/error. Setting it at ERROR will mean only errors come out and remove all the other stuff. -Original Message- From: Eric Sandusky [mailto:[EMAIL PROTECTED] Sent: 09 November 2004 15:54 To: 'Tomcat Users List' Subject: RE: ISAPI redirector warnings Do you know any more information about the 3 logLevels? I see an ERROR, DEBUG, and INFO. I currently set it to DEBUG, which is the default and is not necessary. I would guess that INFO would give you more warnings, and ERROR would give you less warnings. Does this make sense? Eric Sandusky 630.368.9950x233 [EMAIL PROTECTED] -Original Message- From: Allistair Crossley [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 09, 2004 9:50 AM To: Tomcat Users List Subject: RE: ISAPI redirector warnings you could reduce it by setting logLevel=info in the registry settings. You can also specify logging in the workers2.properties file with an info level. [logger.win32] level=INFO ADC -Original Message- From: Eric Sandusky [mailto:[EMAIL PROTECTED] Sent: 09 November 2004 15:38 To: [EMAIL PROTECTED] Cc: Eric Sandusky Subject: ISAPI redirector warnings While running Tomcat 5 with IIS and JK2.. The Windows Application Logs often log several Warnings at the same point in time, see below for example. The problem is, these Warnings pile up in the Windows Event logs and force the Administrator to manually clear out the logs daily or weekly. What is the reason for these log entries? How can I reduce or eliminate these log entries? Error: [jk_worker_ajp13.c (648)]: ajp13.service() Error forwarding ajp13:localhost:8009 1 0 Error: [jk_worker_ajp13.c (546)]: ajp13.service() ajpGetReply recoverable error 3 Error: [jk_handler_response.c (140)]: handler.response() Error sending response Error: [jk_service_iis.c (126)]: jk_ws_service_t::head, ServerSupportFunction failed Error: [jk_worker_ajp13.c (546)]: ajp13.service() ajpGetReply recoverable error 3 Error: [jk_handler_response.c (140)]: handler.response() Error sending response Error: [jk_service_iis.c (126)]: jk_ws_service_t::head, ServerSupportFunction failed Configuration: Windows 2000 or Windows 2003 Server Apache Tomcat 5.0.25 or 5.0.28 Microsoft IIS 5 or 6 JK2 2.0.4 connector Workers2.properties [shm:] info=Shared memory file. Required for multiprocess servers file=d:\tomcat5.0.28\work\jk20.shm size=100 # Define the communication channel [channel.socket:localhost:8009] tomcatId=localhost:8009 [ajp13:localhost:8009] channel=channel.socket:localhost:8009 [uri:/Concept60/*] worker=ajp13:localhost:8009 Server.xml Connector port=8088 maxThreads=150 minSpareThreads=25 maxSpareThreads=75
Re: AW: connection pooling
Hi Mohammed, The resource-ref of your web.xml looks alright. While the DefaultContext should work if you place it in the correct location(see notes below) within your server.xml, I doubt you want this to be your final solution. My final fix was suggested by Steve and noted here... Copy the Context... (you need to change your DefaultContext tag to a Context tag) from your server.xml to a file all its own and name that file myapp.xml(in your case I guess that would be SteaDB.xml). Then mv that file to $CATALINA_HOME/conf/Catalina/localhost/ Restart your app or shutdown and startup Tomcat and you should be all set. Let me know how it goes. Eric Notes: - I'm not sure if DefaultContext or Context within your server.xml have any effect once you have a myapp.xml at $CATALINA_HOME/conf/Catalina/localhost/. I still have a Context in my server.xml. - I don't think it matters but fyi, my Context only includes a Resource, and then Resource-Params as follows: username, password, driverClass, and url. - When working with the DefaultContext, location for that tag should be within the Engine... tag having the Standalone attribute. This likely needs to be un-commented, hence you will need to comment out the Engine... tag with the Catlina attribute, which is likely just below in the server.xml. On Tue, 9 Nov 2004 14:25:41 +0100, Akacem Mohammed [EMAIL PROTECTED] wrote: Hello, I am stuck in the same Probleme as Erik. I did exactly what in the e-mails suggested is with no success. I am runing TC 5.0.28 und try to get a connection to an informix database. I got the following Error Message: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' mycode : try { initCtx = new InitialContext(); envCtx = (Context) initCtx.lookup(java:comp/env); ds = (DataSource) envCtx.lookup(jdbc/SteaDB); } catch (NamingException e) { // TODO Auto-generated catch block e.printStackTrace(); } try { conn=ds.getConnection(); } catch (SQLException e2) { // TODO Auto-generated catch block e2.printStackTrace(); } My Configuration is as follow: web.xml : resource-ref descriptionDB Connection to informix/description res-ref-namejdbc/SteaDB/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref server.xml : DefaultContext Resource name=jdbc/SteaDB auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/SteaDB parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter !-- Maximum time to wait for a dB connection to become available in ms, in this example 10 seconds. An Exception is thrown if this timeout is exceeded. Set to -1 to wait indefinitely. -- parameter namemaxWait/name value1/value /parameter !-- username and password for dB connections -- parameter nameusername/name valueunknown/value /parameter parameter namepassword/name valueunknown/value /parameter !-- Class name for the informix treiber -- parameter namedriverClassName/name valuecom.informix.jdbc.IfxDriver/value /parameter parameter nameurl/name value jdbc:informix-sqli://s0062033.vt.bb.de:300056/coadb:informixserver=coadbzentral /value /parameter parameter nameremoveAbandoned/name valuetrue/value /parameter parameter nameremoveAbandonedTimeout/name value300/value !-- in second -- /parameter parameter namelogAbandoned/name valuetrue/value /parameter /ResourceParams /DefaultContext thanks for any hint Mohammed -Ursprüngliche Nachricht- Von: Steve Kirk [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 9. November 2004 01:40 An: 'Eric Wulff'; 'Tomcat Users List' Betreff: RE: connection pooling Worth clarifyig what we are meaning by DBCP. The DBCP I was referring to was the specific implementation of connection pooling that is part of Jakarta Commons: http://jakarta.apache.org/commons/dbcp/ There are other pooling implementations which are alternatives to Commons DBCP. Some DB drivers included pooling support as-is. Others do not. For those that do not, you need to implement pooling by building code around the standard driver. You used to have to do this yourself, but now there is DBCP to take care of this for you. DBCP is a wrapper used around a non-pooling DB driver. So, hence my question, are you intending to use DBCP, or does your Informix driver include pooling? From the JNDI/JDBC
Re: session-timeout means tomcat restart
Hi Steve, sorry for lack of details. In any case, problem solved. I am developing a webapp in the MVC style and was referring to the 'C' of the MVC when mentioning the controller. I am using TC as-is however. There was a bug in a data source validity check upon login making it so the data source was not getting re-established if need be. Then it would just hang on login. Not sure why I was often required to hard boot but it's not longer a problem since I corrected the data source hook. Eric On Mon, 8 Nov 2004 22:19:27 -, Steve Kirk [EMAIL PROTECTED] wrote: Sorry for not replying sooner, I've been busy for a few days. Can you say more about the crashing? Any evidence from the logs? A bit difficult to be any more specific without more to go on really :) However, I have references to them from the controller so that shouldn't be the problem... eh? You mention controller. Are you using TC as-is, or are you using a framework such as struts or JSF by any chance? If you suspect that the problem is triggered by a closing session, why not try shortening the session timeout to a shorter length and see if it crashes quicker? In fact, it's worth checking whether the crash is around the time of the session expiry or not. If not, then your problem may not be directly caused by TC at all.? Do you have any event listeners? If you have one for sessionDestroyed/sessionWillPassivate, what does this code do? -Original Message- From: Eric Wulff [mailto:[EMAIL PROTECTED] Sent: Saturday 06 November 2004 00:51 To: Steve Kirk Cc: Tomcat Users List Subject: Re: session-timeout means tomcat restart Well, this is amazingly frustrating. My TC 5.0.28 running on Linux FC2 is completely crashing about every half hr when I have a webapp open and don't interact with it. I no longer have a time-out element in my web.xml so that doesn't seem to matter. TC shutdown and restart does not work. Instead, I'm required to hard boot my machine. I'm hung just trying to access the static welcome page of any app, although I do know that init() of the webapp I'm working on is being called. Eric On Fri, 5 Nov 2004 15:43:28 -0800, Eric Wulff [EMAIL PROTECTED] wrote: Linux FC2 TC 5.0.28 I'm not storing a db object within a session although I am storing objs within the session(of course - session.setAttribute). However, I have references to them from the controller so that shouldn't be the problem... eh? An interesting thing, I sometimes have to reboot my machine, not just restart TC. Although other apps run fine, I have to reboot my machine in order to get TC up again. I optimized my db connection, I did have it in servlet init(). Although I knew I had to do this and I'm much better off for it, and I appreciate you're noting it, but this didn't eliminate the crashing problem. I also am now taking advantage of a connection pool. However, as you figured, that does not solve the crash problem. Finally, I removed the session-configsession-timeout element from myapp web.xml to test if this is the initiator of the problem. Let you know what I find. Still, even if this is what initiates the sequence leading to a crash, it shouldn't so something need be fixed/optimized. Any other ideas? Eric On Fri, 5 Nov 2004 13:03:27 -, Steve Kirk [EMAIL PROTECTED] wrote: -Original Message- From: Eric Wulff [mailto:[EMAIL PROTECTED] Sent: Friday 05 November 2004 07:01 To: Tomcat Users List Subject: session-timeout means tomcat restart Hi, I'm experiencing 2 interesting problems that may be related to my session timeout. 1. It seems that when my session times out I need to restart tomcat, often just the application via reload in the manager, in order to gain access to my db again. Could this be because I've been accessing the db via jdbc hard coded in the servlet? Might using a datasource connection pool take care of this? I would say that rather than the problem being JDBC hardcoded in the servlet, the problem is more likely to be _how_ that code is written. if it really is the session timeout that is causing this, it sounds to me like you are storing the database objects within a session object (which seems a bit unusual). or at least the last reference to them is stored there, so that when the session is destroyed, the database connection is lost. it might be better to store the objects in local variables within doPost if your servlet is simple, or if it's more complex, then perhaps better places to put them would be the servlet context, or a field of the servlet class/instance. it all depends on your particular situation. whichever you choose though, you must
Re: connection pooling
Well, my informix driver does support connection pooling as-is so I do not need to use a Jakarta Commons DBCP wrapper in order to take advantage of database connection pooling. Thx for clarifying and for sharing your ResourceParams. I need to study this issue some more in general since I only have a surface understanding of what connection pooling really is and what it's advantages are. For now, my app is successfully utilizing connection pooling, as far as I can tell. My problem, which initiated this thread, has been solved by putting a myapp.xml with the necessary context in my $CATALINA_HOME/conf/Catalina/localhost/ directory. thx Eric On Tue, 9 Nov 2004 00:40:23 -, Steve Kirk [EMAIL PROTECTED] wrote: Worth clarifyig what we are meaning by DBCP. The DBCP I was referring to was the specific implementation of connection pooling that is part of Jakarta Commons: http://jakarta.apache.org/commons/dbcp/ There are other pooling implementations which are alternatives to Commons DBCP. Some DB drivers included pooling support as-is. Others do not. For those that do not, you need to implement pooling by building code around the standard driver. You used to have to do this yourself, but now there is DBCP to take care of this for you. DBCP is a wrapper used around a non-pooling DB driver. So, hence my question, are you intending to use DBCP, or does your Informix driver include pooling? From the JNDI/JDBC guides it appears that you have the choice of using DBCP or not (although there is one aspect of the docs that seem slightly unclear on that, which I am going start another thread to clear up). The configs are similar. Personally I have only got the DBCP approach to work, hence my suggestion of using that, for which you need to include the factory parameter. What this does is basically tells TC to call DBCP rather than your database driver when making a connection - DBCP then calls your DB driver if and when it needs to. I think I'm right in saying that if you don't explcitly use DBCP, and your DB driver does not support pooling, you will end up with non-pooled connections. The webapp will still work but you will not have the advantages of pooling. In case it helps, here are my ResourceParams. Note that I have both factory and driverClassName: ResourceParams name=jdbc/myDb parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namedriverClassName/name valuecom.mysql.jdbc.Driver/value /parameter parameter nameusername/name valueme/value /parameter parameter namepassword/name valuesecret/value /parameter parameter nameurl/name valuejdbc:mysql://localhost:3306/myDb/value /parameter /ResourceParams -Original Message- From: Eric Wulff [mailto:[EMAIL PROTECTED] Sent: Friday 05 November 2004 18:34 To: Steve Kirk Cc: Tomcat Users List Subject: Re: connection pooling Steve, I am trying to use DBCP(hence the subject of the thread) and I believe I have a driver that supports it. Especially considering that the connection works when I wrap my data resource in a DefaultContext tag inside a stand alone Engine tag(server.xml), instead of inside a Context tag(how all instructions I've followed so far suggest). This means my driver support DBCP, correct? The only source code I imagine would help is the code I use to gain connection... Context initialContext = new InitialContext(); Context context = (Context) initialContext.lookup(java:comp/env); DataSource dataSource = (DataSource) context.lookup(jdbc/wms); connection = dataSource.getConnection(); I have seen no mention of this factory class parameter you speak of. I'm using TC 5.0.28. I'll try it. thx much for your help Eric On Fri, 5 Nov 2004 13:30:35 -, Steve Kirk [EMAIL PROTECTED] wrote: Eric - you are correct, you do not need both resource-ref and Resource (although I've found that having both does not cause a problem). Back to your problem. The error message indicates that TC cannot find the Resource. I'm not sure if you are trying to use DBCP or not (in other words, does the informix driver support pooling on its own, or do you in fact need DBCP or some other implementation wrapped around it)? You have res-typejavax.sql.DataSource/res-type but do not list the factory class under your Resource, e.g. : parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter