Thread: rpm jdbc installation

rpm jdbc installation

From
Evelio Martinez
Date:
Hello!

Assuming I have postgresql-jdbc-7.0.3-2 installed from an RPM on Red Hat
6.2

Do I have to follow the steps in
http://jdbc.postgresql.org/docs/#install and start from sources ?

Thanks in advance.
--
Evelio Martínez


Re: rpm jdbc installation

From
"Seema Noor"
Date:
no u don't need to follow those steps.
but u still hav to set the classpath for the jdbc driver in this rpm.

----- Original Message -----
From: Evelio Martinez <evelio.martinez@testanet.com>
To: <pgsql-jdbc@postgresql.org>
Sent: Friday, May 04, 2001 1:13 PM
Subject: [JDBC] rpm jdbc installation


>
> Hello!
>
> Assuming I have postgresql-jdbc-7.0.3-2 installed from an RPM on Red Hat
> 6.2
>
> Do I have to follow the steps in
> http://jdbc.postgresql.org/docs/#install and start from sources ?
>
> Thanks in advance.
> --
> Evelio Martínez
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster


Re: rpm jdbc installation

From
Evelio Martinez
Date:
Seema Noor escribió:

> no u don't need to follow those steps.

ok, that make sense

>
> but u still hav to set the classpath for the jdbc driver in this rpm.

but the CLASSPATH is already set
(/usr/java/jdk1.3/jre/lib/rt.jar:/usr/java/jdk1.3/lib:/usr/lib/pgsql:. )

This is what I have in /usr/lib/pgsql

jdbc6.5-1.1.jar
jdbc6.5-1.2.jar
jdbc7.0-1.1.jar
jdbc7.0-1.2.jar

java.lang.ClassNotFoundException: org.postgresql.Driver
in line
Class.forName("org.postgresql.Driver");

Any suggestion

Thanks in advance
--
Evelio Martínez


Re: rpm jdbc installation

From
Christoph Jaeger
Date:
Evelio Martinez [evelio.martinez@testanet.com] wrote:
> Seema Noor escribió:
>
> > no u don't need to follow those steps.
>
> ok, that make sense
>
> >
> > but u still hav to set the classpath for the jdbc driver in this rpm.
>
> but the CLASSPATH is already set
> (/usr/java/jdk1.3/jre/lib/rt.jar:/usr/java/jdk1.3/lib:/usr/lib/pgsql:. )
>
> This is what I have in /usr/lib/pgsql
>
> jdbc6.5-1.1.jar
> jdbc6.5-1.2.jar
> jdbc7.0-1.1.jar
> jdbc7.0-1.2.jar

So you have to set your classpath to
.../usr/lib/pgsql/jdbc7.0-1.2.jar:....
                 ^^^^^^^^^^^^^^^^
(depending on which version of jdbc-driver you wish to use).

Christoph
--
eulox.net, Wien
software-engineer
christoph.jaeger@eulox.net

Attachment

Re: rpm jdbc installation

From
Antonio Fiol Bonnín
Date:
> but the CLASSPATH is already set
> (/usr/java/jdk1.3/jre/lib/rt.jar:/usr/java/jdk1.3/lib:/usr/lib/pgsql:. )
>
> This is what I have in /usr/lib/pgsql
>
> jdbc6.5-1.1.jar
> jdbc6.5-1.2.jar
> jdbc7.0-1.1.jar
> jdbc7.0-1.2.jar
>

export
CLASSPATH=/usr/java/jdk1.3/jre/lib/rt.jar:/usr/java/jdk1.3/lib:/usr/lib/pgsql/one_of_the_above_files:.

To choose the right file, left number is JDBC driver version (?), right
number is Java version.

Antonio Fiol


Re: rpm jdbc installation

From
Evelio Martinez
Date:
Christoph Jaeger escribió:
Evelio Martinez [evelio.martinez@testanet.com] wrote:
> Seema Noor escribió:
>
> > no u don't need to follow those steps.
>
> ok, that make sense
>
> >
> > but u still hav to set the classpath for the jdbc driver in this rpm.
>
> but the CLASSPATH is already set
> (/usr/java/jdk1.3/jre/lib/rt.jar:/usr/java/jdk1.3/lib:/usr/lib/pgsql:. )
>
> This is what I have in /usr/lib/pgsql
>
> jdbc6.5-1.1.jar
> jdbc6.5-1.2.jar
> jdbc7.0-1.1.jar
> jdbc7.0-1.2.jar

So you have to set your classpath to
.../usr/lib/pgsql/jdbc7.0-1.2.jar:....
                 ^^^^^^^^^^^^^^^^


Thanks, now it works

 
(depending on which version of jdbc-driver you wish to use).

Christoph
--
eulox.net, Wien
software-engineer
christoph.jaeger@eulox.net

  ------------------------------------------------------------------------
   Part 1.2Type: application/pgp-signature

  ------------------------------------------------------------------------

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org

-- 
Evelio Martínez