Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 72075BBDD4A for ; Fri, 18 Nov 2011 07:39:13 -0400 (AST) Received: from host3.dynacom.ondsl.gr ([62.103.35.211] helo=smadev.internal.net) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RRMmj-00030K-5u for pgsql-jdbc@postgresql.org; Fri, 18 Nov 2011 11:39:13 +0000 Received: from smadev.internal.net (localhost.internal.net [127.0.0.1]) by smadev.internal.net (8.14.2/8.14.2) with ESMTP id pAIBcrKJ010335; Fri, 18 Nov 2011 13:38:53 +0200 (EET) (envelope-from achill@matrix.gatewaynet.com) Received: from localhost (localhost [[UNIX: localhost]]) by smadev.internal.net (8.14.2/8.14.2/Submit) id pAIBcqHZ010334; Fri, 18 Nov 2011 13:38:52 +0200 (EET) (envelope-from achill@matrix.gatewaynet.com) From: Achilleas Mantzios Organization: Dynacom Tankers Mgmt To: Samuel Gendler Subject: Re: Tomcat7 connection pool with postgresql Date: Fri, 18 Nov 2011 14:38:52 +0300 User-Agent: KMail/1.9.7 Cc: pgsql-jdbc@postgresql.org, users@tomcat.apache.org References: <201111181109.28089.achill@matrix.gatewaynet.com> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <201111181338.52863.achill@matrix.gatewaynet.com> X-Archive-Number: 201111/51 X-Sequence-Number: 22386 =CE=A3=CF=84=CE=B9=CF=82 Friday 18 November 2011 13:13:18 =CE=BF/=CE=B7 Sam= uel Gendler =CE=AD=CE=B3=CF=81=CE=B1=CF=88=CE=B5: > On Fri, Nov 18, 2011 at 1:09 AM, Achilleas Mantzios < > achill@matrix.gatewaynet.com> wrote: > > > > > > root cause > > java.sql.SQLException: No suitable driver > > java.sql.DriverManager.getDriver(DriverManager.java:279) > > > > org.apache.tomcat.dbcp.dbcp.BasicDataSource.createConnectionFactory(Ba= sicDataSource.java:1437) > > > > org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicData= Source.java:1371) > > > > org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSou= rce.java:1044) > > org.apache.jsp.index_jsp._jspService(index_jsp.java:102) > > > > > I think if you have tomcat instantiate the data source and db driver, the > jar file with the driver must be available to tomcat's class loader. Odds > are good that you have the driver packaged up with your webapp, which mea= ns > it is only available to the webapp's class loader. Move it to wherever Thanx, but i actually had gone this step and had placed in dist $CATALINA_H= OME/lib already. Nothing explicit in the webapp about the driver. I am starting to suspect that this has to do with declaring the resource as= global under GlobalNamingResources and forgetting to do the proper linkage xml in context. But i think it shou= ld be placed inside context, in the first place and scrapping the GlobalNamingResources altoget= her. > tomcat loads external jar files from (or add it to a classpath environment > variable that gets read by the tomcat startup script). A quickie place to > drop it to see if I'm correct is $CATALINA_HOME/lib but I don't think it = is > recommend that you put it there permanently, since it will be mixed with > the jars that ship as part of tomcat in there. >=20 =2D-=20 Achilleas Mantzios