Thread: PostgreSQL Jdbc installation problems

PostgreSQL Jdbc installation problems

From
"Ing. Francesco Russo - NoCable S.p.A."
Date:
Hi all,
i have some problems with PostgreSQL jdbc drivers. I have a PostgreSQL 7.3 on a server and i want to connect to it from another server that has Tomcat 5 with JDK 1.4.2
 
I have downloaded the jar file from jdbc.postgresql.org corresponding to my system features and i have copied it into a directory on my development machine (on this pc i use StrutsStudio to develop my web application). In StrutsStudio i have included in classpath this directory, but when i execute Class.Name("org.postgresql.Driver"), i got the exception "java.lang.ClassNotFoundException: org.postgresql.Driver".
 
Can someone of you help me to understand if i miss some steps?
Thank you
 
Francesco Russo

Re: PostgreSQL Jdbc installation problems

From
"J. Michael Crawford"
Date:

  I personally have had to include the .jar file (not just the directory) in my classpath statement before being able to use the jdbc driver.  You may have already tried this, but I figured I'd respond just in case.

        - Mike


At 11:04 AM 8/5/2004, Ing. Francesco Russo - NoCable S.p.A. wrote:
Hi all,
i have some problems with PostgreSQL jdbc drivers. I have a PostgreSQL 7.3 on a server and i want to connect to it from another server that has Tomcat 5 with JDK 1.4.2
 
I have downloaded the jar file from jdbc.postgresql.org corresponding to my system features and i have copied it into a directory on my development machine (on this pc i use StrutsStudio to develop my web application). In StrutsStudio i have included in classpath this directory, but when i execute Class.Name("org.postgresql.Driver"), i got the exception "java.lang.ClassNotFoundException: org.postgresql.Driver".
 
Can someone of you help me to understand if i miss some steps?
Thank you
 
Francesco Russo

Re: PostgreSQL Jdbc installation problems

From
Kris Jurka
Date:

On Thu, 5 Aug 2004, Ing. Francesco Russo - NoCable S.p.A. wrote:

> I have downloaded the jar file from jdbc.postgresql.org corresponding to
> my system features and i have copied it into a directory on my
> development machine (on this pc i use StrutsStudio to develop my web
> application). In StrutsStudio i have included in classpath this
> directory, but when i execute Class.Name("org.postgresql.Driver"), i got
> the exception "java.lang.ClassNotFoundException: org.postgresql.Driver".
>

I'm not familiar with StrutsStudio, but it may be that you need to make
the jdbc driver jar file available to both StrutsStudio for development
and to Tomcat for deployment/execution.  For Tomcat the driver jar file
should be placed in $CATALINE_HOME/common/lib.

Kris Jurka