Jump to content


Photo

Conexão dando erro com Firebird

NetBeans

  • Faça o login para participar
5 replies to this topic

#1 Pixels

Pixels

    Novato no fórum

  • Usuários
  • 13 posts
  • Sexo:Masculino

Posted 16/11/2015, 17:11

Erro:

run:
nov 15, 2015 8:00:10 PM br.com.teste.acessobd.AcessoFirebird conectar
Não foi possível conectar ao banco!!!
GRAVE: null
org.firebirdsql.jdbc.FBSQLException: Resource Exception. I/O error during "CreateFile (open)" operation for file "c:\firebird\empresa.fdb"
Error while trying to open file
null
Reason: I/O error during "CreateFile (open)" operation for file "c:\firebird\empresa.fdb"
Error while trying to open file
null
    at org.firebirdsql.jdbc.FBDataSource.getConnection(FBDataSource.java:106)
    at org.firebirdsql.jdbc.FBDriver.connect(FBDriver.java:221)
    at java.sql.DriverManager.getConnection(DriverManager.java:664)
    at java.sql.DriverManager.getConnection(DriverManager.java:247)
    at br.com.teste.acessobd.AcessoFirebird.conectar(AcessoFirebird.java:42)
    at br.com.teste.acessobd.AcessoFirebird.<init>(AcessoFirebird.java:31)
    at br.com.teste.acessobd.AcessoFirebird.main(AcessoFirebird.java:27)
at org.firebirdsql.gds.GDSException: I/O error during "CreateFile (open)" operation for file "c:\firebird\empresa.fdb"
Error while trying to open file
null
    at org.firebirdsql.jgds.GDS_Impl.readStatusVector(GDS_Impl.java:1758)
    at org.firebirdsql.jgds.GDS_Impl.receiveResponse(GDS_Impl.java:1711)
    at org.firebirdsql.jgds.GDS_Impl.isc_attach_database(GDS_Impl.java:296)
    at org.firebirdsql.jgds.GDS_Impl.isc_attach_database(GDS_Impl.java:258)
    at org.firebirdsql.jca.FBManagedConnectionFactory.createDbHandle(FBManagedConnectionFactory.java:540)
    at org.firebirdsql.jca.FBManagedConnection.<init>(FBManagedConnection.java:88)
    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:103)
    at org.firebirdsql.jdbc.FBDriver.connect(FBDriver.java:221)
    at java.sql.DriverManager.getConnection(DriverManager.java:664)
    at java.sql.DriverManager.getConnection(DriverManager.java:247)
    at br.com.teste.acessobd.AcessoFirebird.conectar(AcessoFirebird.java:42)
    at br.com.teste.acessobd.AcessoFirebird.<init>(AcessoFirebird.java:31)
    at br.com.teste.acessobd.AcessoFirebird.main(AcessoFirebird.java:27)

CONSTRUÍDO COM SUCESSO (tempo total: 0 segundos)

Como arrumar isso?

Código usado:

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.teste.acessobd;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author Marcia
 */
public class AcessoFirebird {
    
    Connection con;
    PreparedStatement pstm;
    ResultSet rs;
    
    public static void main (String args[]) {
        new AcessoFirebird();
    }
    
    public AcessoFirebird() {
        conectar();
    }
    
        public void conectar() {
        try {
            Class.forName("org.firebirdsql.jdbc.FBDriver");
        } catch (ClassNotFoundException ex) {
            Logger.getLogger(AcessoMySql.class.getName()).log(Level.SEVERE, null, ex);
            System.out.println("Não foi possível encontrar o Drive!!!");
        }
        try {
            con = DriverManager.getConnection("jdbc:firebirdsql:localhost/3050:c:\\firebird\\empresa.fdb", "sysdba", "masterkey");
        } catch (SQLException ex) {
            Logger.getLogger(AcessoMySql.class.getName()).log(Level.SEVERE, null, ex);
            System.out.println("Não foi possível conectar ao banco!!!");
        }
    }
    
    public void desconectar() {
        try {
            con.close();
        } catch (SQLException ex) {
            Logger.getLogger(AcessoMySql.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
    
}


#2 Miguceamma

Miguceamma

    Super Veterano

  • Usuários
  • 10528 posts
  • Sexo:Masculino
  • Localidade:Oruro

Posted 05/10/2017, 18:34

Purchase Nexium Zithromax Rosacea levitra in canada discount code Amitriptyline Buy In Uk Cialis 5 Mg Doctissimo
Zithromax viagra Viagra Discount Web Sites

#3 RonsisM

RonsisM

    Super Veterano

  • Usuários
  • 13788 posts
  • Sexo:Masculino
  • Localidade:Plovdiv

Posted 08/10/2017, 17:25

Propecia Adverse Effects Swelling Of The Lips viagra Baclofene Effets Indesirables
Pyridium Prodium Cleveland Quinine Finasteride Without Prescription Uk levitra germany priligy Generic Free Shipping Provera Find In Internet Shipped Ups Tadalafil Tadacip Kamagra Oral Jelly Inhaltsstoffe
Cialis Generico Pagamento In Contrassegno Keflex Antimicrobial Spectrum Amoxil Buy Paypal extra super levitra frumforum.co Levitra Generique Avion Cialis Online Toronto Paharmacymall

#4 HaroNism

HaroNism

    Super Veterano

  • Usuários
  • 11979 posts
  • Sexo:Masculino
  • Localidade:San Miguel de Tucuman

Posted 12/10/2017, 22:34

Donde Puedo Comprar Lexapro En Canada Amoxicillin Shipping To China Where To Buy Cefixime 400 Mg buy viagra online Amoxicillin For Kennel Cough Canadian Health Shop
Levitra Es Mejor Que Viagra Online Ed Tratments viagra Buy Cialis Online 20mg

#5 RonsisM

RonsisM

    Super Veterano

  • Usuários
  • 13788 posts
  • Sexo:Masculino
  • Localidade:Plovdiv

Posted 25/10/2017, 23:43

Tarif Cialis 20mg canadian healthcare mall levitra Dexamethasone No Prescription Achat Cialis Ordonnance Canandian Cialis For Sale
Achat Levitra Sans Ordonnance online pharmacy Comprare Viagra In Germania Buy Silagra 100 Mg

#6 Miguceamma

Miguceamma

    Super Veterano

  • Usuários
  • 10528 posts
  • Sexo:Masculino
  • Localidade:Oruro

Posted 31/10/2017, 14:50

Cod Only Bentyl Viagra Cialis Douleurs viagra prescription Cialis Ereccion Firme Propecia Sperm Analysis
Cialis Homme Vendita Viagra Italia Line Effetti Collaterali Viagra Cialis viagra Propecia Depression Hair Transplant Famciclovir Cost




0 user(s) are reading this topic

0 membro(s), 0 visitante(s) e 0 membros anônimo(s)

IPB Skin By Virteq