tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Propes, Barry L " <barry.l.pro...@citi.com>
Subject RE: Error in DBCP Connection Pool with tomcat 6.x
Date Tue, 01 Jul 2014 14:09:22 GMT


-----Original Message-----
From: Vijendra Pachoriya [mailto:Vijendra.Pachoriya@indegene.com] 
Sent: Tuesday, July 01, 2014 2:31 AM
To: users@tomcat.apache.org
Cc: Alok Roy
Subject: Error in DBCP Connection Pool with tomcat 6.x

Hi Tomcat Team,

Please help me out in solving below error.

Below is the details :

================Configuration in my context.xml============================


<Resource name="jdbc/ABC"
        auth="Container"
        type="javax.sql.DataSource"
        maxActive="50"
        maxIdle="10"
        maxWait="10000"
        username="ABC"
        password="ABC"
        removeAbandoned="true"
        logAbandoned="true"
        testOnBorrow="true"
        testWhileIdle="true"
        timeBetweenEvictionRunsMillis="30000"
        validationQuery="SELECT 1 FROM dual"
        driverClassName="oracle.jdbc.driver.OracleDriver"
        url="jdbc:oracle:thin:@MY_DB" />


==========================Error Message ============================================

at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:705)
        at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:898)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
        at java.lang.Thread.run(Thread.java:679)
Caused by: org.springframework.transaction.TransactionSystemException: Could not roll back
JPA transaction; nested exception is javax.persistence.PersistenceException: unexpected error
when rollbacking
        at org.springframework.orm.jpa.JpaTransactionManager.doRollback(JpaTransactionManager.java:486)
        at org.springframework.transaction.support.AbstractPlatformTransactionManager.processRollback(AbstractPlatformTransactionManager.java:800)
        at org.springframework.transaction.support.AbstractPlatformTransactionManager.rollback(AbstractPlatformTransactionManager.java:777)
        at org.springframework.transaction.interceptor.TransactionAspectSupport.completeTransactionAfterThrowing(TransactionAspectSupport.java:339)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
        at sun.proxy.$Proxy185.selectPharmaUser(Unknown Source)
        at com.aptilon.axcelrx.server.service.impl.AuthenticationServiceImpl.login(AuthenticationServiceImpl.java:170)
        at com.aptilon.axcelrx.server.ws.endpoint.AuthenticationEndpoint.login_aroundBody0(AuthenticationEndpoint.java:110)
        ... 45 more
Caused by: javax.persistence.PersistenceException: unexpected error when rollbacking
        at org.hibernate.ejb.TransactionImpl.rollback(TransactionImpl.java:88)
        at org.springframework.orm.jpa.JpaTransactionManager.doRollback(JpaTransactionManager.java:482)
        ... 54 more
Caused by: org.hibernate.exception.GenericJDBCException: Cannot release connection
        at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:126)
        at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:114)
        at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
        at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:52)
        at org.hibernate.jdbc.ConnectionManager.closeConnection(ConnectionManager.java:478)
        at org.hibernate.jdbc.ConnectionManager.aggressiveRelease(ConnectionManager.java:429)
        at org.hibernate.jdbc.ConnectionManager.afterTransaction(ConnectionManager.java:316)
        at org.hibernate.jdbc.JDBCContext.afterTransactionCompletion(JDBCContext.java:248)
        at org.hibernate.transaction.JDBCTransaction.rollback(JDBCTransaction.java:208)
        at org.hibernate.ejb.TransactionImpl.rollback(TransactionImpl.java:85)
        ... 55 more
Caused by: java.sql.SQLException: Already closed.
        at org.apache.tomcat.dbcp.dbcp.PoolableConnection.close(PoolableConnection.java:114)
        at org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.close(PoolingDataSource.java:191)
        at org.hibernate.connection.DatasourceConnectionProvider.closeConnection(DatasourceConnectionProvider.java:97)
        at org.hibernate.jdbc.ConnectionManager.closeConnection(ConnectionManager.java:474)
        ... 60 more


===========================================================================

Your help in this regard is highly appreciated.


Thanks & Regards,
Vijendra


-----------
I've also got these attributes in my xml file, FWIW.

name="jdbc/myoracle"
timeBetweenEvictionRunsMillis="-1"   (you show 30000) - I think I had to move it to this to
avoid some faulty issue, per Konstantin
minEvictableIdleTimeMillis="28800"
removeAbandonedTimeout="300"
    logAbandoned="false"


I say this, because I, too, was using a Tomcat 6.x version - 6.0.29 to be exact.

On the surface it looks like some error is occurring during the commit, and then trying to
roll back, but then your connection is maybe closing before it can roll back?

HTH,

Barry







---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message