Bug 56088 - AbstractQueryReport$StatementProxy throws exception on Object methods if statement is closed
Summary: AbstractQueryReport$StatementProxy throws exception on Object methods if stat...
Status: NEW
Alias: None
Product: Tomcat Modules
Classification: Unclassified
Component: jdbc-pool (show other bugs)
Version: unspecified
Hardware: All All
: P2 major with 1 vote (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
Depends on:
Reported: 2014-01-29 14:32 UTC by Ignacio Baca
Modified: 2014-02-27 09:01 UTC (History)
1 user (show)


Note You need to log in before you can comment on or make changes to this bug.
Description Ignacio Baca 2014-01-29 14:32:38 UTC
If the StatemetProxy.hashcode is called after the delegated statement is closed the proxy throws an exception. This produces an incompatibility with the last version of hibernate.

Hibernate issue at https://hibernate.atlassian.net/browse/HHH-8853.

Although this problem appear in the last version of hibernate, looks like a silent bug in the statement proxy. For example, guava has an utility which hides solves this problem (https://code.google.com/p/guava-libraries/wiki/ReflectionExplained#AbstractInvocationHandler).
Comment 1 Lari Hotari 2014-02-27 08:56:17 UTC
Please fix this. This is causing a problem in Grails applications too, http://jira.grails.org/browse/GRAILS-11151 . This is related to Hibernate issue HHH-8853 and has a workaround in Hibernate 4.3.2 version (which hasn't been released yet.)

The problem seems to be in StatementDecoratorInterceptor.StatementProxy
not allowing equals and hashCode calls after the statement has been closed.