Hibernate version: 2.1.8
Name and version of the database you are using:Oracle 9
Hi,
I am trying to use the Hibernate Query Cache with Hibernate 2.1.8 and TreeCache. Origionally I got the exception that I beleive is already known, similar to this:
Code:
ERROR [org.jboss.cache.lock.IdentityLock] write lock for //net/sf/hibernate/cache/UpdateTimestampsCache/Customer could not be acquired after 15000 ms. Lock map ownership Read lock owners: []
Write lock owner: <odms-dev-svr1:3939>:2030
(caller=Thread[TP-Processor1,5,jboss])
2005-03-10 11:23:51,035 ERROR [net.sf.hibernate.impl.SessionImpl] could not release a cache lock
net.sf.hibernate.cache.CacheException: org.jboss.cache.lock.TimeoutException: write lock for //net/sf/hibernate/cache/UpdateTimestampsCache/Customer could not be acquired after 15000 ms. Lock map ownership Read lock owners: []
Write lock owner: <odms-dev-svr1:3939>:2030
(caller=Thread[TP-Processor1,5,jboss])
As far as I understand this error has been fixed, or at least minimized in Hibernate 3. However, I am going to production in a month or 2 and with Hibernate 3 not being quite ready I cannot go to production with it, so I am stuck with 2.1.8. I would like to see if there is a way the fixes in Hibernate 3 could be applied to 2.1.8.
I grabbed the TreeCache and TreeCacheProvider classes from the Hibernate3 CVS tree (as well as the jbosscache 2.1.2alpha jar) and tried to use them with 2.1.8. However, when I do that I get the following exception when I try to commit:
Code:
java.lang.ArrayIndexOutOfBoundsException: 1
at net.sf.hibernate.impl.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:57)
at net.sf.hibernate.impl.BatcherImpl.executeBatch(BatcherImpl.java:128)
at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2438)
at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2392)
at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2261)
at net.sf.hibernate.transaction.JTATransaction.commit(JTATransaction.java:52)
I guess there is more involved to this change than these two classes. Any ideas if it would be possible to use the query cache with TreeCache in 2.1.8? Are there any patches available, or if not could you please direct me what other classes would need to be changed? I would gladly contribute my code if I can get it to work.
It is a shame that those of us still on 2.1.8 cant use the query cache with TreeCache.
(By the way, there is a similar message on the JBossCache forum, but I thought I would ask it here as well since this is more Hibernate related than TreeCache related. The link to the thread is
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3871787#3871787.)
Thank you,
Daniel