jdbc in tomcat problem

2007-10-18 Thread Jean-Pierre Astier
Hi all, I've got a problem with jdbc 5.1.5 in tomcat 5.5.17. I have a servlet who retrieve images from mysql 4.1.22 to put them in a jsp page. Here is the tomcat log :

Re: jdbc in tomcat problem

2007-10-18 Thread Filip Hanik - Dev Lists
yes, either MySQL or something else on the network closed the connection Caused by: java.net.SocketException: Socket closed if you are using the connection pool, make sure you have set testOnBorrow=true validationQuery=SELECT 1 so that it validates each connection for you Filip Jean-Pierre

Re: jdbc in tomcat problem

2007-10-18 Thread Filip Hanik - Dev Lists
I just saw that you are not using Tomcat's connection pool, the reason still stands, the socket connection is closed when you try to execute the query. if you are using a cached connection, then implement a fail safe or use Tomcat's connection pool, that already has this functionality Filip