Java + Firebird

26/03/2013

1

Olá pessoal,

estou fazendo uma aplicação com firebird 2.5.2. Estou tentando criar um Pool de conexão no glassfish 3.1.2.
utilizei este tutorial para criação deste pool
[url]http://mariosgaee.blogspot.com.br/2009/12/firebird-connection-pool-in-glassfish.html[/url]


porém me apresenta o seguinte erro:

Grave: RestResponse.getResponse() dá FAILURE. endpoint = 'http://localhost:4848/management/domain/resources/ping-connection-pool.json'; attrs = '{id=firebird/sax}'
Grave: Exceção ao executar comando: java.lang.NoClassDefFoundError: Could not initialize class org.firebirdsql.gds.impl.GDSType
java.lang.NoClassDefFoundError: Could not initialize class org.firebirdsql.gds.impl.GDSType
	at org.firebirdsql.pool.AbstractFBConnectionPoolDataSource.getManagedConnectionFactory(AbstractFBConnectionPoolDataSource.java:230)
	at org.firebirdsql.pool.AbstractFBConnectionPoolDataSource.allocateConnection(AbstractFBConnectionPoolDataSource.java:272)
	at org.firebirdsql.pool.PooledConnectionQueue.addConnection(PooledConnectionQueue.java:490)
	at org.firebirdsql.pool.PooledConnectionQueue.take(PooledConnectionQueue.java:375)
	at org.firebirdsql.pool.AbstractConnectionPool.getPooledConnection(AbstractConnectionPool.java:230)
	at org.firebirdsql.pool.AbstractFBConnectionPoolDataSource.getPooledConnection(AbstractFBConnectionPoolDataSource.java:359)
	at org.firebirdsql.pool.AbstractFBConnectionPoolDataSource.getPooledConnection(AbstractFBConnectionPoolDataSource.java:379)
	at org.firebirdsql.pool.sun.AppServerConnectionPoolDataSource.getPooledConnection(AppServerConnectionPoolDataSource.java:63)
	at com.sun.gjc.spi.CPManagedConnectionFactory.createManagedConnection(CPManagedConnectionFactory.java:133)
	at com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.getUnpooledConnection(ConnectorConnectionPoolAdminServiceImpl.java:697)
	at com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.testConnectionPool(ConnectorConnectionPoolAdminServiceImpl.java:426)
	at com.sun.enterprise.connectors.ConnectorRuntime.pingConnectionPool(ConnectorRuntime.java:1086)
	at org.glassfish.connectors.admin.cli.PingConnectionPool.execute(PingConnectionPool.java:130)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:363)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1085)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1291)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1259)
	at org.glassfish.admin.rest.ResourceUtil.runCommand(ResourceUtil.java:214)
	at org.glassfish.admin.rest.resources.TemplateExecCommand.executeCommand(TemplateExecCommand.java:127)
	at org.glassfish.admin.rest.resources.TemplateCommandGetResource.processGet(TemplateCommandGetResource.java:78)
	at sun.reflect.GeneratedMethodAccessor776.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
	at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)
	at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
	at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288)
	at com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:134)
	at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
	at com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:134)
	at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
	at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
	at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
	at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
	at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1469)
	at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1400)
	at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349)
	at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339)
	at com.sun.jersey.server.impl.container.grizzly.GrizzlyContainer._service(GrizzlyContainer.java:182)
	at com.sun.jersey.server.impl.container.grizzly.GrizzlyContainer.service(GrizzlyContainer.java:147)
	at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:148)
	at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179)
	at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
	at com.sun.enterprise.v3.services.impl.ContainerMapper$Hk2DispatcherCallable.call(ContainerMapper.java:354)
	at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
	at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860)
	at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757)
	at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056)
	at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229)
	at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
	at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
	at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
	at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
	at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
	at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
	at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
	at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
	at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
	at java.lang.Thread.run(Thread.java:722)



alguém poderia me ajudar!!!

grato.
Responder

Posts

02/04/2013

Singular Ti

Será que ninguém sabe como fazer o java conversar com o firebird ??? Alguem pode me dar uma mão??
Responder

02/04/2013

Rafael Cunha

Tenta colocar a lib da sua conxão em "C:\glassfish3\glassfish\domains\Domain\lib\"
Responder

02/04/2013

Singular Ti

ola Rafael, eu ja coloquei, mas mesmo assim aparece este erro
Responder

02/04/2013

Rafael Cunha

Depois de colocar o java tem q reiniciar o servidor senão ele não reconhece.
Responder

02/04/2013

Singular Ti

Olá Rafael obrigado pela ajuda....
o problema era que o glassfish estava em complito com algum arquivo do jaybird full 2.2.2

eu reinstalei o glassfish e utilizei o o jaybird full 2.1.6

seguindo este tutorial
[url]http://h-acosta.blogspot.com.br/2011/11/how-to-create-jdbc-connection-pools.html [/url]

porém alterei o
Datasource Classname para este
org.firebirdsql.jdbc.FBWrappingDataSource

Responder

02/04/2013

Singular Ti

Problema resolvido... Obrigado!!
Responder

24/07/2013

José

Já que a duvida inicial foi sanada, estou dando este tópico por concluído.
Obrigado pela participação de todos e fiquem a vontade para abrir novos tópicos.
Responder
×
+1 DevUP
Acesso diário, +1 DevUP
Parabéns, você está investindo na sua carreira