HikariCP初始化错误

时间:2015-08-14 12:38:02

标签: java spring-boot hikaricp

我有一个我管理的网络应用程序,它是一个使用HikariCP的弹簧启动应用程序,具有以下配置

@Bean(name = "DS")
    public DataSource datasource() throws IOException {
        final HikariDataSource ds = new HikariDataSource();
        ds.setDriverClassName(datasourceDriverClassName);
        ds.setJdbcUrl(datasourceUrl);
        ds.setUsername(datasourceUsername);
        ds.setPassword(getSecurePassword());
        ds.setMaximumPoolSize(maxPoolSize);  
        ds.setMetricRegistry(metricRegistry);
        return ds;
    }

问题是这在我的开发机器上工作正常但是当我部署到某些服务器时,我得到了

com.zaxxer.hikari.HikariDataSource                      | HikariCP pool HikariPool-1 is starting. 
2015-08-14 13:22:13,203  INFO | http-nio-7070-exec-5 | com.zaxxer.hikari.pool.HikariPool                       | HikariCP pool HikariPool-1 is shutting down. 
2015-08-14 13:22:13,203 DEBUG | http-nio-7070-exec-5 | o.s.w.s.m.m.a.ExceptionHandlerExceptionResolver         | Resolving exception from handler [public java.util.List<com.model.Transaction> com.api.TransactionApi.search(java.lang.String,java.lang.String,java.lang.Double,java.util.Date,java.util.Date,int,int) throws com.exceptions.AppServiceException]: com.zaxxer.hikari.pool.PoolInitializationException: Exception during pool initialization 
2015-08-14 13:22:13,203 DEBUG | http-nio-7070-exec-5 | o.s.beans.factory.support.DefaultListableBeanFactory    | Returning cached instance of singleton bean 'apiAdvice' 
         | com.zaxxer.hikari.pool.PoolInitializationException: Exception during pool initialization 

我尝试连接到不同的数据库服务器,但有些工作正常,而它对我尝试的大多数数据库服务器都不起作用。

数据库服务器是MS SQLSERVER 2014。

由于

0 个答案:

没有答案