@@ -139,10 +139,10 @@ public class ConfigurableTAPFactory extends AbstractTAPFactory {
if(jdbcDriver==null){
if(dbUrl==null)
thrownewTAPException("The property \""+KEY_JDBC_URL+"\" is missing! Since the choosen database access method is \""+VALUE_JDBC+"\", this property is required.");
@@ -237,7 +237,7 @@ public class JDBCConnection implements DBConnection {
/* JDBC URL MANAGEMENT */
/** JDBC prefix of any database URL (for instance: jdbc:postgresql://127.0.0.1/myDB or jdbc:postgresql:myDB). */
publicfinalstaticStringJDBC_PREFIX="jdbc";
publicfinalstaticStringJDBC_PREFIX="jdbc:";
/** Name (in lower-case) of the DBMS with which the connection is linked. */
protectedfinalStringdbms;
@@ -391,8 +391,8 @@ public class JDBCConnection implements DBConnection {
if(dbUrl==null)
thrownewDBException("Missing database URL!");
if(!dbUrl.startsWith(JDBC_PREFIX+":"))
thrownewDBException("This DBConnection implementation is only able to deal with JDBC connection! (the DB URL must start with \""+JDBC_PREFIX+":\" ; given url: "+dbUrl+")");
if(!dbUrl.startsWith(JDBC_PREFIX))
thrownewDBException("This DBConnection implementation is only able to deal with JDBC connection! (the DB URL must start with \""+JDBC_PREFIX+"\" ; given url: "+dbUrl+")");
dbUrl=dbUrl.substring(5);
intindSep=dbUrl.indexOf(':');
@@ -425,7 +425,7 @@ public class JDBCConnection implements DBConnection {
// Select the JDBDC driver:
Driverd;
try{
d=DriverManager.getDriver(dbUrl);
d=DriverManager.getDriver(url);
}catch(SQLExceptione){
try{
// ...load it, if necessary:
@@ -433,11 +433,11 @@ public class JDBCConnection implements DBConnection {
thrownewDBException("Missing JDBC driver path! Since the required JDBC driver is not yet loaded, this path is needed to load it.");
Class.forName(driverPath);
// ...and try again:
d=DriverManager.getDriver(dbUrl);
d=DriverManager.getDriver(url);
}catch(ClassNotFoundExceptioncnfe){
thrownewDBException("Impossible to find the JDBC driver \""+driverPath+"\" !",cnfe);
}catch(SQLExceptionse){
thrownewDBException("No suitable JDBC driver found for the database URL \""+dbUrl+"\" and the driver path \""+driverPath+"\"!",se);
thrownewDBException("No suitable JDBC driver found for the database URL \""+url+"\" and the driver path \""+driverPath+"\"!",se);