【报错】ClassNotFoundException 之 collections.map.LRUMap

来源:互联网 发布:mac windows bootcamp 编辑:程序博客网 时间:2024/05/16 06:56

【报错】

log4j:WARN No appenders could be found for logger (org.hibernate.type.BasicTypeRegistry).

log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Tue Jun 28 17:18:55 CST 2016 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
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.engine.query.QueryPlanCache.<init>(QueryPlanCache.java:76)
    at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:239)
    at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1872)
    at com.tgbnode.hibernate.Client.main(Client.java:17)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.collections.map.LRUMap
    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)
    ... 6 more
【解决】

引入 commons-collections-3.1.jar 包

0 0
原创粉丝点击