Today, I encountered an error while using ASPECTJ for annotation facets.
The pointcut expression is not recognized--The detailed error message is as follows:
ExceptioninchThread"Main"Org.springframework.beans.factory.BeanCreationException:Error Creating Bean with Name'Xingoo'Definedinch classPath resource [Bean.xml]: Initialization of Bean failed; Nested exception isJava.lang.IllegalArgumentException:error at::0Can't find referenced pointcut performanceAt Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean ( Abstractautowirecapablebeanfactory.java:527) at Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean ( Abstractautowirecapablebeanfactory.java:456) at org.springframework.beans.factory.support.abstractbeanfactory$1. GetObject (Abstractbeanfactory.java:291) at Org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton ( Defaultsingletonbeanregistry.java:222) at Org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (Abstractbeanfactory.java:288) at Org.springframework.beans.factory.support.AbstractBeanFactory.getBean (Abstractbeanfactory.java: the) at Org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons ( Defaultlistablebeanfactory.java:580) at Org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization ( Abstractapplicationcontext.java:895) at Org.springframework.context.support.AbstractApplicationContext.refresh (Abstractapplicationcontext.java: 425) at Org.springframework.context.support.ClassPathXmlApplicationContext.<init> (Classpathxmlapplicationcontext.java:139) at Org.springframework.context.support.ClassPathXmlApplicationContext.<init> (Classpathxmlapplicationcontext.java: the) at Com.spring.test.chap44.test.main (Test.java:8) caused by:java.lang.IllegalArgumentException:error at::0Can't find referenced pointcut performanceAt Org.aspectj.weaver.tools.PointcutParser.parsePointcutExpression (Pointcutparser.java:315) at Org.springframework.aop.aspectj.AspectJExpressionPointcut.buildPointcutExpression ( Aspectjexpressionpointcut.java:195) at Org.springframework.aop.aspectj.AspectJExpressionPointcut.checkReadyToMatch ( Aspectjexpressionpointcut.java:181) at Org.springframework.aop.aspectj.AspectJExpressionPointcut.getClassFilter (Aspectjexpressionpointcut.java :162) at org.springframework.aop.support.AopUtils.canApply (Aoputils.java: $) at org.springframework.aop.support.AopUtils.canApply (Aoputils.java:254) at org.springframework.aop.support.AopUtils.findAdvisorsThatCanApply (Aoputils.java:286) at Org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findAdvisorsThatCanApply ( Abstractadvisorautoproxycreator.java:117) at Org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findEligibleAdvisors ( Abstractadvisorautoproxycreator.java: the) at Org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.getAdvicesAndAdvisorsForBean ( Abstractadvisorautoproxycreator.java: the) at Org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.wrapIfNecessary ( Abstractautoproxycreator.java:359) at Org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessAfterInitialization ( Abstractautoproxycreator.java:322) at Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization (Abstractautowirecapablebeanfactory.java:407) at Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean ( Abstractautowirecapablebeanfactory.java:1426) at Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean ( Abstractautowirecapablebeanfactory.java:519) ... OneMore
Search the Internet, found that the JDK does not match.
I used the JDK1.7 match is aspectjrt.1.6 and aspectjweaver.1.6, so will error.
If you are using ASPECTJ to complete the annotation facets, you need to be aware of the following JDK matches with AspectJ:
jdk1.6--aspectj1.6
jdk1.7--aspectj1.7.3+
I found a 1.7.4 version here, the pro-test is available.
The following are available:
Csdn
Baidu Cloud Disk: Aspectjrt-1.7.4.jar Aspectjweaver-1.7.4.jar
"Spring Combat"--12 ASPECTJ Error: Error at:: 0 can ' t find referenced pointcut XXX