-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Hibernate Query Cache with TreeCache and 2.1.8
PostPosted: Mon Mar 28, 2005 2:45 pm 
Regular
Regular

Joined: Tue Nov 11, 2003 7:35 pm
Posts: 63
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


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 07, 2005 10:49 pm 
Regular
Regular

Joined: Tue Nov 11, 2003 7:35 pm
Posts: 63
Hello,

There as yet have not been any responses. Has anyone out there had any luck getting the query cache to work properly with JBossCache on Hibernate 2.1.8? Or any ideas how to integrate the new code from Hibernate 3 for the JBoss cache provider without getting the java.lang.ArrayIndexOutOfBoundsException mentioned above?

Any help is appreciated.

Thank you,
Daniel


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.