Re: Postgresql jdbc driver for PG version 9.5

From: Poul Kristensen <bcc5226(at)gmail(dot)com>
To: laurenz(dot)albe(at)cybertec(dot)at
Cc: Jorge Solórzano <jorsol(at)gmail(dot)com>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Postgresql jdbc driver for PG version 9.5
Date: 2018-09-09 20:28:58
Message-ID: CAAOuvVonc+Gand74Yd9uxQBHOKy0=upyZCuGL=gPdykQNMVbSw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-jdbc

Hi and thank you for responding but I have to put a class as db.driver
value into String driver and
then loaded this way Class.forName(driver);
It works with the oracle driver.
I am using Postgresql JDBC Driver 42.2.25 and Driver.class eg:_
db.driver=Driver.class
but is rejected as not executable. It should be very simple. Does anyone
use the Driver.class?
TIA
Poul

Den fre. 7. sep. 2018 kl. 15.36 skrev Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at
>:

> Poul Kristensen wrote:
> > Thank you. Yes and it says:
> >
> > DB.DRIVER The fully qualified class name of the JDBC driver. For
> Java DB, this is org.apache.derby.jdbc.EmbeddedDriver. For MySQL, this is
> com.mysql.jdbc.Driver.
> >
> > How do I get org.postgresql.Driver to put in db.driver(e.g:
> db.driver=org.postgresql.Driver)? That is my problem!
>
> The documentation
> (https://jdbc.postgresql.org/documentation/head/load.html)
> has it:
>
> Prior to Java 1.6, the driver had to be loaded by the application -
> either by calling
>
> Class.forName("org.postgresql.Driver");
>
> or by passing the driver class name as a JVM parameter.
>
> java -Djdbc.drivers=org.postgresql.Driver example.ImageViewer
>
> These older methods of loading the driver are still supported but they
> are no longer necessary.
>
> Yours,
> Laurenz Albe
> --
> Cybertec | https://www.cybertec-postgresql.com
>
>

--
Med venlig hilsen / Best regards
Poul Kristensen
Linux-OS/Virtualizationexpert and Oracle DBA

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tim Cross 2018-09-09 22:02:19 Re: Schema's vs Single Database with prefix on tables
Previous Message Joao Ribeiro 2018-09-09 10:39:51 Schema's vs Single Database with prefix on tables

Browse pgsql-jdbc by date

  From Date Subject
Next Message Laurenz Albe 2018-09-10 07:39:51 Re: Postgresql jdbc driver for PG version 9.5
Previous Message Laurenz Albe 2018-09-07 13:36:26 Re: Postgresql jdbc driver for PG version 9.5