* $Id: Connection.java,v 1.16 1999/05/17 22:43:23 peter Exp $
* $Id: Connection.java,v 1.17 1999/05/18 23:17:15 peter Exp $
*
* This abstract class is used by postgresql.Driver to open either the JDBC1 or
* JDBC2 versions of the Connection class.
...
...
@@ -95,9 +95,9 @@ public abstract class Connection
// This occasionally occurs when the client uses the properties version
// of getConnection(), and is a common question on the email lists
if(info.getProperty("user")==null)
thrownewSQLException("The user property is missing. It is mandatory.");
thrownewPSQLException("postgresql.con.user");
if(info.getProperty("password")==null)
thrownewSQLException("The password property is missing. It is mandatory.");
thrownewPSQLException("postgresql.con.pass");
this_driver=d;
this_url=newString(url);
...
...
@@ -116,9 +116,9 @@ public abstract class Connection
// Added by Peter Mount <peter@retep.org.uk>
// ConnectException is thrown when the connection cannot be made.
// we trap this an return a more meaningful message for the end user
thrownewSQLException("Connection refused. Check that the hostname and port is correct, and that the postmaster is running with the -i flag, which enables TCP/IP networking.");
// Now we need to construct and send a startup packet
...
...
@@ -173,11 +173,11 @@ public abstract class Connection
caseAUTH_REQ_KRB4:
DriverManager.println("postgresql: KRB4");
thrownewSQLException("Kerberos 4 not supported");
thrownewPSQLException("postgresql.con.kerb4");
caseAUTH_REQ_KRB5:
DriverManager.println("postgresql: KRB5");
thrownewSQLException("Kerberos 5 not supported");
thrownewPSQLException("postgresql.con.kerb5");
caseAUTH_REQ_PASSWORD:
DriverManager.println("postgresql: PASSWORD");
...
...
@@ -197,17 +197,17 @@ public abstract class Connection
break;
default:
thrownewSQLException("Authentication type "+areq+" not supported. Check that you have configured the pg_hba.conf file to include the client's IP address or Subnet, and is using a supported authentication scheme.");
//throw new SQLException("The postgresql.jar file does not contain the correct JDBC classes for this JVM. Try rebuilding.\nException thrown was "+ex.toString());
}catch(Exceptionex2){
thrownewPSQLException("postgresql.unusual",ex2);
//throw new SQLException("Something unusual has occured to cause the driver to fail. Please report this exception: "+ex2.toString());
}
// The old call - remove before posting
//return new Connection (host(), port(), props, database(), url, this);
...
...
@@ -356,7 +349,6 @@ public class Driver implements java.sql.Driver
postgresql.con.auth:The authentication type {1} is not supported. Check that you have configured the pg_hba.conf file to include the client's IP address or Subnet, and that it is using an authentication scheme supported by the driver.
postgresql.con.authfail:An error occured while getting the authentication request.
postgresql.con.call:Callable Statements are not supported at this time.
postgresql.con.creobj:Failed to create object for {1} {2}
postgresql.con.failed:The connection attempt failed because {1}
postgresql.con.fathom:Unable to fathom update count {1}
postgresql.con.garbled:Garbled data received.
postgresql.con.ioerror:An IO erro occured while sending to the backend - {1}
postgresql.con.kerb4:Kerberos 4 authentication is not supported by this driver.
postgresql.con.kerb5:Kerberos 5 authentication is not supported by this driver.
postgresql.con.multres:Cannot handle multiple result groups.
postgresql.con.pass:The password property is missing. It is mandatory.
postgresql.con.refused:Connection refused. Check that the hostname and port is correct, and that the postmaster is running with the -i flag, which enables TCP/IP networking.
postgresql.con.strobj:The object could not be stored. Check that any tables required have already been created in the database.
postgresql.con.strobjex:Failed to store object - {1}
postgresql.con.toolong:The SQL Statement is too long - {1}
postgresql.con.tuple:Tuple received before MetaData.
postgresql.con.type:Unknown Response Type {1}
postgresql.con.user:The user property is missing. It is mandatory.
postgresql.fp.error:FastPath call returned {1}
postgresql.fp.expint:Fastpath call {1} - No result was returned and we expected an integer.