Subject Re: [firebird-support] Just a Question
Author Francisco Antonio Vieira Souza
Lester Caine wrote:

> Francisco Antonio Vieira Souza wrote:
>
> > Does anyone uses Firebird 1.5 beeing accessed from machines with win98
> > and the application made with Java?
> > If so, could you give me some tips how to conect from win98 machines?
> > I have tryed so many ways and nothing worked until now.
>
> You will have to supply a bit more detail on the problem. I still run
> W98SE quite a lot even with FB1.5 and don't have any problems with them
> as clients or servers.
>
> How are you trying to access Firebird?
> What drivers are you using with Java?
> What is the database actually on?
>
> --
> Lester Caine
> -----------------------------

Ok, thaks for your answer, here we go with details:
I have this situation
- 2 win98 machines
- 1 winxp machine with Firebird 1.5.1
- Java Driver: Jaybird 1.5.2
- Java: 1.5
When my application (with Jaybird 1.5.2) tries to connect to the server this
exception is shown:
Unable to complete network request to "the machine IP/name".

What I did and did not work:
- I fixed the HOSTS file in \WINDOWS in the win98 machine, I did PING
SERVER_NAME, and it was successfully executed.
- I tyed with the machine NAME and with the machine IP
- I stoped using connection pool in my application
- I changed the url format in my application to: Standard format=
jdbc:firebirdsql:[//host[:port]/]<database>

All these tries were UNSUCCESSFULL

My Connection Code:

public static Connection getConexaoSis()
{
Connection c = null;
String maquina = "";
try
{
maquina = "192.168.0.1"; //T.setServerPath();
}
catch(IOException io){}
String user = T.usuario;
String pwd = T.senha;
String dir_db = "C:\\KOOKY\\SigGraf\\dados\\SIGRAF.FDB";
String url =
"jdbc:firebirdsql://"+maquina+":3050/"+dir_db+"?lc_ctype=ISO8859_1";

try
{
c = java.sql.DriverManager.getConnection (url, user, pwd);
}
catch(org.firebirdsql.jdbc.FBSQLException ef) <<<<==========
HERE IS THE EXCEPTION
{
ef.printStackTrace();
T.Mess("Erro FB/SQL: Pegando a Conexão",ef.getMessage());
return null;
}
catch(SQLException eee)
{
eee.printStackTrace();
T.Mess("Erro SQL - Pegando a Conexão",eee.getMessage());
return null;
}
return c;
}

====================== THE EXCEPTION MESSAGE ===========================
Erro FB/SQL: Pegando a Conexao
Resource Exception. Unable to complete network request to host
"192.168.0.1".
Reason: Unable to complete network request to host "192.168.0.1".

The StackTrace:
org.firebirdsql.jdbc.FBSQLException:
Resource Exception. Unable to complete network request to host
"192.168.0.1".
Reason: Unable to complete network request to host "192.168.0.1".
at
org.firebirdsql.jdbc.FBDataSource.getConnection(FBDataSource.java:112)
at org.firebirdsql.jdbc.FBDriver.connect(FBDriver.java:190)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at br.com.lib.B.getConexaoSis(B.java:182)
at br.com.modulos.LoginBox.<init>(LoginBox.java:21)
at br.com.main.LamiFrame.<init>(LamiFrame.java:113)
at br.com.main.Main$1.run(Main.java:30)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
at org.firebirdsql.gds.GDSException: Unable to complete network request
to host "192.168.0.1".
at org.firebirdsql.jgds.GDS_Impl.connect(GDS_Impl.java:1654)
at org.firebirdsql.jgds.GDS_Impl.isc_attach_database(GDS_Impl.java:289)
at org.firebirdsql.jgds.GDS_Impl.isc_attach_database(GDS_Impl.java:265)
at
org.firebirdsql.jca.FBManagedConnectionFactory.createDbHandle(FBManagedConnectionFactory.java:540)
at
org.firebirdsql.jca.FBManagedConnection.<init>(FBManagedConnection.java:90)
at
org.firebirdsql.jca.FBManagedConnectionFactory.createManagedConnection(FBManagedConnectionFactory.java:366)
at
org.firebirdsql.jca.FBStandAloneConnectionManager.allocateConnection(FBStandAloneConnectionManager.java:60)
at
org.firebirdsql.jdbc.FBDataSource.getConnection(FBDataSource.java:109)
at org.firebirdsql.jdbc.FBDriver.connect(FBDriver.java:190)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at br.com.lib.B.getConexaoSis(B.java:182)
at br.com.modulos.LoginBox.<init>(LoginBox.java:21)
at br.com.main.LamiFrame.<init>(LamiFrame.java:113)
at br.com.main.Main$1.run(Main.java:30)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at br.com.modulos.LoginBox.setDicaCodigos(LoginBox.java:226)
at br.com.modulos.LoginBox.<init>(LoginBox.java:31)
at br.com.main.LamiFrame.<init>(LamiFrame.java:113)
at br.com.main.Main$1.run(Main.java:30)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

I hope this can help you let me any tip about the problem.
Thanks