-->
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.  [ 3 posts ] 
Author Message
 Post subject: second-level cache in AS 7 Beta 3?
PostPosted: Thu Apr 21, 2011 4:24 pm 
Newbie

Joined: Wed Sep 08, 2010 5:24 pm
Posts: 5
I was trying to test my application on AS 7 Beta 3, and enable the second-level cache, since Beta 3 integrated Infinispan. I followed the configuration directions here:

http://community.jboss.org/wiki/usingin ... heprovider

After building the ear again, I deployed to a clustered configuration on AS 7 Beta 3, and during deployment I received the following exception:

Caused by: java.lang.ClassNotFoundException: org.hibernate.cache.infinispan.JndiInfinispanRegionFactory from [Module "org.hibernate:main" from local module loader @1fff7a1e (roots: /root/jboss-7.0.0.Beta3/modules)]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:184) [:1.0.0.Beta17]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:357) [:1.0.0.Beta17]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:329) [:1.0.0.Beta17]
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:306) [:1.0.0.Beta17]
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:100) [:1.0.0.Beta17]
at java.lang.Class.forName0(Native Method) [:1.6.0_20]
at java.lang.Class.forName(Class.java:186) [:1.6.0_20]
at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:192)
at org.hibernate.cfg.SettingsFactory.createRegionFactory(SettingsFactory.java:409)
... 12 more

So, I looked in the jars for the Hibernate module, and sure enough there doesn't appear to be any of the second-level cache classes I would expect.

Is there a reason why the Hibernate that is picked up in AS 7 does not have the second-level cache implementation?

Can I take another build, and replace the jars in AS 7 to get this functionality?


Top
 Profile  
 
 Post subject: Re: second-level cache in AS 7 Beta 3?
PostPosted: Sun Apr 24, 2011 12:20 pm 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Hi,
you don't have to replace the bundled build, you're missing the optional dependency; I think you could pack the missing module with your application.

The missing module is <groupId>org.hibernate</groupId><artifactId>hibernate-infinispan</artifactId> (if using maven), or just hibernate-infinispan.jar from the distribution bundle.

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
 Post subject: Re: second-level cache in AS 7 Beta 3?
PostPosted: Mon Apr 25, 2011 12:03 am 
Newbie

Joined: Wed Sep 08, 2010 5:24 pm
Posts: 5
I'll give that a try. I believe you are correct, that should work.

Thanks.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.