X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 07F2B3A298E for ; Tue, 18 Jan 2005 22:34:21 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 80159-04 for ; Tue, 18 Jan 2005 22:34:15 +0000 (GMT) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by svr1.postgresql.org (Postfix) with ESMTP id B1CEF3A25B9 for ; Tue, 18 Jan 2005 22:34:14 +0000 (GMT) Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id j0IMYELo030943 for ; Tue, 18 Jan 2005 17:34:14 -0500 Received: from mail.boston.redhat.com (mail.boston.redhat.com [172.16.76.12]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id j0IMYEO01882 for ; Tue, 18 Jan 2005 17:34:14 -0500 Received: from localhost.localdomain (sebastian-int.corp.redhat.com [172.16.52.221]) by mail.boston.redhat.com (8.12.8/8.12.8) with ESMTP id j0IMYDp5028981 for ; Tue, 18 Jan 2005 17:34:14 -0500 From: Vadim Nasardinov Organization: Red Hat / Westford To: pgsql-jdbc@postgresql.org Subject: context classloader (was: Re: 8.0 drivers released.) Date: Tue, 18 Jan 2005 17:34:45 -0500 User-Agent: KMail/1.7 References: <41ECF9FB.7040300@opencloud.com> <41ED8B01.1010209@opencloud.com> In-Reply-To: <41ED8B01.1010209@opencloud.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200501181734.45152@vadim.nasardinov> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.05 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200501/187 X-Sequence-Number: 12067 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.