error: java.lang.noclassdeffounderror: org/AspectJ/Weaver/reflect/reflectionworld $reflectionworldexception
spring integration mubatis startup error:
Solution: at first glance, the error is due to the lack of package. The package here is missing: aspectjweaver.jar This package is used by spring AOP. You can download and import this package online. Download address: http://download.csdn.net/detail/luojiming1990/5432831 ;
Error code:
1 2017-04-01 09:15:46 [org.mybatis.spring.mapper.ClassPathMapperScanner]-[DEBUG] Creating MapperFactoryBean with name 'itemsMapper' and 'com.kjczwl.ssm.mapper.ItemsMapper' mapperInterface 2 2017-04-01 09:15:46 [org.mybatis.spring.mapper.ClassPathMapperScanner]-[DEBUG] Creating MapperFactoryBean with name 'itemsMapperCustom' and 'com.kjczwl.ssm.mapper.ItemsMapperCustom' mapperInterface 3 2017-04-01 09:15:46 [org.mybatis.spring.mapper.ClassPathMapperScanner]-[DEBUG] Creating MapperFactoryBean with name 'orderdetailMapper' and 'com.kjczwl.ssm.mapper.OrderdetailMapper' mapperInterface 4 2017-04-01 09:15:46 [org.mybatis.spring.mapper.ClassPathMapperScanner]-[DEBUG] Creating MapperFactoryBean with name 'ordersMapper' and 'com.kjczwl.ssm.mapper.OrdersMapper' mapperInterface 5 2017-04-01 09:15:46 [org.mybatis.spring.mapper.ClassPathMapperScanner]-[DEBUG] Creating MapperFactoryBean with name 'userMapper' and 'com.kjczwl.ssm.mapper.UserMapper' mapperInterface 6 2017-04-01 09:15:46 [org.springframework.context.support.PropertySourcesPlaceholderConfigurer]-[INFO] Loading properties file from class path resource [db.properties] 7 2017-04-01 09:15:46 [org.springframework.web.context.ContextLoader]-[ERROR] Context initialization failed 8 java.lang.NoClassDefFoundError: org/aspectj/weaver/reflect/ReflectionWorld$ReflectionWorldException 9 at java.lang.Class.getDeclaredMethods0(Native Method) 10 at java.lang.Class.privateGetDeclaredMethods(Class.java:2451) 11 at java.lang.Class.getDeclaredMethods(Class.java:1810) 12 at org.springframework.core.type.StandardAnnotationMetadata.hasAnnotatedMethods(StandardAnnotationMetadata.java:159) 13 at org.springframework.context.annotation.ConfigurationClassUtils.isLiteConfigurationCandidate(ConfigurationClassUtils.java:104) 14 at org.springframework.context.annotation.ConfigurationClassUtils.checkConfigurationClassCandidate(ConfigurationClassUtils.java:87) 15 at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:253) 16 at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanFactory(ConfigurationClassPostProcessor.java:240) 17 at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:694) 18 at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:684) 19 at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:461) 20 at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:383) 21 at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:283) 22 at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112) 23 at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4939) 24 at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434) 25 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) 26 at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559) 27 at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549) 28 at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) 29 at java.util.concurrent.FutureTask.run(FutureTask.java:166) 30 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 31 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 32 at java.lang.Thread.run(Thread.java:722) 33 Caused by: java.lang.ClassNotFoundException: org.aspectj.weaver.reflect.ReflectionWorld$ReflectionWorldException 34 at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1702) 35 at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1547) 36 ... 24 more
error: needed exception is java.lang.noclassdeffounderror: org/aopalliance/intercept/methodinterceptor
operating environment: jdk1.7.0_17 + tomcat 7 + eclipse
This error occurs when spring integration mybatis starts:
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from ServletContext resource [/WEB-INF/classes/spring/applicationContext-transaction.xml]; nested exception is java.lang.NoClassDefFoundError: org/aopalliance/intercept/MethodInterceptor
Solution:
Missing package: aopalliance.jar
To address: http://sourceforge.net/projects/aopalliance/files/ Download the package and copy it to your project. If you see “ NoClassDefFoundError: XXXXXXXX ” in the future, you generally lack any package. Take a closer look at whether your project lacks any package
Aopalliance.jar function: this package is the API package of AOP alliance, which contains aspect oriented interfaces. Generally, spring and other frameworks with dynamic weaving function rely on this package
error: configuration problem: ID is required for element ‘advice’ when used as a top-level tag
an error is reported when spring integrates mybatis:
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Configuration problem: Id is required for element ‘advice’ when used as a top-level tag
solution: the literal meaning is clear. When the tag “advice” is used as the top-level element, the tag needs the ID attribute,