首页 > 代码库 > spring中部分异常
spring中部分异常
转自:http://blog.csdn.net/sjzs5590/article/details/7348836
异常1:java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
缺少包commons-logging的jar,下载commons-logging-1.1.3.jar,引入即可
下载地址:http://yunpan.cn/QhPZRS9gMRBsG (提取码:f4ca)
异常2:java.lang.NoClassDefFoundError: org/springframework/dao/support/PersistenceExceptionTranslator
缺少包,加入org.springframework.transaction-3.1.1.RELEASE.jar即可
异常3:Offending resource: class path resource
缺少包,加入org.springframework.aop-3.1.1.RELEASE.jar即可
异常4:java.lang.NoClassDefFoundError: org/aopalliance/intercept/MethodInterceptor
缺少包aopalliance-alpha1.jar
下载地址http://sourceforge.net/projects/aopalliance/files/ 下完引入
异常5:java.lang.NoClassDefFoundError: org/aopalliance/aop/Advice
缺少包com.springsource.org.aopalliance-1.0.0.jar,
下载地址:http://yunpan.cn/QhPZkZBEmUzZS (提取码:3dff)
异常6: org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named ‘org.springframework.transaction.interceptor.TransactionInterceptor#0‘ must be of type [org.aopalliance.aop.Advice], but was actually of type [org.springframework.transaction.interceptor.TransactionInterceptor]
原因是aopalliance-alpha1.jar和com.springsource.org.aopalliance-1.0.0.jar冲突了,删除前者(这里有点不是很明白,异常4的解决包怎么就可以删除了呢,是不是异常5的解决方法也适用于异常4,有待尝试)
异常7:org.springframework.aop.framework.AopConfigException: Cannot proxy target class because CGLIB2 is not available. Add CGLIB to the class path or specify proxy interfaces.
缺少cglib的包,下载地址http://sourceforge.net/projects/cglib/files/latest/download?source=files 下完引入
异常8:java.lang.NoClassDefFoundError: javax/mail/MessagingException
缺少activation.jar, mail.jar
异常9:org/aspectj/weaver/reflect/ReflectionWorld$ReflectionWorldException
缺少aspectjweaver.jar
下载地址:http://yunpan.cn/QhPZIUbWQtzzQ (提取码:2e59)