我们正在尝试使用Java 8 spring应用程序打开一个连接到存储在某个file.gdb上的远程服务器上的旧版interbase数据库。 interclient.jar(interbase jdbc驱动程序)是通过从embarcadero interbase开发人员版本中提取的SDK \ lib文件夹获得的。
我们的application.properties:
spring.jpa.database-platform=org.hibernate.dialect.InterbaseDialect
spring.datasource.username=sysdba
spring.datasource.password=masterkey
spring.datasource.driver-class-name=interbase.interclient.Driver
spring.datasource.url=jdbc:interbase://192.168.1.100:3050/d:/test.gdb
我们从远程主机获取此异常(在本地尝试使用'localhost'):
2015-01-20 18:45:32.628 ERROR 8880 --- [ main] o.h.h.spi.PersistentTableBulkIdStrategy : Unable obtain JDBC Connection
interbase.interclient.UnlicensedComponentException: [interclient] Unlicensed component: This version of InterClient refuses communication with InterBase version WI-V7.5.1.80/tcp (Merav28-Srv)/P14.
See API reference for exception interbase.interclient.UnlicensedComponentException
at interbase.interclient.Connection.remote_ATTACH_DATABASE(Unknown Source)
at interbase.interclient.Connection.connect(Unknown Source)
at interbase.interclient.Connection.<init>(Unknown Source)
at interbase.interclient.Driver.connect(Unknown Source)
at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:278)
at org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:182)
at org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:701)
at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:635)
at org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:486)
at org.apache.tomcat.jdbc.pool.ConnectionPool.<init>(ConnectionPool.java:144)
at org.apache.tomcat.jdbc.pool.DataSourceProxy.pCreatePool(DataSourceProxy.java:116)
at org.apache.tomcat.jdbc.pool.DataSourceProxy.createPool(DataSourceProxy.java:103)
at org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:127)
at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:139)
at org.hibernate.internal.SessionFactoryImpl$2.obtainConnection(SessionFactoryImpl.java:606)
at org.hibernate.hql.spi.PersistentTableBulkIdStrategy.exportTableDefinitions(PersistentTableBulkIdStrategy.java:138)
at org.hibernate.hql.spi.PersistentTableBulkIdStrategy.prepare(PersistentTableBulkIdStrategy.java:104)
at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:506)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1857)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:850)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:843)
at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.withTccl(ClassLoaderServiceImpl.java:399)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:842)
at org.hibernate.jpa.HibernatePersistenceProvider.createContainerEntityManagerFactory(HibernatePersistenceProvider.java:150)
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:336)
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:318)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1612)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1549)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:973)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:750)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:120)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:648)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:311)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:909)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:898)
at com.supersmart.prices.mazon.data.jpa.SampleDataJpaApplication.main(SampleDataJpaApplication.java:30)
我们将非常感谢能够以编程方式为此interbase实例打开连接的任何解决此问题的帮助。
答案 0 :(得分:3)
所以最终我们最终使用jaybird legacy 1.5驱动程序来连接interbase 7.5.80数据库服务器,它可以满足我们的需求。
如果它可以帮助任何人,你可以在这里抓住传统的罐子: http://sourceforge.net/projects/firebird/files/firebird-jca-jdbc-driver/