-->
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: java.lang.ClassNotFoundException: org.hibernate.util.LRUMap
PostPosted: Tue Jan 25, 2011 11:58 am 
Newbie

Joined: Tue Jan 18, 2011 3:24 pm
Posts: 13
I am upgrading Hibernate 3.2.6 to 3.5.x (3.5.4). Was using Hibernate(3.2.6), Hibernate Validate(3.0.0), Hibernate Search(3.0.1), Hibernate EntityManager(3.3.1) and Hibernate Annotations(3.3.1)

Upgrading to Hibernate(3.5.4-Final), Hibernate Validate(4.1.0.Final), Hibernate Search(3.3.0.Final), Hibernate EntityManager(3.5.4-Final) and Hibernate Annotations(3.5.4-Final)

Did some changes to the code to compile. I am using Maven 2.2.1. When I try to run the application, I get the following error:
I couldn't find a 3.5.x version for Hibernate Search. I know that LRUMap was present in Search 3.0.1, but its been removed in 3.3.0. I tried using Search 3.0.1 with the rest of the libraries(3.5.4). But it won't run giving me 'Could not initialise EJB3Configuration' error, which I think is due to version incompatibility. Now I need some solution for this LRUMap issue to proceed. Please someone help.

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [pm-jpa-test.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/hibernate/util/LRUMap
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findDefaultEntityManagerFactory(PersistenceAnnotationBeanPostProcessor.java:529)
at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findEntityManagerFactory(PersistenceAnnotationBeanPostProcessor.java:495)
at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor$PersistenceElement.resolveEntityManager(PersistenceAnnotationBeanPostProcessor.java:656)
at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor$PersistenceElement.getResourceToInject(PersistenceAnnotationBeanPostProcessor.java:629)
at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:147)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:84)
at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.postProcessPropertyValues(PersistenceAnnotationBeanPostProcessor.java:338)
... 28 more
Caused by: java.lang.NoClassDefFoundError: org/hibernate/util/LRUMap
at org.hibernate.search.util.SoftLimitMRUCache.init(SoftLimitMRUCache.java:203)
at org.hibernate.search.util.SoftLimitMRUCache.<init>(SoftLimitMRUCache.java:118)
at org.hibernate.search.filter.MRUFilterCachingStrategy.initialize(MRUFilterCachingStrategy.java:53)
at org.hibernate.search.spi.SearchFactoryBuilder.buildFilterCachingStrategy(SearchFactoryBuilder.java:323)
at org.hibernate.search.spi.SearchFactoryBuilder.buildNewSearchFactory(SearchFactoryBuilder.java:279)
at org.hibernate.search.spi.SearchFactoryBuilder.buildSearchFactory(SearchFactoryBuilder.java:144)
at org.hibernate.search.event.FullTextIndexEventListener.initialize(FullTextIndexEventListener.java:137)
at org.hibernate.event.EventListeners$1.processListener(EventListeners.java:198)
at org.hibernate.event.EventListeners.processListeners(EventListeners.java:181)
at org.hibernate.event.EventListeners.initializeListeners(EventListeners.java:194)
at org.hibernate.cfg.Configuration.getInitializedEventListeners(Configuration.java:1396)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1385)
at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:954)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:891)
at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:74)
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:225)
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:308)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
... 41 more


Top
 Profile  
 
 Post subject: Re: java.lang.ClassNotFoundException: org.hibernate.util.LRUMap
PostPosted: Wed Jan 26, 2011 4:08 pm 
Hibernate Team
Hibernate Team

Joined: Thu Apr 05, 2007 5:52 am
Posts: 1689
Location: Sweden
Hibernate Search 3.3.0.Final is aligned with Hibernate Core 3.6.0.Final. I think you are running into a version mismatch. Any reason you chose 3.5.4 over 3.6?
If you can give Core 3.6 a go.

--Hardy


Top
 Profile  
 
 Post subject: Re: java.lang.ClassNotFoundException: org.hibernate.util.LRUMap
PostPosted: Thu Feb 03, 2011 12:50 pm 
Newbie

Joined: Tue Jan 18, 2011 3:24 pm
Posts: 13
Thanks Hardy. I changed to 3.6.0.Final and that fixed it.


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.