Subject | Error connecting Database |
---|---|
Author | Andres Eguiguren |
Post date | 2006-07-19T13:22:20Z |
Hi everybody:
I am using Eclipse and Firebird 1.5
Inside Eclipse I don't have any problems connecting to database.
But, when I create .jar file and access it I receive the following
error:
ClassNotFoundException: org.firebirdsql.jdbc.FBDriver
SQLException: No suitable driver
I checked .classpath and has the following:
<classpathentry exported="true" kind="lib"
path="hibernate/firebirdsql-full.jar"/>
I have a folder named hibernate and inside it firebirdsql-full.jar
file.
File structure is:
\if\if.jar
\if\hibernate\firebirdsql-full.jar
the code I am using is:
String DriverBDD = "org.firebirdsql.jdbc.FBDriver";
String url = "jdbc:firebirdsql://192.168.0.100/
\\database\\informacionzonal.fdb";
try {
Class.forName("org.firebirdsql.jdbc.FBDriver");
} catch(java.lang.ClassNotFoundException e) {
System.err.print("ClassNotFoundException: ");
System.err.println(e.getMessage());
}
try {
con = DriverManager.getConnection(url,"SYSDBA", "masterkey");
}
catch(SQLException ex) {
System.err.println("SQLException: " + ex.getMessage());
}
//end makeConnection
Again: from inside Eclipse all is Ok., but with .jar file it doesn't
work.
Please, help me.
Thanks in advance for you help.
I am using Eclipse and Firebird 1.5
Inside Eclipse I don't have any problems connecting to database.
But, when I create .jar file and access it I receive the following
error:
ClassNotFoundException: org.firebirdsql.jdbc.FBDriver
SQLException: No suitable driver
I checked .classpath and has the following:
<classpathentry exported="true" kind="lib"
path="hibernate/firebirdsql-full.jar"/>
I have a folder named hibernate and inside it firebirdsql-full.jar
file.
File structure is:
\if\if.jar
\if\hibernate\firebirdsql-full.jar
the code I am using is:
String DriverBDD = "org.firebirdsql.jdbc.FBDriver";
String url = "jdbc:firebirdsql://192.168.0.100/
\\database\\informacionzonal.fdb";
try {
Class.forName("org.firebirdsql.jdbc.FBDriver");
} catch(java.lang.ClassNotFoundException e) {
System.err.print("ClassNotFoundException: ");
System.err.println(e.getMessage());
}
try {
con = DriverManager.getConnection(url,"SYSDBA", "masterkey");
}
catch(SQLException ex) {
System.err.println("SQLException: " + ex.getMessage());
}
//end makeConnection
Again: from inside Eclipse all is Ok., but with .jar file it doesn't
work.
Please, help me.
Thanks in advance for you help.