HikariCP捕获异常:com.zaxxer.hikari.pool.HikariPool $ PoolInitializationException:初始化池失败:null

时间:2016-11-25 13:42:41

标签: java spring

当我尝试集成spring 3.2.3 + HikariCP 2.4.7 + jdk7 + oracle 11g时,我遇到了类似“com.zaxxer.hikari.pool.HikariPool $ PoolInitializationException:初始化pool:null失败”的问题。有没有人解决过这个问题?请给我帮助,提前谢谢!

    <dependency>
        <groupId>com.oracle</groupId>
        <artifactId>ojdbc6</artifactId>
        <version>11.2.0</version>
    </dependency>

    <dependency>
        <groupId>com.zaxxer</groupId>
        <artifactId>HikariCP</artifactId>
        <version>2.4.7</version>
    </dependency>

<bean id="dataSource" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
    <property name="jdbcUrl" value="${jdbc.url}"/>
    <property name="username" value="${jdbc.username}"/>
    <property name="password" value="${jdbc.password}"/>
    <property name="maximumPoolSize" value="200"/>
    <property name="minimumIdle" value="10"/>
    <property name="connectionTimeout" value="30000"/>
    <property name="idleTimeout" value="600000"/>
    <property name="maxLifetime" value="1800000"/>
    <property name="dataSourceProperties">
        <props>
            <prop key="cachePrepStmts">true</prop>
            <prop key="prepStmtCacheSize">250</prop>
            <prop key="prepStmtCacheSqlLimit">2048</prop>
            <prop key="useServerPrepStmts">true</prop>
        </props>
    </property>
</bean>

0 个答案:

没有答案