Quirks in driver and docs (Was: Re: No suitable driver found exception) - Mailing list pgsql-jdbc

From Stefano Reksten
Subject Quirks in driver and docs (Was: Re: No suitable driver found exception)
Date
Msg-id 5.1.0.14.2.20020201111355.00a5ea00@rfi1
Whole thread Raw
In response to Re: No suitable driver found exception  ("Nick Fankhauser" <nickf@ontko.com>)
List pgsql-jdbc
At 16.04 31/01/02 -0500, you wrote:
>This error usually means that the connection URL is not right. Try putting a
>debug line into your code that prints the database URL just before it gets
>used in the Store method. It should match one of these three forms:
>
>jdbc:postgresql:database
>jdbc:postgresql://host/database
>jdbc:postgresql://host:port/database

Hello list,
in order to understand a little bit more deeply JDBC, yesterday I went
digging the code while reading the JDBC 1.2 specifications.
Here are some quirks I found in the code, I think this could also help
Amanda solve her problem. I can volunteer to help fix these, if anyone has
the patience to explain me how to use CVS to check out the latest version
and how to send patches (I think I should send you the output of 'diff
oldversion newversion' but I am not sure). Anyway:

In Driver.java (prepared by ant for jdbc2), line 127, and 174, the URL is
specified as jdbc:org.postgresql://host:port..., but instead the working
version seems to be jdbc:postgresql://host..., so org.postgresql in the
docs should be changed to postgresql. This could be the reason why Amanda
gets no suitable driver exception. IIRC even a colleague of mine got into
this, but we solved changing the URL.

Line 392: getLogStream has been deprecated, because under jak 1.2 gave
deprecation warnings; this is correct as under jdk 1.2 the preferred method
would be getLogWriter.

Again in Driver.java, getPropertyInfo does not report that the user name is
mandatory. This is useful for GUIs.

In the abstract class Connection.java, the comment say that user and
password are mandatory, but this is incorrect since if the password is
missing an empty one is used. The comments don't go to the JavaDocs, but
for code-diggers like me it is preferrable to have correct comments.

Hope this helps, and pls let me know if I can volunteer to help a little
more. I'll be digging through the whole code in the next days... better say
nights ;)

Ciao,
         Stefano


pgsql-jdbc by date:

Previous
From: "Sulakshana Awsarikar"
Date:
Subject: Re: getConnection() method of PreparedStatement
Next
From: tony
Date:
Subject: escaping ' again