2
回答
druid+oracle对于validationQueryd 支持
终于搞明白,存储TCO原来是这样算的>>>   

@wenshao 你好,想跟你请教个问题:

在用druid+oracle时,出现这样一个问题,应用访问正常,但是后台确报连接池关闭错误,下面是堆栈信息,如果你也遇到这样的问题,麻烦告诉我你的解决思路,感谢。


close connection error
java.sql.SQLRecoverableException: Io 异常: Broken pipe
               at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:101)
               at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133)
               at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:199)
               at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:263)
               at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:521)
               at oracle.jdbc.driver.T4CConnection.logoff(T4CConnection.java:500)
               at oracle.jdbc.driver.PhysicalConnection.close(PhysicalConnection.java:3509)
               at com.alibaba.druid.filter.FilterChainImpl.connection_close(FilterChainImpl.java:169)
               at com.alibaba.druid.filter.stat.StatFilter.connection_close(StatFilter.java:254)
               at com.alibaba.druid.filter.FilterChainImpl.connection_close(FilterChainImpl.java:165)
               at com.alibaba.druid.proxy.jdbc.ConnectionProxyImpl.close(ConnectionProxyImpl.java:115)
               at com.alibaba.druid.util.JdbcUtils.close(JdbcUtils.java:82)
               at com.alibaba.druid.pool.DruidDataSource.discardConnection(DruidDataSource.java:969)
               at com.alibaba.druid.pool.DruidDataSource.getConnectionDirect(DruidDataSource.java:936)
               at com.alibaba.druid.filter.FilterChainImpl.dataSource_connect(FilterChainImpl.java:4544)
               at com.alibaba.druid.filter.stat.StatFilter.dataSource_getConnection(StatFilter.java:661)
               at com.alibaba.druid.filter.FilterChainImpl.dataSource_connect(FilterChainImpl.java:4540)
               at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:882)
               at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:874)
               at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:97)
               at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:113)
               at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:79)
               at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:577)
               at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:641)
               at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:670)
               at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:678)
               at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:721)
               at com.cmbchina.cc.framework.jdbc.JdbcDaoSupport.queryForObject(Unknown Source)
               at com.cmbchina.cc.pms.dao.impl.MgRoleUserDaoImpl.getUserMgRole(MgRoleUserDaoImpl.java:75)
               at com.cmbchina.cc.pms.service.impl.ManagerRoleServiceImpl.getUsersValidMgRole(ManagerRoleServiceImpl.java:411)
               at sun.reflect.GeneratedMethodAccessor271.invoke(Unknown Source)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
               at java.lang.reflect.Method.invoke(Method.java:597)
               at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
               at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
               at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
               at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
               at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
               at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
               at com.sun.proxy.$Proxy18.getUsersValidMgRole(Unknown Source)
               at com.cmbchina.cc.pms.web.action.OrganizationAction.getUserMgRoleDto(OrganizationAction.java:1181)
               at com.cmbchina.cc.pms.web.action.OrganizationAction.main(OrganizationAction.java:89)
               at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
               at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
               at java.lang.reflect.Method.invoke(Method.java:597)
               at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:440)
               at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:279)
               at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:242)
               at com.cmbchina.cc.json.plugin.JSONInterceptor.intercept(Unknown Source)
               at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
               at com.cmbchina.cc.security.authorization.web.WebAccessAuthorizeInterceptor.intercept(WebAccessAuthorizeInterceptor.java:261)
               at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
               at com.cmbchina.cc.security.authentication.web.UserValidateInterceptor.doIntercept(UserValidateInterceptor.java:151)
               at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
               at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
               at com.cmbchina.cc.framework.web.interceptor.ExceptionInterceptor.intercept(Unknown Source)
               at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
               at com.cmbchina.cc.framework.web.interceptor.EncodingInterceptor.intercept(Unknown Source)
               at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
               at com.cmbchina.cc.framework.web.interceptor.Timer2Interceptor.intercept(Unknown Source)
               at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
               at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
               at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:468)
               at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
               at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:76)
               at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
               at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
               at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
               at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
               at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153)
               at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)
               at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
               at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
               at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)
               at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
               at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)
               at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)
               at java.lang.Thread.run(Thread.java:662)
Caused by: java.net.SocketException: Broken pipe
               at java.net.SocketOutputStream.socketWrite0(Native Method)
               at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
               at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
               at oracle.net.ns.DataPacket.send(DataPacket.java:150)
               at oracle.net.ns.NetOutputStream.flush(NetOutputStream.java:180)
               at oracle.net.ns.NetInputStream.getNextPacket(NetInputStream.java:169)
               at oracle.net.ns.NetInputStream.read(NetInputStream.java:117)
               at oracle.net.ns.NetInputStream.read(NetInputStream.java:92)
               at oracle.net.ns.NetInputStream.read(NetInputStream.java:77)
               at oracle.jdbc.driver.T4CMAREngine.unmarshalUB1(T4CMAREngine.java:1034)
               at oracle.jdbc.driver.T4CMAREngine.unmarshalSB1(T4CMAREngine.java:1010)
               at oracle.jdbc.driver.T4C7Ocommoncall.receive(T4C7Ocommoncall.java:97)
               at oracle.jdbc.driver.T4CConnection.logoff(T4CConnection.java:487)
       ... 73 more


举报
顶部