oracle11g2+logback+druid报错,更换连接池

前端之家收集整理的这篇文章主要介绍了oracle11g2+logback+druid报错,更换连接池前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

pom.xml

<dependency>
   <groupId>ojdbc6</groupId>
   <artifactId>oracle</artifactId>
   <version>11.2.0.1.0</version>
  </dependency>
  <dependency>
   <groupId>org.slf4j</groupId>
   <artifactId>slf4j-api</artifactId>
   <version>1.7.12</version>
  </dependency>
  <dependency>
   <groupId>org.slf4j</groupId>
   <artifactId>jcl-over-slf4j</artifactId>
   <version>1.7.12</version>
  </dependency>
  <dependency>
   <groupId>ch.qos.logback</groupId>
   <artifactId>logback-core</artifactId>
   <version>1.2.3</version>
  </dependency>
  <dependency>
   <groupId>ch.qos.logback</groupId>
   <artifactId>logback-classic</artifactId>
   <version>1.2.3</version>
  </dependency>
  <dependency>
    <groupId>com.googlecode.log4jdbc</groupId>
    <artifactId>log4jdbc</artifactId>
    <version>1.2</version>
  </dependency>

   <dependency>
     <groupId>com.zaxxer</groupId>
     <artifactId>HikariCP-java6</artifactId>
     <version>2.3.13</version>
   </dependency>

报错信息如下:

  1. #log4jdbc+druid不能连接数据,log4jdbc会从oracle.jar包里搜索出两个驱动类,druid不认报错:not support oracle driver 1.0
    #17:10:51.826 [main] DEBUG log4jdbc.debug.debug -   FOUND DRIVER oracle.jdbc.OracleDriver
    #17:10:51.827 [main] DEBUG log4jdbc.debug.debug -   FOUND DRIVER oracle.jdbc.driver.OracleDriver
    #17:10:51.838 [main] DEBUG log4jdbc.debug.debug - ... log4jdbc initialized! ...

    尝试更换为号称为最快的连接池HikariCp,好使。旧项目使用的jdk是1.6,故用2.3.13版本

原文链接:https://www.f2er.com/oracle/208529.html

猜你在找的Oracle相关文章