The moose likes Spring and the fly likes Could not commit JDBC transaction; nested exception is java.sql.SQLException Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Application Frameworks » Spring
Reply Bookmark "Could not commit JDBC transaction; nested exception is java.sql.SQLException" Watch "Could not commit JDBC transaction; nested exception is java.sql.SQLException" New topic
Author

Could not commit JDBC transaction; nested exception is java.sql.SQLException

nalamati satyanarayana
Ranch Hand

Joined: Dec 16, 2005
Posts: 36

I am getting the followinh exception while committing the transaction
org.springframework.transaction.TransactionSystemException: Could not commit JDBC transaction; nested exception is java.sql.SQLException: I/O Error: DB server closed connection.
at org.springframework.jdbc.datasource.DataSourceTransactionManager.doCommit(DataSourceTransactionManager.java:270)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:754)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:723)
at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:374)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:120)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at $Proxy4.importData(Unknown Source)
at com.intervoice.cc.tools.dbexport.TestSample.importData(TestSample.java:105)
at com.intervoice.cc.tools.dbexport.TestSample.main(TestSample.java:204)
Caused by: java.sql.SQLException: I/O Error: DB server closed connection.
at net.sourceforge.jtds.jdbc.TdsCore.executeSQL(TdsCore.java:1053)
at net.sourceforge.jtds.jdbc.TdsCore.submitSQL(TdsCore.java:899)
at net.sourceforge.jtds.jdbc.ConnectionJDBC2.commit(ConnectionJDBC2.java:2094)
at org.apache.commons.dbcp.DelegatingConnection.commit(DelegatingConnection.java:238)
at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.commit(PoolingDataSource.java:199)
at org.springframework.jdbc.datasource.DataSourceTransactionManager.doCommit(DataSourceTransactionManager.java:267)
... 11 more
Caused by: java.io.IOException: DB server closed connection.
at net.sourceforge.jtds.jdbc.SharedSocket.readPacket(SharedSocket.java:848)
at net.sourceforge.jtds.jdbc.SharedSocket.sendNetPacket(SharedSocket.java:662)
at net.sourceforge.jtds.jdbc.RequestStream.putPacket(RequestStream.java:560)
at net.sourceforge.jtds.jdbc.RequestStream.flush(RequestStream.java:508)
at net.sourceforge.jtds.jdbc.TdsCore.executeSQL(TdsCore.java:1040)
... 16 more
2010-08-12 14:17:45,861 ERROR (TestSample.java:195) - Exception while executing the main class Could not commit JDBC transaction; nested exception is java.sql.SQLException: I/O Error: DB server closed connection.
Raghu Devatha
Ranch Hand

Joined: Feb 10, 2009
Posts: 31
Can you make sure your connection is established and you are not closing it before the statement is executed.
It is little difficult to find the cause of the problem with the input you provided.


dR
 
 
subject: Could not commit JDBC transaction; nested exception is java.sql.SQLException
 
Threads others viewed
Deadlock problems with Hibernate/Spring/MS-SQL
SQL Error suring server startup
java.sql.BatchUpdateException: IO Error: Socket read timed out error
Need help with JNDI connection to tomcat
java.sql.SQLException: I/O Error: DB server closed connection.
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com