pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oliver Jowett <oliver@opencloud.com>
To: Oliver Jowett <oliver@opencloud.com>
Cc: Andreas Joseph Krogh <andreak@officenet.no>
Cc: Kris Jurka <books@ejurka.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: 8.0 drivers released.
Date: Wed, 19 Jan 2005 11:17:37 +1300
Message-ID: <41ED8B01.1010209@opencloud.com> (raw)
In-Reply-To: <41ECF9FB.7040300@opencloud.com>
References: <Pine.BSO.4.56.0501170706010.29112@leary.csoft.net>
	<200501181151.27951.andreak@officenet.no>
	<41ECF9FB.7040300@opencloud.com>

Oliver Jowett wrote:
> Andreas Joseph Krogh wrote:
> 
>> NullPointerException:
>> Caused by: java.lang.NullPointerException
>>         at org.postgresql.Driver.getDefaultProperties(Driver.java:84)
>>         at org.postgresql.Driver.connect(Driver.java:167)
>>         at org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:599)
> 
> Driver.java:84 is:
> 
> Enumeration urlEnum = 
> getClass().getClassLoader().getResources("org/postgresql/driverconfig.properties"); 
> 
> I guess that org.postgresql.Driver is being loaded by the bootstrap 
> classloader (getClassLoader() returns null). How exactly are you getting 
> the driver jar into the classpath?

I can reproduce the exception by running test code when the driver is 
loaded from the bootstrap classpath 
('-Xbootclasspath/a:jars/postgresql.jar')

It seems reasonable to fall back to the system classloader if the driver 
was loaded from the bootstrap classloader. I will commit a change to do 
this shortly.

-O



view thread (6+ messages)

Message-ID: <41ED8B01.1010209@opencloud.com>
Permalink:  ../41ED8B01.1010209@opencloud.com/
Also on:    postgresql.org/message-id/41ED8B01.1010209@opencloud.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: oliver@opencloud.com, andreak@officenet.no, books@ejurka.com
  Subject: Re: 8.0 drivers released.
  In-Reply-To: <41ED8B01.1010209@opencloud.com>
  References: <Pine.BSO.4.56.0501170706010.29112@leary.csoft.net> <200501181151.27951.andreak@officenet.no> <41ECF9FB.7040300@opencloud.com> <41ED8B01.1010209@opencloud.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox