Subject | Re: [Firebird-Java] Re: Help in win98 |
---|---|
Author | Francisco Antonio Vieira Souza |
Post date | 2004-11-16T14:36:48Z |
nagypapi wrote:
- Now I am sure that is not the winxp firewall because I can access the
database from my house thru internet connection, so the port 3050 is ok
in the server.
- 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(Exception 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)
{
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)
So, I beg you, please could anyone help me?
Thanks
>Another chapter of this sad history (for me).
> Assuming you are the administrator and the firewall is turned ON (and
> firebird is communicating through 3050 port)
>
> Try checking the winXP integrated firewall's (has it's own icon in
> control panel if you're using SP2) settings, logs (usually
> C:\WINDOWS\pfirewall.log) etc. if there is anything about blocking or
> not accepting connections on 3050 port, you have to open the 3050 port
>
> Or if that sounds a bit complicated try turning the firewall off
> (beware of malicious nasties!) until you test the connection and then
> back on (do this if it is your computer and on your own risk). If it
> works with the firewall turned off, that again means you have to open
> the 3050 port for TCP communication through the firewall
> > >
> > > Are there other machines (other than the win98) trying to access this
> > > database through the network?
> > > > > Hello,
> > > > >
> > > > > Try to see on your XP machine if the integrated firewall (the
> firewall
> > > > > of windows XP) doesn't block the communication. The XP
> firewall is on
> > > > > by default, so this could block the communication coming from your
> > > win98
> > > > > machines.
> > > > >
> > > > > regards.
> > > > >
> > > > > Bernard.
> > > > >
> > > > > Francisco Antonio Vieira Souza a écrit:
> > > > >
> > > > > > I would like to ask what should I do to win98 machines conect to
> > > > > > firebird in
> > > > > > a winxp machine?
> > > > > >
> > > > > > I have this situation:
> > > > > > 2 win98 machines
> > > > > > 1 winxp machine with Firebird 1.5.1
> > > > > >
> > > > > > 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".
> > > > > >
> > > > > > Is there anything different to config in win98 machines?
> > > > > >
> > > > > > Thanks a Lot
> > > > > > Francisco
> > > > > > ---
> > > >
> > > > Thanks but it is not the case, I can Map and access folders and
> other
> > > > programs in the winxp machine, I can eve execute the application
> > > > directly from the winxp machine FROM the win98 machine.
> > > > The problem is when I try to execute the application in the win98
> > > > machine accessing just the DB in winxp machine.
> > >
> > No, no others machines, just 2 win98 machines trying to access then
> > winxp machine.
> >
> > Could that be anything related to the HOSTS file in win98 or related to
> > fbcliente.dll? (that just came to my mind)
>
- Now I am sure that is not the winxp firewall because I can access the
database from my house thru internet connection, so the port 3050 is ok
in the server.
- 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(Exception 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)
{
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)
So, I beg you, please could anyone help me?
Thanks