RE: DBCP connection leak after undeploy

2005-10-31 Thread Steve Kirk
catch (Exception e) > { > yourLog.error("Failed to close DBCP DataSource.", e); > } > > The above code would actually not work because JNDI is destroyed by > the time contextDestroyed() is called (see > http://issues.apache.org/bugzilla/show_bug.cgi?id

RE: Tomcat logging - Persistence of Logs

2005-10-31 Thread Steve Kirk
just wondering if the default log - stdout.log in Windows, > catalina.out in linux - could be made to behave the same way > on the two > platforms. But it looks as if this is an OS-specific difference, as I > can't see any difference in the configuration files between the two &

RE:

2005-10-31 Thread Steve Kirk
windows or linux? if on windows and runing as a service, have you run the "service install" command after copying across the contents of the TC root directory? also check: have you set the env variables JAVA_HOME and CATALINA_HOME? are file permissions on the jar file OK? > -Original Message

RE: Tomcat logging - Persistence of Logs

2005-10-31 Thread Steve Kirk
The under 5.0.x uses -MM-DD format in the filename, so this would change each day, would that give you what you need? See "FileLogger" under "Standard Implementation" at: http://tomcat.apache.org/tomcat-5.0-doc/config/logger.html PS note that is deprecated in 5.5.x > -Original Message-

RE: Tomcat not starting

2005-10-31 Thread Steve Kirk
from your stacktrace it appears that this error occurs when XML is being parsed, because TC can't find a class: java.lang.NoClassDefFoundError: org/apache/naming/TransactionRef in my installation (5.5.9) this class is in %catalina_home%\common\lib\naming-factory.jar so might be worth checking tha

RE: DBCP connection leak after undeploy

2005-10-28 Thread Steve Kirk
Yes, confirmed, I get the same problem. (I used the undeploy command from within the NetBeans runtime window, and also checked using the undeploy link in the browser from /manager/html/). Conns are cleaned up OK if you start/stop TC, but not if you undeploy the app with TC still running, as you sa

RE: Tomcat is dying unpredictably

2005-10-28 Thread Steve Kirk
he.coyote.http11.Http11Processor.process(Http11Process > or.java:833) > at > org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandle > r.processConnection(Http11Protocol.java:732) > at > org.apache.tomcat.util.net.TcpWorkerThread.run

RE: Asking Again: What's the "xmlValidation" Attribute for?

2005-10-28 Thread Steve Kirk
Bob, I replied to your original post - if you did not get that, check the archive here http://mail-archives.apache.org/mod_mbox/tomcat-users/200510.mbox/%3c00fc01c [EMAIL PROTECTED] Re what xml the host tag is referring to, I assume that the xml settings in host relate to loading all the config

RE: Tomcat Startup

2005-10-28 Thread Steve Kirk
This... > Can't load server.xml ...suggests that you need to check your %Catalina_Home%\conf\server.xml file check its permissions as well, against the user that TC is running as > -Original Message- > From: feilong [mailto:[EMAIL PROTECTED] > Sent: Friday 28 October 2005 10:51 > To: use

RE: static server implementation?

2005-10-27 Thread Steve Kirk
Have you considered that you can remove much of the dynamic config from conf\web.xml so that there is no default servlet or other dynamic behaviour in any webapp unless you explictly configure it so in the webapp's own web.xml? In fact this is what I prefer to do myself (except on dev box because

RE: DBCP connection leak after undeploy

2005-10-27 Thread Steve Kirk
t, right? > > On 10/26/05, Bogdan Calmac <[EMAIL PROTECTED]> wrote: > > When tomcat is stopped the connection is closed. I'll > probably submit > > the example to bugzilla. Can somebody familiar with the code suggest > > which catalina object keeps a reference

RE: Error: Cannot get a connection, pool exhausted

2005-10-27 Thread Steve Kirk
mcat Users List > Subject: Re: Error: Cannot get a connection, pool exhausted > > > And try to use > > removeAbandoned="true" logAbandoned="true" > removeAbandonedTimeout="120" > > to track which connections were not properly closed (see

RE: org.apache.jasper.JasperException: setAttribute: Non-serializable attribute

2005-10-27 Thread Steve Kirk
Not sure, but this could be it: TC saves Session objects to files when the webapp is started/stopped. (This is a configurable feature in context.xml). To do this, any attribute that you add to a Session object must be serializable. Therefore I would guess that if you call Session#setAttribute()

RE: How to share resources across two applications

2005-10-27 Thread Steve Kirk
Why not just include tags in your w1 webapp's pages whose href attributes point direct to URIs that begin "/w2app/" and vice-versa? I don't think you need to use dispatchers. The docs for ServletContext#getContext (your line 1) say: "...The given path must be begin with "/", is interpreted rela

RE: Tracking

2005-10-27 Thread Steve Kirk
Charles, see also my reply to Nanda Kumar's thread "Cannot get a connection, pool exhausted" for a coding example. HTH :) > -Original Message----- > From: Steve Kirk [mailto:[EMAIL PROTECTED] > Sent: Wednesday 26 October 2005 14:01 > To: 'Tomcat Use

RE: Repeated logging problem on 5.5

2005-10-27 Thread Steve Kirk
This is a repost of a message I first posted in June that I got no replies to. I have a double-logging problem, by which I mean that some of my log messages get logged to two logfiles. I have only one logfile configured using java.util.logging, but in some cases, the same log message gets logg

RE: Tomcat is dying unpredictably

2005-10-26 Thread Steve Kirk
A long shot, but if you are running RHL9 you might try this, as mentioned in the TC 5.5 release notes at http://tomcat.apache.org/tomcat-5.5-doc/RELEASE-NOTES.txt : Tomcat on Linux: GLIBC 2.2 / Linux 2.4 users should define an environment variable: export LD_ASSU

RE: Error: Cannot get a connection, pool exhausted

2005-10-26 Thread Steve Kirk
lose(); > if (conn != null) > conn.close(); > } > catch(SQLException se) > { > /** Ignore */ > } > } > > throw new DAOException("getYears(): Fai

RE: Should a missing jsp:include target cause TC to throw an exception or HTTP error code?

2005-10-26 Thread Steve Kirk
like this where TC ignores the include altogether, wondering why no error reported by TC. > -Original Message----- > From: Steve Kirk [mailto:[EMAIL PROTECTED] > Sent: Friday 21 October 2005 18:57 > To: 'users@tomcat.apache.org' > Subject: Should a missing jsp:include

RE: ? xmlValidation Attribute -- What's it Mean ?

2005-10-26 Thread Steve Kirk
I believe (although am not 100% sure because I haven't tried it myself) that xmlValidation="true" means that TC's XML parser should check all XML against the DTD defined in each XML source. With xmlValidation="false", it will check that the xml is "well-formed" but not that it is "valid". See th

RE: getPageContext returns null

2005-10-26 Thread Steve Kirk
not sure about use of PageContext, never used it. ... or about the "correct" way to pass info from servlet to jsp (if there even is one), but if it helps, I use this approach and it works well: // in the servlet's doPost() request.setAttribute(MyConstants.MY_OBJECT_CONSTANT_NAME, myObject); requ

RE: Error: Cannot get a connection, pool exhausted

2005-10-26 Thread Steve Kirk
how many concurrent requests are you handling? you have configured > maxActive > 100 so as soon as 100 concurrent conns are reached, you will exhaust the pool. If you do not have as many as 100 concurrent conns, then it is likely that your servlet calls are not returning conns t

RE: DBCP connection leak after undeploy

2005-10-26 Thread Steve Kirk
Your code and config below look fine to me, conns seem to be returned OK to pool as you say. Sounds to me like the pool itself leaves the database with hanging conns in the pool when it goes down. When you say "If I deploy/undeploy several times" do you stop and restart TC between undeploy and r

RE: How to create a website in apache-tomcat-5.5.12

2005-10-26 Thread Steve Kirk
Two things: 1. you need to deploy your webapp as the ROOT webapp on the server. there is a standard ROOT webapp that ships with TC, you can just replace that if you want to, examine that to see how to configure it, look especially at the %catalina_home%/webapps/ROOT/WEB-INF/web.xml config file.

RE: Tracking

2005-10-26 Thread Steve Kirk
Charles, I don't know of a way to have TC clear up conns for you, but you really should clear up connections explicitly. To some extent DBCP will clear up "abandoned" connections (to which you had a variable reference, which goes out of scope when you have finished processing the request), but th

RE: Remote deployments in Tomcat 5.5.9

2005-10-26 Thread Steve Kirk
I am using TC 5.5.9 on WinXP Pro here, but AFAIK the config is the same on Solaris. Your remote server needs to have the manager webapp installed and enabled. It is installed in TC as standard (at least it is in 5.5.9, which I am using). However it ships disabled for security reasons so before t

RE: problem in getting database connection from remote machine using JNDI

2005-10-26 Thread Steve Kirk
at the risk af asking the obvious, does the database "myDB" exist on the remote server at the same port number, and with the same username and pw as on the local server, and if so, does it have any IP address filters that forbid remote mysql client connections? > -Original Message- > From:

RE: HTTP 500 Error.

2005-10-26 Thread Steve Kirk
the key lines to look at more closely at these: java.lang.ClassCastException org.apache.jsp.errorpage_jsp._jspService(errorpage_jsp.java:103) ... org.apache.jsp.preview_jsp._jspService(preview_jsp.java:135) (esp the latter), and: "note The full stack trace of the root cause is av

Should a missing jsp:include target cause TC to throw an exception or HTTP error code?

2005-10-21 Thread Steve Kirk
TC 5.5.9 WinXP SP2 JDK 1.5.0_02-b09 My webapp framework is based around my own Invoker servlet, which response to every request via a generic JSP build page. This build page itself includes other files, as shown in this snippet: " /> " /> Each request to the webapp is