Org.firebirdsql.jdbc.FBSQLException:

[color=“red”] Estou com problemas ao conectar-se ao banco firebird.
Ja coloquei no path do projeto o driver firebird.
O erro e o seguinte:[/color]

org.firebirdsql.jdbc.FBSQLException: Resource Exception. Unable to complete network request to host "localhost".
Reason: Unable to complete network request to host "localhost".
	at org.firebirdsql.jdbc.FBDataSource.getConnection(FBDataSource.java:107)
	at org.firebirdsql.jdbc.FBDriver.connect(FBDriver.java:275)
	at java.sql.DriverManager.getConnection(Unknown Source)
	at java.sql.DriverManager.getConnection(Unknown Source)
	at Bco.main(Bco.java:19)
at org.firebirdsql.gds.GDSException: Unable to complete network request to host "localhost".
	at org.firebirdsql.jgds.GDS_Impl.connect(GDS_Impl.java:1602)
	at org.firebirdsql.jgds.GDS_Impl.isc_attach_database(GDS_Impl.java:276)
	at org.firebirdsql.jgds.GDS_Impl.isc_attach_database(GDS_Impl.java:252)
	at org.firebirdsql.jca.FBManagedConnectionFactory.createDbHandle(FBManagedConnectionFactory.java:543)
	at org.firebirdsql.jca.FBManagedConnection.<init>(FBManagedConnection.java:109)
	at org.firebirdsql.jca.FBManagedConnectionFactory.createManagedConnection(FBManagedConnectionFactory.java:374)
	at org.firebirdsql.jca.FBStandAloneConnectionManager.allocateConnection(FBStandAloneConnectionManager.java:61)
	at org.firebirdsql.jdbc.FBDataSource.getConnection(FBDataSource.java:104)
	at org.firebirdsql.jdbc.FBDriver.connect(FBDriver.java:275)
	at java.sql.DriverManager.getConnection(Unknown Source)
	at java.sql.DriverManager.getConnection(Unknown Source)
	at Bco.main(Bco.java:19)

[color=“red”]A classe e a seguinte:[/color]

import java.sql.*; 

public class Bco { 

public static void main(String[] args) { 
	try { 
			//jdbc:firebirdsql:ip_do_servidor/3050:/caminho_do_bco_de_dados.gdb", 
			String databaseURL = "jdbc:firebirdsql:localhost/3050:c:\BancoSier\Sier.GDB"; 
			String user = "sysdba"; 
			String password = "masterkey"; 
			 
			try { 
				Class.forName("org.firebirdsql.jdbc.FBDriver"); 
			} catch (java.lang.ClassNotFoundException e) { 
				System.out.println ("Firebird JCA-JDBC driver not found in class path"); 
				System.out.println (e.getMessage ()); 
			} 
			System.out.println ("Firebird tentando a conexão  " + databaseURL);
			Connection conn = DriverManager.getConnection (databaseURL, user, password);
			System.out.println ("Firebird conexão efetuada");
		 
	} catch (Exception e) { 
			e.printStackTrace(); 
		} 
	} 

}

tenta fazer assim

String databaseURL = “jdbc:firebirdsql:localhost/3050:c:\BancoSier\Sier.GDB”;

tenta fazer assim

String databaseURL = "jdbc:firebirdsql:localhost/3050:c:\BancoSier\Sier.GDB";

foi mal por repetir duas vezes a mensagem, pode excluir a de cima :oops:

OBS: no C:, coloque duas barras

Nenhuma das duas URL deu certo o mesmo problema insiste em dar.

[color=“red”]Tb coloquei no lugar C: [/color] as duas Barras

Tb não funciona…

Resolvi o problema.
Tenho um servidor linux coloquei para rodar o ibServer
e fiz a url da seguinte forma:

Valeu pela força Mach…

o fato é que vc esta utilizando o caracter \ para seraparacao de diretorio. lembre-se que em um string java para que vc tenha a ‘’ voce deve colocar ‘\’. exemplo:

caminho = “c:\diretorio\arquivo.ext”

entao ficaria:

“jdbc:firebirdsql:ferrari/3050:c:\BancoSier\SIER.GDB”;

corrigindo:

jdbc:firebirdsql:localhost/3050:c:\BancoSier\SIER.GDB