• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

org.hibernate.exception.GenericJDBCException: Cannot release connection at org.hibernate.exception.

 
nitss bhavsar
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,while executing testcase getting exception like


org.hibernate.exception.GenericJDBCException: Cannot release connection
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
at com.j2fe.hibernate.SQLExceptionConverter.convert(SQLExceptionConverter.java:38)
at com.j2fe.hibernate.OracleDialect$OracleExceptionConverter.convert(OracleDialect.java:54)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
at org.hibernate.jdbc.ConnectionManager.closeConnection(ConnectionManager.java:453)
at org.hibernate.jdbc.ConnectionManager.cleanup(ConnectionManager.java:383)
at org.hibernate.jdbc.ConnectionManager.close(ConnectionManager.java:322)
at org.hibernate.impl.SessionImpl.close(SessionImpl.java:298)
at com.j2fe.logging.DBLogger.deleteLog(DBLogger.java:1603)
at com.j2fe.logging.DBLogger.deleteLogSimple(DBLogger.java:535)
at com.j2fe.logging.TestDBLogger.testDeleteLogSimple(TestDBLogger.java:543)
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 junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: java.sql.SQLException: Protocol violation
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:479)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:193)
at oracle.jdbc.driver.T4C7Ocommoncall.doOLOGOFF(T4C7Ocommoncall.java:59)
at oracle.jdbc.driver.T4CConnection.logoff(T4CConnection.java:593)
at oracle.jdbc.driver.PhysicalConnection.close(PhysicalConnection.java:5094)
at sun.reflect.GeneratedMethodAccessor62.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.j2fe.database.OracleXADataSource$ReflectionHandler.invoke(OracleXADataSource.java:795)
at com.j2fe.database.OracleXADataSource$WrappedConnection.invoke(OracleXADataSource.java:737)
at $Proxy1.close(Unknown Source)
at org.hibernate.connection.DatasourceConnectionProvider.closeConnection(DatasourceConnectionProvider.java:74)
at org.hibernate.jdbc.ConnectionManager.closeConnection(ConnectionManager.java:449)
... 24 more

how to resolve this??
thanks in advance.
 
Bill Gorder
Bartender
Posts: 1682
7
Android IntelliJ IDE Linux Mac OS X Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you sure you are using the correct JDBC drivers?
 
nitss bhavsar
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes,its correct....
 
Bill Gorder
Bartender
Posts: 1682
7
Android IntelliJ IDE Linux Mac OS X Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Is this an XA datasource? That is an important detail to mention. Check your configuration both in your container and your datasource configuration in your hibernate configuration. You probably have something set up incorrectly.
 
nitss bhavsar
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi Bill,
Thanks for your response.
resolved this by updating Java version from 1.6.0.17 to 1.6.0.35.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic