WARN [main] (Configurator.java:126) - No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/E:/Users/algz/workspace/.metadata/.plugins/com.genuitec.eclipse.easie.tomcat.myeclipse/tomcat/webapps/item/WEB-INF/lib/ehcache-1.1.jar!/ehcache-failsafe.xml
解决方案:
ehcache-1.1.jar 包下的ehcache-failsafe.xml 文件复制到 src 目录下(新建文件,复制内容).
二.错误信息提示:
log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).
log4j:WARN Please initialize the log4j system properly.
解决方案:
src 目录下创建 log4j.properties 文件(具体内容,详见log4j配置文件).
三.错误信息提示:
ERROR [main] (CGLIBLazyInitializer.java:130) - CGLIB Enhancement failed: item.common.hibernate.query.partsum.Partsum
java.lang.NoSuchMethodError: org.objectweb.asm.ClassVisitor.visit(IILjava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)V
WARN [main] (PojoEntityTuplizer.java:173) - could not create proxy factory for: item.common.hibernate.query.partsum.Partsum
org.hibernate.HibernateException: CGLIB Enhancement failed: item.common.hibernate.query.partsum.Partsum
Caused by: java.lang.NoSuchMethodError: org.objectweb.asm.ClassVisitor.visit(IILjava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)V
///
ERROR [main] (CGLIBLazyInitializer.java:130) - CGLIB Enhancement failed: item.common.hibernate.fourm.Fourm
java.lang.NoClassDefFoundError
WARN [main] (PojoEntityTuplizer.java:173) - could not create proxy factory for:item.common.hibernate.fourm.Fourm
org.hibernate.HibernateException: CGLIB Enhancement failed: item.common.hibernate.fourm.Fourm
Caused by: java.lang.NoClassDefFoundError
at org.hibernate.proxy.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:116)
ERROR [main] (CGLIBLazyInitializer.java:130) - CGLIB Enhancement failed: item.common.hibernate.picture
java.lang.NoClassDefFoundError
WARN [main] (PojoEntityTuplizer.java:173) - could not create proxy factory for:item.common.hibernate.picture
org.hibernate.HibernateException: CGLIB Enhancement failed: item.common.hibernate.picture
Caused by: java.lang.NoClassDefFoundError
at org.hibernate.proxy.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:116)
解决方案:
Spring 和 Hibernate 共用的一些 jar 文件发生了版本冲突, 删除 WEB-INF/lib/asm-2.2.3.jar 然后重启 Tomcat.