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

tonywen710 发布于 2014/07/14 15:50
阅读 2K+
收藏 0

@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)
 


 

加载中
0
tonywen710
tonywen710

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

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

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

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

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

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

返回顶部
顶部