Subject | Help on InterClient |
---|---|
Author | ckhui@school.net.hk |
Post date | 2001-01-23T15:09:48Z |
Dear all,
I am running RH7, FireBird 0.94p1 and got the following
exception whenever I tried to run a very very simple java
application which merely open a connection to interserver.
I have tried JDK1.3 and JDK1.2.2 from SUN and both give me the
same result.
OS: Redhat 7.0 with glibc updated
JDK: JDK1.2.2-fcs / JDK1.3-fcs
IB: FireBird 0.94p1
InterClient,InterServer: 1.60.1
Classpath:/usr/java/jre1.2.2/lib/rt.jar:/usr/interclient/interclient.j
ar:.
Error:
$java SQLStatement
Exception in thread "main" java.lang.NumberFormatException:
at java.lang.Integer.parseInt(Integer.java:430)
at java.lang.Integer.parseInt(Integer.java:458)
at interbase.interclient.Driver.connect(Unknown Source)
at
java.sql.DriverManager.getConnection(DriverManager.java:457)
at
java.sql.DriverManager.getConnection(DriverManager.java:137)
at SQLStatement.main(SQLStatement.java:24)
$
Any ideas???
Jacky Hui
Source code of my java program.
----------------------------------------------------
import java.sql.*;
public class SQLStatement {
public static void main(String args[]) {
String databaseURL =
"jdbc:interbase://myserver:/opt/interbase/example/employee.gdb";
String user = "sysdba";
String password = "masterkey";
String driverName = "interbase.interclient.Driver";
Connection con;
String query = "select * from country";
Statement stmt;
try {
Class.forName(driverName);
} catch(java.lang.ClassNotFoundException e) {
System.err.print("ClassNotFoundException: ");
System.err.println(e.getMessage());
}
try {
con =
DriverManager.getConnection(databaseURL,user,password);
con.close();
} catch(SQLException ex) {
System.err.print("SQLException: ");
System.err.println(ex.getMessage());
}
}
}
I am running RH7, FireBird 0.94p1 and got the following
exception whenever I tried to run a very very simple java
application which merely open a connection to interserver.
I have tried JDK1.3 and JDK1.2.2 from SUN and both give me the
same result.
OS: Redhat 7.0 with glibc updated
JDK: JDK1.2.2-fcs / JDK1.3-fcs
IB: FireBird 0.94p1
InterClient,InterServer: 1.60.1
Classpath:/usr/java/jre1.2.2/lib/rt.jar:/usr/interclient/interclient.j
ar:.
Error:
$java SQLStatement
Exception in thread "main" java.lang.NumberFormatException:
at java.lang.Integer.parseInt(Integer.java:430)
at java.lang.Integer.parseInt(Integer.java:458)
at interbase.interclient.Driver.connect(Unknown Source)
at
java.sql.DriverManager.getConnection(DriverManager.java:457)
at
java.sql.DriverManager.getConnection(DriverManager.java:137)
at SQLStatement.main(SQLStatement.java:24)
$
Any ideas???
Jacky Hui
Source code of my java program.
----------------------------------------------------
import java.sql.*;
public class SQLStatement {
public static void main(String args[]) {
String databaseURL =
"jdbc:interbase://myserver:/opt/interbase/example/employee.gdb";
String user = "sysdba";
String password = "masterkey";
String driverName = "interbase.interclient.Driver";
Connection con;
String query = "select * from country";
Statement stmt;
try {
Class.forName(driverName);
} catch(java.lang.ClassNotFoundException e) {
System.err.print("ClassNotFoundException: ");
System.err.println(e.getMessage());
}
try {
con =
DriverManager.getConnection(databaseURL,user,password);
con.close();
} catch(SQLException ex) {
System.err.print("SQLException: ");
System.err.println(ex.getMessage());
}
}
}