开发者社区> 问答> 正文

在weblogic下用druid连接池,查询操作出错!? 400 报错

在weblogic下用druid连接池,查询操作出错!? 400 报错

@wenshao 你好,想跟你请教个问题:单纯的一个查询出错现象!

1:出错环境:weblogic + mybatis3+jdk1.6

2:其他:【在其他web服务器(tomcat\jboss\jetty等)没有错误信息】

3:Debug跟踪出错地方,com.alibaba.druid.util.OracleUtils.enterImplicitCache();且oracleStmt不为空

    public static void enterImplicitCache(PreparedStatement stmt) throws SQLException {
        oracle.jdbc.internal.OraclePreparedStatement oracleStmt = unwrapInternal(stmt);
        if (oracleStmt != null) {
            oracleStmt.enterImplicitCache();
        }
    }

4:  出错信息

ERROR 20140714 15:30:46 [com.alibaba.druid.util.JdbcUtils:93] -
     [LOG] close statement error
java.lang.NullPointerException
        at oracle.jdbc.driver.PhysicalConnection.cacheBuffer(PhysicalConnection.java:6811)
        at oracle.jdbc.driver.OraclePreparedStatement.releaseBuffers(OraclePreparedStatement.java:3012)
        at oracle.jdbc.driver.T4CPreparedStatement.releaseBuffers(T4CPreparedStatement.java:241)
        at oracle.jdbc.driver.OraclePreparedStatement.enterImplicitCache(OraclePreparedStatement.java:3094)
        at oracle.jdbc.driver.OraclePreparedStatementWrapper.enterImplicitCache(OraclePreparedStatementWrapper.java:1588)
        at com.alibaba.druid.util.OracleUtils.enterImplicitCache(OracleUtils.java:65)
        at com.alibaba.druid.pool.PreparedStatementPool.put(PreparedStatementPool.java:83)
        at com.alibaba.druid.pool.DruidPooledConnection.closePoolableStatement(DruidPooledConnection.java:165)
        at com.alibaba.druid.pool.DruidPooledPreparedStatement.close(DruidPooledPreparedStatement.java:188)
        at com.alibaba.druid.util.JdbcUtils.close(JdbcUtils.java:91)
        at com.alibaba.druid.pool.DruidConnectionHolder.reset(DruidConnectionHolder.java:200)
        at com.alibaba.druid.pool.DruidDataSource.recycle(DruidDataSource.java:925)
        at com.alibaba.druid.pool.DruidPooledConnection.recycle(DruidPooledConnection.java:298)
        at com.alibaba.druid.pool.DruidPooledConnection.syncClose(DruidPooledConnection.java:278)
        at com.alibaba.druid.pool.DruidPooledConnection.close(DruidPooledConnection.java:235)
        at org.springframework.jdbc.datasource.DataSourceUtils.doReleaseConnection(DataSourceUtils.java:333)
        at org.springframework.jdbc.datasource.DataSourceUtils.releaseConnection(DataSourceUtils.java:294)
        at org.mybatis.spring.transaction.SpringManagedTransaction.close(SpringManagedTransaction.java:122)
        at org.apache.ibatis.executor.BaseExecutor.close(BaseExecutor.java:87)
        at org.apache.ibatis.executor.CachingExecutor.close(CachingExecutor.java:65)
        at org.apache.ibatis.session.defaults.DefaultSqlSession.close(DefaultSqlSession.java:205)
        at org.mybatis.spring.SqlSessionUtils.closeSqlSession(SqlSessionUtils.java:172)
        at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:372)
        at $Proxy94.selectList(Unknown Source)
        at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:195)
 


 

展开
收起
爱吃鱼的程序员 2020-05-30 22:03:26 714 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    补充:换了Tomcat JDBC,在weblogic下运行,结果正常的

    ######这是关闭连接时的异常,不影响业务,其他的连接池只是不打log而已######

    wenshao,您好,非常感谢您的回复!

    再请教下,什么情况下会出现这情况的.

    我查看结果: 关闭statment才有,接着关闭connention是正常的。

    同样的配置,我放到Jetty,Jboss,Tomcat 下,都没打这个log

    2020-05-30 22:03:26
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载