From: <leg...@at...> - 2003-09-24 18:52:55
|
The following comment has been added to this issue: Author: John Kristian Created: Wed, 24 Sep 2003 1:52 PM Body: This patch would also fix HB-337, I imagine. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-360 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-360 Summary: WebLogic DataSource doesn't permit conn.getWarnings after commit Type: Patch Status: Unassigned Priority: Major Project: Hibernate2 Components: core Versions: 2.0.2 Assignee: Reporter: John Kristian Created: Wed, 24 Sep 2003 1:49 PM Updated: Wed, 24 Sep 2003 1:49 PM Environment: WebLogic 7, Windows 2000, Microsoft SQL Server Description: SessionFactoryImpl.closeConnection fails to close the JDBC conection, because an exception propagates from conn.getWarnings, because the connection is already closed (as a side-effect of commiting the JTA transaction, I suppose). This patch solves the problem: ==== src/net/sf/hibernate/impl/SessionFactoryImpl.java ==== @@ -403,6 +403,11 @@ try { JDBCExceptionReporter.logWarnings( conn.getWarnings() ); conn.clearWarnings(); + } + catch (SQLException sqle) { + log.warn("Cannot log warnings: " + sqle.getMessage()); + } + try { connections.closeConnection(conn); } catch (SQLException sqle) { --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-10-13 21:32:20
|
The following comment has been added to this issue: Author: John Kristian Created: Mon, 13 Oct 2003 4:31 PM Body: This problem was not solved by BatcherImpl.java -rv21beta4 (1.9.2.10). When using a WebLogic data source, a JDBC connection that is not closed may propagate an exception from getWarnings(); for example: java.sql.SQLException: The transaction is no longer active - status: 'Rolled back. [Reason=Unknown]'. No further JDBC access is allowed within this transaction. at weblogic.jdbc.wrapper.JTSConnection.checkIfRolledBack(JTSConnection.java:118) at weblogic.jdbc.wrapper.JTSConnection.checkConnection(JTSConnection.java:127) at weblogic.jdbc.wrapper.Connection.preInvocationHandler(Connection.java:67) at weblogic.jdbc.wrapper.JTSConnection_com_jnetdirect_jsql_JSQLConnection.getWarnings(Unknown Source) at net.sf.hibernate.impl.BatcherImpl.closeConnection(BatcherImpl.java:272) at net.sf.hibernate.impl.SessionImpl.disconnect(SessionImpl.java:3285) at net.sf.hibernate.impl.SessionImpl.close(SessionImpl.java:497) at com.docent.lms.core.SessionInterceptor.closeHibernateSession(SessionInterceptor.java:98) at com.docent.lms.core.TransactionImpl.closeHibernateSession(TransactionImpl.java:431) at com.docent.lms.core.TransactionImpl.close(TransactionImpl.java:359) To mitigate the problem, I suggest (and am using) this patch: ==== src/net/sf/hibernate/impl/BatcherImpl.java ==== @@ -272,6 +272,11 @@ JDBCExceptionReporter.logWarnings( conn.getWarnings() ); conn.clearWarnings(); } + } + catch (SQLException sqle) { + log.warn("Cannot log warnings: " + sqle.getMessage()); + } + try { factory.getConnectionProvider().closeConnection(conn); } --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-360 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-360 Summary: WebLogic DataSource doesn't permit conn.getWarnings after commit Type: Patch Status: Closed Priority: Major Resolution: FIXED Project: Hibernate2 Components: core Fix Fors: 2.1 beta 4 Versions: 2.0.2 Assignee: Reporter: John Kristian Created: Wed, 24 Sep 2003 1:49 PM Updated: Thu, 25 Sep 2003 4:24 PM Environment: WebLogic 7, Windows 2000, Microsoft SQL Server Description: SessionFactoryImpl.closeConnection fails to close the JDBC conection, because an exception propagates from conn.getWarnings, because the connection is already closed (as a side-effect of commiting the JTA transaction, I suppose). This patch solves the problem: ==== src/net/sf/hibernate/impl/SessionFactoryImpl.java ==== @@ -403,6 +403,11 @@ try { JDBCExceptionReporter.logWarnings( conn.getWarnings() ); conn.clearWarnings(); + } + catch (SQLException sqle) { + log.warn("Cannot log warnings: " + sqle.getMessage()); + } + try { connections.closeConnection(conn); } catch (SQLException sqle) { --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2004-01-20 14:39:54
|
The following comment has been added to this issue: Author: CVS Notification Service Created: Tue, 20 Jan 2004 8:38 AM Body: CVS COMMIT LOG: SUBJECT: [Hibernate-commits] Hibernate2/src/net/sf/hibernate/impl BatcherImpl.java,1.9.2.16,1.9.2.17 applied HB-360, workaround for weblogic bad behavior (John Kristian) --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-360 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-360 Summary: WebLogic DataSource doesn't permit conn.getWarnings after commit Type: Patch Status: Closed Priority: Major Resolution: FIXED Original Estimate: Unknown Time Spent: Unknown Remaining: Unknown Project: Hibernate2 Components: core Fix Fors: 2.1.2 Versions: 2.0.2 Assignee: Gavin King Reporter: John Kristian Created: Wed, 24 Sep 2003 1:49 PM Updated: Tue, 20 Jan 2004 8:38 AM Environment: WebLogic 7, Windows 2000, Microsoft SQL Server Description: SessionFactoryImpl.closeConnection fails to close the JDBC conection, because an exception propagates from conn.getWarnings, because the connection is already closed (as a side-effect of commiting the JTA transaction, I suppose). This patch solves the problem: ==== src/net/sf/hibernate/impl/SessionFactoryImpl.java ==== @@ -403,6 +403,11 @@ try { JDBCExceptionReporter.logWarnings( conn.getWarnings() ); conn.clearWarnings(); + } + catch (SQLException sqle) { + log.warn("Cannot log warnings: " + sqle.getMessage()); + } + try { connections.closeConnection(conn); } catch (SQLException sqle) { --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |