Re: [PATCHES] IPv6 patch doesn't work fine - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: [PATCHES] IPv6 patch doesn't work fine
Date
Msg-id Pine.LNX.4.33.0306260752470.18129-100000@leary.csoft.net
Whole thread Raw
Responses Re: [PATCHES] IPv6 patch doesn't work fine  (Kurt Roeckx <Q@ping.be>)
List pgsql-jdbc

On Thu, 26 Jun 2003, Manuel Gil [iso-8859-1] P�rez wrote:

> Hi all.
>
> I have a Java application that it connects to the PostgreSQL database with
> IPv6 patch installed.
>
>     Something unusual has occured to cause the driver to fail.
>     Please report this exception: java.lang.NullPointerException
>        at org.postgresql.Driver.connect(Driver.java:125)
>        at java.sql.DriverManager.getConnection(DriverManager.java:512)
>        at java.sql.DriverManager.getConnection(DriverManager.java:171)
>        at piscis.pki.ca.database.DBManager.connect(DBManager.java:78)
>
> In my class DBManager I have the following connection method:
>
>     class.ForName("org.postgresql.Driver");
>     Connection connect = DriverManager.getConnection(<dir. IPv6>,<user
> name>,<password>);
>

What exactly do you have for the URL in the first argument to
getConnection?  If you have a direct IPv6 address like
jdbc:postgresql://::1 it will not work at the moment because it tries to
parse the url using the colon as a delimiter which works fine for IPv4
addresses, but not IPv6 see org.postgresql.Driver#parseURL for more info.

What happens if you are using a name that resolves to an IPv6 address?
You're probably the first person to actually try this.  I will look into
this further, but it may take me a while to get IPv6 up and running on my
machine.

Kris Jurka


pgsql-jdbc by date:

Previous
From: The Hermit Hacker
Date:
Subject: Re: JDBC project / CVS moving to GBorg ...
Next
From: Kim Ho
Date:
Subject: Closing a statement