Subject RE: [IB-Java] Can't Establish Interbase Connection
Author Sugimin
RE: [IB-Java] Can't Establish Interbase Connection

yes, I have the db on every machine, I've checked the db using IBConsole,
there's nothing wrong with it.

Any idea what the problem is?

TIA

-----Original Message-----
From: David Jencks [mailto:davidjencks@...]
Sent: Thursday, January 10, 2002 8:22 PM
To: IB-Java@yahoogroups.com
Subject: Re: [IB-Java] Can't Establish Interbase Connection


Is firebird/interbase running on every machine and is the db
d:/ELSTO_OFFLINE.gdb on every machine? That is what your url assumes.

david jencks

On 2002.01.10 03:35:03 -0500 Sugimin wrote:
> Hi all,
>
> I have problem with establishing interbase connection, the InterClient
> driver
> did successfully registered, but when trying to get a connection, The
> ServerTimeoutException is thrown. I've tried to run the program below on
> several PCs, the weird thing is that the error doesn't occur on every PC.
> did I miss something?
>
> Any help are appreciated. TIA
>
> Sugimin
>
> //***** Sample Program
>
> import java.io.*;
> import java.sql.*;
>
> public class IBConnection {
>
>   public IBConnection() {
>   }
>
>   public static void main(String[] args) {
>     try {
>       String driver = "interbase.interclient.Driver";
>       String url = "jdbc:interbase://localhost/d:/ELSTO_OFFLINE.gdb";
>       String username = "sysdba";
>       String password = "masterkey";
>       Class.forName(driver); //OK
>
>       DriverManager.setLoginTimeout(60);
>       DriverManager.setLogWriter(new PrintWriter(System.out));
>      
> //Error here 
>       Connection c = DriverManager.getConnection(url,username,password);
>       System.out.println ("got connection");
>       c.close ();
>     } catch (Exception e) {
>       e.printStackTrace(System.out);
>     }
>   }
> }
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
> <HTML>
> <HEAD>
> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
> <META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2650.12">
> <TITLE>Can't Establish Interbase Connection</TITLE>
> </HEAD>
> <BODY>
>
>
>
> <P><FONT SIZE=2>Hi all,</FONT>
> </P>
>
> <P><FONT SIZE=2>I have problem with establishing interbase connection,
> the InterClient driver</FONT>
> <BR><FONT SIZE=2>did successfully registered, but when trying to get a
> connection, The ServerTimeoutException is thrown. I've tried to run the
> program below on several PCs, the weird thing is that the error doesn't
> occur on every PC. did I miss something?</FONT></P>
>
> <P><FONT SIZE=2>Any help are appreciated. TIA</FONT>
> </P>
>
> <P><FONT SIZE=2>Sugimin</FONT>
> </P>
>
> <P><FONT SIZE=2>//***** Sample Program</FONT>
> </P>
>
> <P><FONT SIZE=2>import java.io.*;</FONT>
> <BR><FONT SIZE=2>import java.sql.*;</FONT>
> </P>
>
> <P><FONT SIZE=2>public class IBConnection {</FONT>
> </P>
>
> <P><FONT SIZE=2>&nbsp; public IBConnection() {</FONT>
> <BR><FONT SIZE=2>&nbsp; }</FONT>
> </P>
>
> <P><FONT SIZE=2>&nbsp; public static void main(String[] args) {</FONT>
> <BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp; try {</FONT>
> <BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; String driver =
> &quot;interbase.interclient.Driver&quot;;</FONT>
> <BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; String url =
> &quot;jdbc:interbase://localhost/d:/ELSTO_OFFLINE.gdb&quot;;</FONT>
> <BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; String username =
> &quot;sysdba&quot;;</FONT>
> <BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; String password =
> &quot;masterkey&quot;;</FONT>
> <BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Class.forName(driver);
> //OK</FONT>
> </P>
>
> <P><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> DriverManager.setLoginTimeout(60);</FONT>
> <BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> DriverManager.setLogWriter(new PrintWriter(System.out));</FONT>
> <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> <BR><FONT SIZE=2>//Error here&nbsp;&nbsp;&nbsp; </FONT>
> <BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Connection c =
> DriverManager.getConnection(url,username,password); </FONT>
> <BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.out.println
> (&quot;got connection&quot;);</FONT>
> <BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; c.close ();</FONT>
> <BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp; } catch (Exception e) {</FONT>
> <BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> e.printStackTrace(System.out);</FONT>
> <BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp; }</FONT>
> <BR><FONT SIZE=2>&nbsp; }</FONT>
> <BR><FONT SIZE=2>}</FONT>
> </P>
>
>
>
> <br>
> <tt>
> To unsubscribe from this group, send an email to:<BR>
> IB-Java-unsubscribe@egroups.com<BR>
> <BR>
> </tt>
> <br>
>
> <br>
> <tt>Your use of Yahoo! Groups is subject to the <a
> href="http://docs.yahoo.com/info/terms/">Yahoo! Terms of
> Service</a>.</tt>
> </br>
>
> </BODY>
> </HTML>

------------------------ Yahoo! Groups Sponsor ---------------------~-->
Sponsored by VeriSign - The Value of Trust
Pinpoint the right security solution for your company - FREE
Guide from industry leader VeriSign gives you all the facts.
http://us.click.yahoo.com/pCuuSA/WdiDAA/yigFAA/saFolB/TM
---------------------------------------------------------------------~->

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

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/