We are getting below exception “java.sql.SQLRecoverableException: Closed Connection” error on JBoss instance.
Error log:
*********************************************************************************
Servlet.service() for servlet WebApp threw exception: java.sql.SQLRecoverableException: Closed Connection
at oracle.jdbc.driver.PhysicalConnection.commit(PhysicalConnection.java:3817) [ojdbc6.jar:11.2.0.2.0]
at oracle.jdbc.driver.PhysicalConnection.commit(PhysicalConnection.java:3857) [ojdbc6.jar:11.2.0.2.0]
at org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnection.jdbcCommit(BaseWrapperManagedConnection.java:986)
at org.jboss.jca.adapters.jdbc.WrappedConnection.commit(WrappedConnection.java:757)
at org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.doCommit(JdbcTransaction.java:112) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.commit(AbstractTransactionImpl.java:178) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.springframework.orm.hibernate4.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:554) [spring-orm-3.2.5.RELEASE.jar:3.2.5.RELEASE]
at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:755) [spring-tx-3.2.5.RELEASE.jar:3.2.5.RELEASE]
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:724) [spring-tx-3.2.5.RELEASE.jar:3.2.5.RELEASE]
at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:475) [spring-tx-3.2.5.RELEASE.jar:3.2.5.RELEASE]
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:270) [spring-tx-3.2.5.RELEASE.jar:3.2.5.RELEASE]
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94) [spring-tx-3.2.5.RELEASE.jar:3.2.5.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) [spring-aop-3.2.5.RELEASE.jar:3.2.5.RELEASE]
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:631) [spring-aop-3.2.5.RELEASE.jar:3.2.5.RELEASE]
at
*********************************************************************************
What is java.sql.SQLRecoverableException: Closed Connection?
Above exception is due to one of these reasons this may due to the lower version of Oracle [ojdbc6.jar], network issue, firewall timeout configuration or database timeout.
The timeout should properly check or configured in JBoss, the value must be greater than 0 but less than timeout has been used in a database, network firewall, etc.
But as per my case, Oracle [ojdbc6.jar] is lower version as per database server required.
How to check ODJBC.jar version using the command line?
Command: java -jar ojdbc6.jar -version
Solution: We should use the same Oracle database JDBC driver version as per the database version.
No comments:
Post a Comment