-->
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: jbosscache - error in TransactionManagerLookup
PostPosted: Fri Mar 28, 2008 6:18 am 
Newbie

Joined: Thu Mar 27, 2008 5:41 am
Posts: 5
Hi,
I am using jboss cache as my 2nd level caching policy.
My persistence.xml has the following configuration:
<property name="hibernate.cache.use_second_level_cache" value="true" />
<property name="hibernate.cache.provider_class" value = "org.hibernate.cache.TreeCacheProvider"/>
<!-- JBoss Cache configuration file name -->
<property name="hibernate.cache.provider_configuration_file_resource_path" value="absolute-path-to/cache-config.xml" />

But everytime I run my application, I get the following error:
Exception in thread "main" java.lang.NoClassDefFoundError: org/jboss/cache/TransactionManagerLookup
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
at java.lang.Class.getConstructor0(Class.java:2671)
at java.lang.Class.newInstance0(Class.java:321)
at java.lang.Class.newInstance(Class.java:303)
at org.hibernate.cfg.SettingsFactory.createCacheProvider(SettingsFactory.java:375)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:245)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2073)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1298)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:713)
at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:121)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:51)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:33)


What could be the problem? I have given jbosscache-core.jar and jgroups.jar as part of the classpath library. Is tehre something else which I am missing?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 28, 2008 6:30 am 
Regular
Regular

Joined: Mon Aug 06, 2007 10:49 am
Posts: 67
Location: Banska Bystrica, Slovakia
use jboss-cache.jar (org/jboss/cache/TransactionManagerLookup)
instead of jbosscache-core.jar (org/jboss/cache/transaction/TransactionManagerLookup)


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 28, 2008 7:09 am 
Newbie

Joined: Thu Mar 27, 2008 5:41 am
Posts: 5
Thanks ferozz for your suggestion. I made the change, but I am still getting the same error:


Exception in thread "main" javax.persistence.PersistenceException: org.hibernate.HibernateException: Could not instantiate TransactionManagerLookup 'org.jboss.cache.TransactionManagerLookup'
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:720)
at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:121)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:51)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:33)
at TestPersistence.main(TestPersistence.java:18)


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.