context classloader (was: Re: 8.0 drivers released.)

From: Vadim Nasardinov <vadimn(at)redhat(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: context classloader (was: Re: 8.0 drivers released.)
Date: 2005-01-18 22:34:45
Message-ID: 200501181734.45152@vadim.nasardinov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Tuesday 18 January 2005 17:17, Oliver Jowett wrote:
> 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.

Another reasonable course of action might be to try the context classloader:
http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Thread.html#getContextClassLoader%28%29

This would typically have the system classloader in its parent hierarchy,
but it may also give you access to locations that the system classloader
cannot see.

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Oliver Jowett 2005-01-18 23:07:48 Re: context classloader
Previous Message Oliver Jowett 2005-01-18 22:17:37 Re: 8.0 drivers released.