Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 6AD8063257B for ; Sat, 5 Jun 2010 11:45:08 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 73016-02 for ; Sat, 5 Jun 2010 14:44:59 +0000 (UTC) Received: from news.hub.org (news.hub.org [200.46.204.72]) by mail.postgresql.org (Postfix) with ESMTP id 54EDE6324C0 for ; Sat, 5 Jun 2010 11:45:01 -0300 (ADT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.14.4/8.14.4) with ESMTP id o55EirKl039118 for ; Sat, 5 Jun 2010 11:44:54 -0300 (ADT) (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.14.4/8.14.4/Submit) id o55DKnFU003933 for pgsql-jdbc@postgresql.org; Sat, 5 Jun 2010 10:20:49 -0300 (ADT) (envelope-from news) From: Lew X-Newsgroups: pgsql.interfaces.jdbc Subject: Re: jdbc works in java app, fails in servlet: "no suitable jdbc found" Date: Sat, 05 Jun 2010 09:20:55 -0400 Organization: albasani.net Lines: 44 Message-ID: References: <8CCD02714A2791E-E2C-7A83@webmail-m042.sysops.aol.com> <4C05F409.7060805@postnewspapers.com.au> <8CCD0CAC9B7220C-D8C-4F1C@webmail-d098.sysops.aol.com> <4C071135.3020607@postnewspapers.com.au> <8CCD1C0ABE41498-C10-62A5@webmail-d048.sysops.aol.com> <4C089FE4.5040006@hogranch.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@albasani.net X-User-ID: z7A37fsm+zqkQ4puUBHUp/mGnqrkaLoIhiJn1V1dXGo= In-Reply-To: <4C089FE4.5040006@hogranch.com> Cancel-Lock: sha1:J0YJhy5p4mMpbd2f4fhhJCuKDeY= User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100423 Thunderbird/3.0.4 X-NNTP-Posting-Host: XwcdXKyldrh9E8I+M0/nmxUME5Wiql687WBLMxyI8Yg= To: pgsql-jdbc@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.79 tagged_above=-10 required=5 tests=BAYES_50=0.8, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201006/43 X-Sequence-Number: 20613 philfrei@aol.com wrote: >> There is no .WAR file in this project. So I am unable to follow >> related advice. John R Pierce wrote: > why not ? a .war file is the standard method of deploying a tomcat app. My guess is that the OP didn't build the project, then. > its a renamed .zip file that contains the project jars, xml manifest, > related libraries, etc etc. to deploy the app (or an update) you simply > drop the .war into the deployment dir, and tomcat sees it and unzips it > into the /webapps/appname/ folder and off it goes philfrei@aol.com wrote: >> There is a .CLASSPATH file stored with the project. It's actually a ".classpath" file. This is an Eclipse-specific file and only instructs Eclipse how to set the classpath. It does not itself set the classpath. The classpath for a web app is entirely under the programmer's control and depends on putting the driver JAR in the WAR. The entry in the Eclipse metafiles directs Eclipse to do that for you. >> It has the following entry pertaining to the jdbc: >> > path="org.eclipse.datatools.connectivity.jdt.DRIVERLIBRARY/PostgreSQL JDBC Driver"/> I find it convenient to do as Manohar suggested, "simply putting the jar file in [the $]CATALINA_HOME/lib/ directory", because typically if one app needs to access a particular database then many if not all apps in that app server will need access to the same driver. It's only truly necessary if Tomcat itself needs that driver, e.g., to handle authentication. Otherwise it should suffice to put the JAR in the "WEB-INF/lib/" directory of the deployed app (i.e., the WAR file). philfrei, you do have a WAR file if you're deploying a web app. You must be looking in the wrong place. Into what directory does Eclipse put its built files? Also, did you read the Tomcat documentation? I posted a couple of relevant links upthread. -- Lew