`

Caused by: java.lang.ClassNotFoundException: org.aspectj.weaver.reflect.Reflecti

阅读更多

配置spring事务出现上标题错误

解决办法:

缺少 aspectjweaver文件,在pom.xml加入下述信息

<dependency>
	   		<groupId>org.aspectj</groupId>
			<artifactId>aspectjweaver</artifactId>
			<version>1.6.2</version>
</dependency>

 

错误信息:

 

Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Unexp
ected exception parsing XML document from ServletContext resource [/WEB-INF/clas
ses/config/spring/HibernateSessionFactory.xml]; nested exception is java.lang.No
ClassDefFoundError: org/aspectj/weaver/reflect/ReflectionWorld$ReflectionWorldEx
ception

        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadB
eanDefinitions(XmlBeanDefinitionReader.java:420)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBea
nDefinitions(XmlBeanDefinitionReader.java:342)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBea
nDefinitions(XmlBeanDefinitionReader.java:310)
        at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentRe
ader.importBeanDefinitionResource(DefaultBeanDefinitionDocumentReader.java:190)
        ... 54 more
Caused by: java.lang.NoClassDefFoundError: org/aspectj/weaver/reflect/Reflection
World$ReflectionWorldException
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:169)
        at org.springframework.aop.config.ConfigBeanDefinitionParser.class$(Conf
igBeanDefinitionParser.java:208)
        at org.springframework.aop.config.ConfigBeanDefinitionParser.createPoint
cutDefinition(ConfigBeanDefinitionParser.java:539)
        at org.springframework.aop.config.ConfigBeanDefinitionParser.parsePointc
utProperty(ConfigBeanDefinitionParser.java:513)
        at org.springframework.aop.config.ConfigBeanDefinitionParser.parseAdviso
r(ConfigBeanDefinitionParser.java:186)
        at org.springframework.aop.config.ConfigBeanDefinitionParser.parse(Confi
gBeanDefinitionParser.java:145)
        at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(N
amespaceHandlerSupport.java:69)
        at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.pa
rseCustomElement(BeanDefinitionParserDelegate.java:1297)
        at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.pa
rseCustomElement(BeanDefinitionParserDelegate.java:1287)
        at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentRe
ader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:135)
        at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentRe
ader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:92)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registe
rBeanDefinitions(XmlBeanDefinitionReader.java:507)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadB
eanDefinitions(XmlBeanDefinitionReader.java:398)
        ... 57 more
Caused by: java.lang.ClassNotFoundException: org.aspectj.weaver.reflect.Reflecti
onWorld$ReflectionWorldException
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at org.codehaus.classworlds.RealmClassLoader.loadClassDirect(RealmClassL
oader.java:195)
        at org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassReal
m.java:255)
        at org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassReal
m.java:274)
        at org.codehaus.classworlds.RealmClassLoader.loadClass(RealmClassLoader.
java:214)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
        at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoade
r.java:375)
        at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoade
r.java:337)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
        ... 71 more

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics