Home  >  Forum  >  Hibernate
Post New Query

NoClassDefFoundError: org/apache/commons/collections/map/LRUMap


joined on
April 07,2013
Asked on May 27,2013
Hi Everyone, I am getting error in my application, any clue?

Caused by: java.lang.NoClassDefFoundError: org/apache/commons/collections/map/LRUMap
at org.hibernate.util.SimpleMRUCache.init(SimpleMRUCache.java:71)
at org.hibernate.util.SimpleMRUCache.<init>(SimpleMRUCache.java:55)
at org.hibernate.util.SimpleMRUCache.<init>(SimpleMRUCache.java:50)
at org.hibernate.engine.query.QueryPlanCache.<init>(QueryPlanCache.java:69)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:189)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1385)
at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:954)
at com.concretepage.util.HibernateUtil.<clinit>(HibernateUtil.java:25)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.collections.map.LRUMap
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 8 more
joined on
March 14,2013
Replied on May 27,2013

You need to provide commons-collections-3.1.jar or any other version in your applications build path.
joined on
July 30,2013
Replied on July 30,2013

log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).
log4j:WARN Please initialize the log4j system properly.
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/collections/map/LRUMap
    at org.hibernate.util.SimpleMRUCache.init(SimpleMRUCache.java:71)
    at org.hibernate.util.SimpleMRUCache.<init>(SimpleMRUCache.java:55)
    at org.hibernate.util.SimpleMRUCache.<init>(SimpleMRUCache.java:50)
    at org.hibernate.engine.query.QueryPlanCache.<init>(QueryPlanCache.java:65)
    at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:182)
    at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1341)
    at com.example.StoreData.main(StoreData.java:10)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.collections.map.LRUMap
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    ... 7 more

I am also getting the same error.But i am having commons-collections-3.1.jar.Still i am getting
this error.Please help

Write Answer








Copyright ©2017 concretepage.com, all rights reserved |Privacy Policy | Contact Us