Subject Re: [Firebird-Java] Newbie problem: unable to complete network request on MAC OS
Author Rick Fincher
Hi Thorsten,

The fact that you are getting a GDS exception suggests that you have
JayBird installed in the proper classpath for your application.

To verify that Firebird is listening on port 3050, from a command line
try the command: telnet localhost 3050.
You may need to find where telnet is on your machine and give a full
pathname to get it to run.

If Firebird is there you should see a message similar to:

Trying 127.0.0.1...
Connected to localhost.localdomain(127.0.0.1).
Escape character is '^]'.

If Firebird isn't talking you will see:

Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused

You should also be able to ping localhost or whatever you IP number is.

Make sure you have granted the user you log in as acess to the
database. This is probably OK since you can log in from the command line.

Also, there are two formats for the URL, you might want to try the new one.

Standard format= jdbc:firebirdsql:[//host[:port]/]<database>

FB old format= jdbc:firebirdsql:[host[/port]:]<database>

Here is a link to some Mac OSX specific Firebird info

http://wrenbeck.com/blog.nsf/Archive/EWRK-5PX3QJ!OpenDocument


Hope this helps, feel free tocontact me directly if you need more help

Rick Fincher
rnf@...


tpr1776 wrote:

> Hi,
>
> I have already read many similar postings but neither of the answers
> could solve my problem.
>
> I just want to build a small java application with an SQL access to
> Firebird. Everytime I get this exception:
>
> --- ERROR ---
> org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544721. Unable
> to complete network request to host "localhost".
> Reason: Unable to complete network request to host "localhost".
> --- end of ERROR ---
>
> My code is:
> --- CODE ---
> public static final String
> cDBfile="/Users/thorstenreinsch/Documents/JPlan/test.fdb";
>
> // ....
>
> try {
> Class.forName ("org.firebirdsql.jdbc.FBDriver");
> } catch (Exception e) { //...
> }
> try {
> c = DriverManager.getConnection(
> "jdbc:firebirdsql:localhost/3050:"+cDBfile,
> cDBuser,
> cDBpassword);
> System.out.println("q");
> }
> catch (Exception e){}
> --- end of CODE ---
>
> It does not matter if I use localhost, 127.0.0.1, my local IP or my
> host name. I also shutdown my firewall, so this should not be the
> problem...
>
> I can work with my database with the command line tool isql without a
> problem. But either my JDBC access nor Flamerobin is working.
>
> I am working on Mac OS 10.4.7 and I downladed
> Firebird-CS-1.5.1-MacOS.zip. I have Java 1.5.0_06 and use Jaybird
> 2.2.0 (I copied the file jaybird-full-2.2.0.jar to my application
> directory).
>
> I do not know if I have now a jdbc or database error (Maybe firebird
> is not running or listing on port 3050). Unfortunately you can not
> acces the MAC OS Howto on firebirdsql.org.
>
> Thanks a lot
>
> Thorsten
>
>




[Non-text portions of this message have been removed]