Re: error while running a webapp
On 10/6/06, David Smith [EMAIL PROTECTED] wrote: A word of caution -- autoReconnect=true is more a hack than a solution. Recent experience of users in another list I'm on suggest it's really hit or miss whether it actually recovers a stale connection or not. I don't recall ever having a problem with it (what list was that on, BTW?) but now revisiting the Connector/J doc http://dev.mysql.com/doc/refman/5.1/en/connector-j-reference-configuration-properties.html I notice use of autoReconnect is not recommended and there's also a autoReconnectForPools -- any experience with that? It's best in a design pattern to implement a connection pool,,, Of course. As far as the OP's problem is concerned, some additional information like relevant log and code excerpts would be most helpful. Uh, did you look at the log excerpt in the referenced PDF? :-) -- Hassan Schroeder [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: error while running a webapp
Hassan Schroeder wrote: On 10/6/06, David Smith [EMAIL PROTECTED] wrote: A word of caution -- autoReconnect=true is more a hack than a solution. Recent experience of users in another list I'm on suggest it's really hit or miss whether it actually recovers a stale connection or not. I don't recall ever having a problem with it (what list was that on, BTW?) but now revisiting the Connector/J doc http://dev.mysql.com/doc/refman/5.1/en/connector-j-reference-configuration-properties.html I notice use of autoReconnect is not recommended and there's also a autoReconnectForPools -- any experience with that? Magnolia-user. The CMS uses Apache Jackrabbit which in turn has a Persistence Manager that keeps its connection for the life of the webapp. An alright design for a desktop app, bad for webapps . A couple of us have had to write our own fixes. It's best in a design pattern to implement a connection pool,,, Of course. As far as the OP's problem is concerned, some additional information like relevant log and code excerpts would be most helpful. Uh, did you look at the log excerpt in the referenced PDF? :-) Didn't see a PDF. Will have to book again. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: error while running a webapp
Thanks for your hint. The PDF can be reached at: http://www.tv-wetzlar-badminton.de/errorMessageTomcat.pdf the code from the Method conOK: public boolean conOK(int pointer) { PreparedStatement pstmt = null; try { pstmt = con[pointer].prepareStatement(SELECT * FROM kostensaetze); pstmt.executeQuery(); } catch (Exception e) { return false; } finally { try { if (pstmt != null) pstmt.close(); } catch (Exception e) {} } return true; } This method should test if the connection is still ok. I hope someone can help me. tia, Oli PS: I think the DB close the connection while the tomcat is running and I don't know (at my Connection-Pool) how to know when that happened. Because isClosed() don’t care about that problem. :-( -Ursprüngliche Nachricht- Von: Propes, Barry L [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 4. Oktober 2006 23:27 An: Tomcat Users List; [EMAIL PROTECTED] Betreff: RE: error while running a webapp pdf didn't come through. -Original Message- From: Oliver Wagner [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 04, 2006 4:21 PM To: users@tomcat.apache.org Subject: error while running a webapp Hello, I wrote a web application (JSPs, Beans, JDBC and MYSQL) and use the tomcat container. But if the container runs a while the strange error occurs. I don't know how to solve this problem. While the problem occurs the other web applications are still running without a problem. After a restart of the tomcat-Container the problem is gone and the web application (with the problem before) works again - but some hours later the error comes again. I attached the message as a pdf-File and hope someone can help me to solve the problem, because I don't have any ideas anymore. Tia and greets Oli - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: error while running a webapp
On 10/5/06, Oliver Wagner [EMAIL PROTECTED] wrote: I think the DB close the connection while the tomcat is running and I don't know (at my Connection-Pool) how to know when that happened. set autoReconnect=true in your driver config, or catch the exception when the timeout occurs and retry connecting to see if it's a simple timeout/transient failure or something more persistent. HTH! -- Hassan Schroeder [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
error while running a webapp
Hello, I wrote a web application (JSPs, Beans, JDBC and MYSQL) and use the tomcat container. But if the container runs a while the strange error occurs. I don't know how to solve this problem. While the problem occurs the other web applications are still running without a problem. After a restart of the tomcat-Container the problem is gone and the web application (with the problem before) works again - but some hours later the error comes again. I attached the message as a pdf-File and hope someone can help me to solve the problem, because I don't have any ideas anymore. Tia and greets Oli - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]