[Hibernate-JIRA] Created: (HHH-3006) ConcurrentModificationException in AbstractBatcher results in infinite loop
by Stefan Hauk (JIRA)
ConcurrentModificationException in AbstractBatcher results in infinite loop
---------------------------------------------------------------------------
Key: HHH-3006
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3006
Project: Hibernate3
Issue Type: Bug
Components: core
Affects Versions: 3.2.5, 3.2.4.sp1, 3.2.4, 3.2.3
Environment: Hibernate 3.2.5.ga
MySQL 5.0.42
Reporter: Stefan Hauk
Priority: Minor
Here is a piece of code from org.hibernate.jdbc.AbstractBatcher's closeStatements() method:
Iterator iter = resultSetsToClose.iterator();
while ( iter.hasNext() ) {
try {
logCloseResults();
( (ResultSet) iter.next() ).close();
}
catch (SQLException e) {
// no big deal
log.warn("Could not close a JDBC result set", e);
}
catch (Throwable e) {
// sybase driver (jConnect) throwing NPE here in certain cases
log.warn("Could not close a JDBC result set", e);
}
}
resultSetsToClose.clear();
In case there is a ConcurrentModificationException thrown when iterating over the resultSetsToClose HashSet the exception will be caught by the catch(Throwable) clause. However, the iteration may continue infinitely because of the corrupted HashSet. This pegs one CPU and logs the following stack trace over and over again:
28/11 20:16:50 WARN AbstractBatcher [resin-tcp-connection-myserver:6001-15] Could not close a JDBC result set
java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:841)
at java.util.HashMap$KeyIterator.next(HashMap.java:877)
at org.hibernate.jdbc.AbstractBatcher.closeStatements(AbstractBatcher.java:314)
at org.hibernate.jdbc.ConnectionManager.cleanup(ConnectionManager.java:382)
at org.hibernate.jdbc.ConnectionManager.close(ConnectionManager.java:324)
at org.hibernate.impl.SessionImpl.close(SessionImpl.java:298)
at org.springframework.orm.hibernate3.SessionFactoryUtils.closeSession(SessionFactoryUtils.java:774)
at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.closeSession(OpenSessionInViewFilter.java:252)
at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:183)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:70)
at com.caucho.server.cache.CacheFilterChain.doFilter(CacheFilterChain.java:188)
at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:178)
at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:229)
at com.caucho.server.hmux.HmuxRequest.handleRequest(HmuxRequest.java:419)
at com.caucho.server.port.TcpConnection.run(TcpConnection.java:389)
at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:492)
at com.caucho.util.ThreadPool.run(ThreadPool.java:425)
at java.lang.Thread.run(Thread.java:595)
The catch(Throwable) block was added in Hibernate 3.2.3 if I saw that correctly. Apparently the reason was to catch a NPE thrown by a sybase driver here, but catching Throwable catches more than that and produces this side-effect.
Now I do realize that the ConcurrentModificationException might be caused by not using Hibernate in a correct way, but I haven't determined the cause for it yet. However, I do think that Hibernate should fail more gracefully than it currently does.
--
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....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 4 months
[Hibernate-JIRA] Created: (HHH-3191) QueryPlanCache cache size
by Julien Kirch (JIRA)
QueryPlanCache cache size
-------------------------
Key: HHH-3191
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3191
Project: Hibernate3
Issue Type: Improvement
Components: query-hql
Affects Versions: 3.2.6
Environment: Hibernate 3.2.6, all platform
Reporter: Julien Kirch
On a large application with many (currently 696) named queries in hbm files we have a performance issue with the QueryPlanCache cache size:
The SoftLimitMRUCache used in the QueryPlanCache use 128 hard references, the other being soft references, and this number is hardcoded.
As we have much more querries in the application, we spend much time in recompiling the same queries when they are evicted from the cache.
As the QueryPlanCache has a SessionFactoryImplementor as parameter, adding a new parameter to define the query cache plan size would be trivial; what's your opinion about this ?
--
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....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 4 months
[Hibernate-JIRA] Created: (HHH-4627) Configurable Query Plan Cache
by Frank Daspro (JIRA)
Configurable Query Plan Cache
-----------------------------
Key: HHH-4627
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4627
Project: Hibernate Core
Issue Type: New Feature
Components: query-hql
Affects Versions: 3.2.2
Environment: Hibernate 3.22 GA, Oracle 10G database
Reporter: Frank Daspro
Our application heavily uses dynamic sql some of which are highly parameterised and with many permutations. Out of neccessity we also have a very large JVM heap space (12GB). As a result we end up with a very large memory utilisation for the Query Plan cache. From a recent memory dump it was noted the QueryPlanCache had 25000 entries and consuming 2.5GB of heap space. Our full Garbage collections end up taking longer than it would normally take with a smaller QueryPlanCache.
I understand via a related issue (http://opensource.atlassian.com/projects/hibernate/browse/HHH-3191) there is a hard limit of 128 entries, and an endless soft limit which is only garbage collected during a full garbage collection. It would be nice if the following features could be added:
1) Configuration options to specify the hard and soft limits (with a 0 to disable or similar).
2) Configurable at the query level such that specific queries can be excluded from the the QueryPlanCache. eg. something like hibernateQuery.setParsedHQLCacheable(false).
--
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....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 4 months
[Hibernate-JIRA] Created: (HBX-1000) Problem with PostgreSQL using uppercase letters in tables
by Ruediger Engelberger (JIRA)
Problem with PostgreSQL using uppercase letters in tables
---------------------------------------------------------
Key: HBX-1000
URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-1000
Project: Hibernate Tools
Issue Type: Bug
Components: reverse-engineer
Affects Versions: 3.2.beta11
Environment: Hibernate 3.2.5.ga, Hibernate Tools 3.2.0 beta9a, PostgreSql 8.2, postgresql-8.2-506.jdbc3.jar, Eclipse 3.3.0, all running on Windows XP at the moment (including PostgreSql)
Reporter: Ruediger Engelberger
I have problems using Hibernate tools when using upper case letters in a PostgreSQL database.
I can configure Hibernate Tools for my local PostgreSql installation without any problems. I can access the table structure in the view Hibernate Configurations and do reverse engineering by creating XML mappings and beans. No problem.
But when I'm using upper case characters in table names Hibernate Tools can't access the table structures any more. Hibernate Configuration shows the tables, but when I want to see the columns, it doesn't show anything. Reverse engineering also doesn't work any more.
So, the following works:
TABLE cms_clusterMessage
pk_clustermessageid
fk_clusternodeid
messagetype
messagedetail
The following doesn't work:
TABLE cms_clusterMessage
PK_ClusterMessageId
FK_ClusterNodeId
MessageType
MessageDetail
I tried to use different JDBC drivers because I thought it could be a bug of the driver. But it wasn't.
--
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....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 4 months
[Hibernate-JIRA] Created: (HHH-4904) result of 'join fetch' query is incorrectly cached
by Geoff Crain (JIRA)
result of 'join fetch' query is incorrectly cached
--------------------------------------------------
Key: HHH-4904
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4904
Project: Hibernate Core
Issue Type: Bug
Components: caching (L2)
Affects Versions: 3.3.2
Environment: hibernate 3.3.2, EhCache 1.2.3, postgresql, mysql and hsql
Reporter: Geoff Crain
Im not sure if this is either a bug, a missing option, or just an option that i can't find.
Im using hibernate 3.3.2, and EhCache 1.2.3.
I recently had an issue where objects in collections were getting dropped from the cache. After a long investigation, I found that it was because a "join fetch" query was being made on the parent object. http://docs.jboss.org/hibernate/core/3. ... ryhql.html
This meant that only a subset of the child elements were selected. If the collection was not already in the cache, the "incomplete" result of this query is put into it. Every subsequent call to the parent element (wanting the "full" set of children) would only get this incomplete version. When the incomplete version drops out of the cache (after 24 hours) everything goes back to normal.
So, is it a bug? Should hibernate (or ehcache) not be caching this "incomplete" collection? Or is there some way to tell hibernate that it is an incomplete collection _so_ that it doesnt get cached?
* If you believe this to be a bug, I will provide a working example.
* If you think this is actually an EhCache bug, tell me and Ill raise it there
--
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....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 4 months