I'm having trouble getting Hibernate to work with JBossCache 2.0. I'm running on Tomcat 5.5. Could be a jar problem of some sort on my side but I was cautious about adding/updating to jbosscache 2.0.
Hibernate 3.2.3.ga
JBossCache 2.0.0.GA
JGroups 2.6.0-beta-1
I get this error when HibernateUtil starts up:
java.lang.NoClassDefFoundError: org/jboss/cache/TransactionManagerLookup at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Unknown Source) at java.lang.Class.getConstructor0(Unknown Source) at java.lang.Class.newInstance0(Unknown Source) at java.lang.Class.newInstance(Unknown Source) at org.hibernate.cfg.SettingsFactory.createCacheProvider(SettingsFactory.java:371) at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:241) at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009)
conf.setProperty("hibernate.cache.use_second_level_cache", "true"); conf.setProperty("hibernate.cache.provider_class", "org.hibernate.cache.TreeCacheProvider"); conf.setProperty("hibernate.cache.use_structured_entries", "true"); conf.setProperty("hibernate.cache.use_query_cache", "true"); conf.setProperty("hibernate.cache.usage", "transactional");
<mbean code="org.jboss.cache.jmx.CacheJmxWrapper" name="jboss.cache:service=TreeCache"> <depends>jboss:service=Naming</depends> <depends>jboss:service=TransactionManager</depends> <attribute name="TransactionManagerLookupClass">org.jboss.cache.transaction.GenericTransactionManagerLookup</attribute>
I got the same with Hibernate 3.2.5.ga.
Found this:
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4092705#4092705
Is Hibernate 3.x compatible with JBossCache 2.x?
Joe