Firebird 3 + jaybird-full-2.2.11.jar + NetBeans 8.1

Pessoal,

Estou com este erro abaixo quando, antes de rodar a minha aplicação, deixo uma instância do IbExpert conectada ao banco… Assim que minha aplicação “tenta” abrir uma conexão ocorre o erro.

O Mais Incrível é que se eu rodo primeiro a aplicação e depois conecto com o IbExpert, ele não dá mais esse erro ( as vezes) Outra hora, rodando a aplicação e abrindo o IbExpert e conectando na base, já dá o erro. quando tento fazer uma nova conexão dentro da minha aplicação;

org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544344. I/O error during “CreateFile (open)” operation for file "C:\DATABASE_DEV30.FDB"
Error while trying to open file
null
at org.firebirdsql.jdbc.FBDataSource.getConnection(FBDataSource.java:120)
at org.firebirdsql.jdbc.AbstractDriver.connect(AbstractDriver.java:136)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:247)
at DataBase.Conexao.conect(Conexao.java:63)
at moduloPrincipal.frmMain.ValidaConexao(frmMain.java:164)
at moduloPrincipal.frmMain.ValidaConexaoDataBase(frmMain.java:134)
at moduloPrincipal.frmMain.formComponentShown(frmMain.java:549)
at moduloPrincipal.frmMain.access$100(frmMain.java:43)
at moduloPrincipal.frmMain$2.componentShown(frmMain.java:397)
at java.awt.AWTEventMulticaster.componentShown(AWTEventMulticaster.java:179)
at java.awt.Component.processComponentEvent(Component.java:6367)
at java.awt.Component.processEvent(Component.java:6315)
at java.awt.Container.processEvent(Container.java:2236)
at java.awt.Window.processEvent(Window.java:2029)
at java.awt.Component.dispatchEventImpl(Component.java:4891)
at java.awt.Container.dispatchEventImpl(Container.java:2294)
at java.awt.Window.dispatchEventImpl(Window.java:2750)
at java.awt.Component.dispatchEvent(Component.java:4713)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.awt.EventQueue$4.run(EventQueue.java:729)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

String de Conexão.: jdbc:firebirdsql:localhost/3050:C:\DataBase_DEV30.FDB

Instalação Firebird-3.0.0.32483_2_Win32.exe modo SuperServer

É como se o Firebird não pudesse ter duas “Conexões” ativas para o mesmo banco!

Alguma idéia do que possa ser?

Verifica se o banco de dados está online, lá no ibexpert vai em services>databases online, faça o teste.

Verifique também se o serviço está iniciado no Firebird Server Control, localizado no painel de controle

Olá Tiago!

Fazendo o teste de DataBase Online…

Error Message:

Unsuccessful execution caused by system error that does not preclude successful execution of subsequent statements.
Target shutdown mode is invalid for database “C:\DATABASE_DEV30.FDB”.

Por incrível que pareça, não tem Firebird Server Control no painel de controle do windows 10 64 Bits, com a instalação do Firebird 32 Bits…

estranho, então voce não tem rodando o processo fbserver.exe?

Sim, tanto é que no gerenciador de tarefas, está o processo “Firebird SQL Server (32 Bits)”!

O Firebird está rodando, porém ele não aparece no Painel de Controle no meu Windows 10;

Faz uma verificação no banco de dados Gfix/Gbak.

e no services.msc você possui os serviços “FirebirdGuardianDefaultInstance” e “FirebirdServerDefaultInstance” rodando?

experimente parar o serviço dos dois e reiniciar.

Verificando aqui, somente existe 1 serviço rodando e ativo chamado Firebird Server - DefaultInstance!

Então, parei o serviço, iniciei manualmente, conectei no ibexpert, e quando fui tentar rodar pelo netbeans, o mesmo erro apareceu;

org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544344. I/O error during “CreateFile (open)” operation for file "C:\SIS-DB\DATABASE_DEV30.FDB"
Error while trying to open file
null
at org.firebirdsql.jdbc.FBDataSource.getConnection(FBDataSource.java:120)
at org.firebirdsql.jdbc.AbstractDriver.connect(AbstractDriver.java:136)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:247)
at DataBase.Conexao.conect(Conexao.java:63)
at moduloPrincipal.frmMain.ValidaConexao(frmMain.java:164)
at moduloPrincipal.frmMain.ValidaConexaoDataBase(frmMain.java:134)
at moduloPrincipal.frmMain.formComponentShown(frmMain.java:549)
at moduloPrincipal.frmMain.access$100(frmMain.java:43)
at moduloPrincipal.frmMain$2.componentShown(frmMain.java:397)
at java.awt.AWTEventMulticaster.componentShown(AWTEventMulticaster.java:179)
at java.awt.Component.processComponentEvent(Component.java:6367)
at java.awt.Component.processEvent(Component.java:6315)
at java.awt.Container.processEvent(Container.java:2236)
at java.awt.Window.processEvent(Window.java:2029)
at java.awt.Component.dispatchEventImpl(Component.java:4891)
at java.awt.Container.dispatchEventImpl(Container.java:2294)
at java.awt.Window.dispatchEventImpl(Window.java:2750)
at java.awt.Component.dispatchEvent(Component.java:4713)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.awt.EventQueue$4.run(EventQueue.java:729)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

o Firebird guardian serve apenas para manter o Firebird Server sempre on line, se ele cair o Firebird Guardian o reconecta.

talvez não seja este seu problema mas vale apena testar. verifica se na pasta do firebird localizada no caminho

C:\Program Files\Firebird\Firebird_2_5\bin

onde Firebird_2_5, é a sua versão do firebird ativa, na pasta bin existe um fbguard.exe, execute ele e verifique o servico se foi iniciado. e teste o programa novamente.

Validei o banco de dados com gfix -v(alidade) - fu(ll) e obtive o retorno:
Summary of validation errors
Number of record level warnings : 1

Refetente ao fbGuard.exe, não achei mais este “exe” na versão 3 do Firebird!

Então se o gfix retornou erro pode ser um erro no banco de dados que está te atrapalhando faça o GBAK para corrigir o erro.

Incrível é que este banco de dados foi criado a poucos instantes… com uma tabela testes e 3 colunas dentro dessa table…

Nesse caso, não deveria dar esse tipo de coisa! (pois é algo muito simples)