File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Object Relational Mapping and the fly likes org.hibernate.exception.GenericJDBCException: Cannot release connection 	at org.hibernate.exception. Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Reply Bookmark "org.hibernate.exception.GenericJDBCException: Cannot release connection 	at org.hibernate.exception." Watch "org.hibernate.exception.GenericJDBCException: Cannot release connection 	at org.hibernate.exception." New topic
Author

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

nitss bhavsar
Ranch Hand

Joined: Jan 09, 2012
Posts: 55
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

Joined: Mar 07, 2010
Posts: 1282

Are you sure you are using the correct JDBC drivers?


[How To Ask Questions][Read before you PM me]
nitss bhavsar
Ranch Hand

Joined: Jan 09, 2012
Posts: 55
yes,its correct....
Bill Gorder
Bartender

Joined: Mar 07, 2010
Posts: 1282



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

Joined: Jan 09, 2012
Posts: 55

Hi Bill,
Thanks for your response.
resolved this by updating Java version from 1.6.0.17 to 1.6.0.35.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: org.hibernate.exception.GenericJDBCException: Cannot release connection at org.hibernate.exception.
 
Similar Threads
HttpUnit - org.mozilla.javascript.EcmaError: TypeError: Cannot find function createElement
Unit tetsing (Junit) Spring Framework
Root exception is java.net.ConnectException: Connection refused: connect
Error in JUnit while Running
Mock Objects for easymock -- Assertion failure Error