Has anyone come across this problem with JDBC? - Mailing list pgsql-hackers

From Peter T Mount
Subject Has anyone come across this problem with JDBC?
Date
Msg-id 957523e787d231912eab7ac50e51f1f8
Whole thread Raw
List pgsql-hackers
This was reported on the jdbc email list. As I've not come across this
problem before, I'm wondering if anyone else here who's used the JDBC
driver has come across this.

This problem is for all JDBC drivers, not just ours.

Also, this is another problem thats occurd with RedHat 5.0.

On Mon, 29 Dec 1997, Billy Kantartzis <megatron@ote.org> wrote:

> We are using an postgress 6.2.1 in a RH5.0 Linux box  we encountered a
> problem loading the appropriate driver for postgress 6.2.1 . reaching
> sun's web site we found the following hint in order to solve the problem
> .
> We would like to know if there is an example available on the proposed
> solution or, if there is another way to deal with the problem (an
> example would be most helpful)
> appreciate the help in advanced .

[PM: I've reformatted the following]

> ======
> sun's solution
> ---------------
>           Why doesn't calling class.forName() load my JDBC driver?
>
>           There is a bug in the JDK 1.1.x that can cause Class.forName()
>           to fail. A work around is to explicitly call:
>
> DriverManager.registerDriver(new YourDriverClass()).
>
>           The exact problem in the JDK is a race condition in the class
>           loader that prevents the static section of code in the driver
>           class from executing and registering the driver with the
>           driver manager.

- --
Peter T Mount  petermount@earthling.net or pmount@maidast.demon.co.uk
Main Homepage: http://www.demon.co.uk/finder
Work Homepage: http://www.maidstone.gov.uk Work EMail: peter@maidstone.gov.uk

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

pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [COMMITTERS] 'pgsql/src/backend/parser gram.y parse_oper.c'
Next
From: Mattias Kregert
Date:
Subject: Error messages/logging (Was: Re: [HACKERS] Re: [COMMITTERS] 'pgsql/src/backend/parser gram.y parse_oper.c')