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