Subject RE: [IB-Java] Help on InterClient
Author Edward Flick
Try taking out that second colon.

-----Original Message-----
From: Joe Shevland [mailto:shevlandj@...]
Sent: Tuesday, January 23, 2001 16:12
To: IB-Java@egroups.com
Subject: RE: [IB-Java] Help on InterClient


What are you using as the connection string? Possibly a TCP port number
that's not an integer?

Regards,
Joe

-----Original Message-----
From: ckhui@... [mailto:ckhui@...]
Sent: Wednesday, January 24, 2001 2:10 AM
To: IB-Java@egroups.com
Subject: [IB-Java] Help on InterClient


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());
}
}
}



To unsubscribe from this group, send an email to:
IB-Java-unsubscribe@egroups.com






To unsubscribe from this group, send an email to:
IB-Java-unsubscribe@egroups.com