Subject | JDK1.4.2.17 No suitable driver error. |
---|---|
Author | iananewby |
Post date | 2009-08-24T14:50:28Z |
Hi Folks,
I've written the following small test class to test issues with character sets:
package dbcharsettest;
import java.sql.Connection;
import java.sql.Driver;
import java.sql.DriverManager;
import java.util.Properties;
import org.firebirdsql.jdbc.FBConnection;
public class Main {
public Main() {
}
public static void main(String[] args) {
try {
Driver driver = (Driver)Class.forName("org.firebirdsql.jdbc.FBDriver").newInstance();
DriverManager.registerDriver(driver);
Properties p = new Properties();
p.setProperty("user","aktivate");
p.setProperty("password","s1v2n3f9");
p.setProperty("encoding","WIN1252");
p.setProperty("sqlDialect","1");
Connection con = DriverManager.getConnection("jdbc:firebirdsql://localhost/C:/!Development/Aktiv2/DataSafe/Aktiv.fdb", p);
System.out.println(((FBConnection) con).getIscEncoding());
con.close();
} catch (Exception e) {
e.printStackTrace();
}
}
}
when I run it, with the following command:
C:\j2sdk1.4.2_17\jre\bin\java.exe -classpath C:\!Development\Libraries\FirebirdSQL\Jaybird-2.1.6JDK_1.4\jaybird-full-2.1.6.jar;C:\!Development\DBCharsetTest\build\classes dbcharsettest.Main
I get a no suitable driver error. This program works fine if I use an older version (1.5) of the driver.
Has something changed that I have missed?
Regards
Ian
I've written the following small test class to test issues with character sets:
package dbcharsettest;
import java.sql.Connection;
import java.sql.Driver;
import java.sql.DriverManager;
import java.util.Properties;
import org.firebirdsql.jdbc.FBConnection;
public class Main {
public Main() {
}
public static void main(String[] args) {
try {
Driver driver = (Driver)Class.forName("org.firebirdsql.jdbc.FBDriver").newInstance();
DriverManager.registerDriver(driver);
Properties p = new Properties();
p.setProperty("user","aktivate");
p.setProperty("password","s1v2n3f9");
p.setProperty("encoding","WIN1252");
p.setProperty("sqlDialect","1");
Connection con = DriverManager.getConnection("jdbc:firebirdsql://localhost/C:/!Development/Aktiv2/DataSafe/Aktiv.fdb", p);
System.out.println(((FBConnection) con).getIscEncoding());
con.close();
} catch (Exception e) {
e.printStackTrace();
}
}
}
when I run it, with the following command:
C:\j2sdk1.4.2_17\jre\bin\java.exe -classpath C:\!Development\Libraries\FirebirdSQL\Jaybird-2.1.6JDK_1.4\jaybird-full-2.1.6.jar;C:\!Development\DBCharsetTest\build\classes dbcharsettest.Main
I get a no suitable driver error. This program works fine if I use an older version (1.5) of the driver.
Has something changed that I have missed?
Regards
Ian