欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

error at ::0 can't find referenced pointcut declareJointPointExpression

程序员文章站 2024-02-08 14:45:40
...

有的时候我们的代码写的没有问题,可是我们的控制台一直报错,下面我们就来解决这个问题:

"C:\Program Files\Java\jdk1.8.0_121\bin\java" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2017.1.5\lib\idea_rt.jar=50636:C:\Program Files\JetBrains\IntelliJ IDEA 2017.1.5\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\Java\jdk1.8.0_121\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\cldrdata.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\jfxrt.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\nashorn.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\sunpkcs11.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\zipfs.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\jfxswt.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\rt.jar;F:\spring02\out\production\spring02;F:\spring02\lib\aspectjrt.jar;F:\spring02\lib\aopalliance.jar;F:\spring02\lib\c3p0-0.9.5.2.jar;F:\spring02\lib\aspectj-1.8.6.jar;F:\spring02\lib\aspectjweaver.jar;F:\spring02\lib\commons-logging-1.1.1.jar;F:\spring02\lib\spring-tx-4.0.2.RELEASE.jar;F:\spring02\lib\spring-aop-4.0.2.RELEASE.jar;F:\spring02\lib\spring-jms-4.0.2.RELEASE.jar;F:\spring02\lib\spring-orm-4.0.2.RELEASE.jar;F:\spring02\lib\spring-oxm-4.0.2.RELEASE.jar;F:\spring02\lib\spring-web-4.0.2.RELEASE.jar;F:\spring02\lib\spring-core-4.0.2.RELEASE.jar;F:\spring02\lib\spring-jdbc-4.0.2.RELEASE.jar;F:\spring02\lib\spring-test-4.0.2.RELEASE.jar;F:\spring02\lib\spring-beans-4.0.2.RELEASE.jar;F:\spring02\lib\mchange-commons-java-0.2.11.jar;F:\spring02\lib\spring-webmvc-4.0.2.RELEASE.jar;F:\spring02\lib\spring-aspects-4.0.2.RELEASE.jar;F:\spring02\lib\spring-context-4.0.2.RELEASE.jar;F:\spring02\lib\spring-build-src-4.0.2.RELEASE.jar;F:\spring02\lib\spring-messaging-4.0.2.RELEASE.jar;F:\spring02\lib\spring-websocket-4.0.2.RELEASE.jar;F:\spring02\lib\mysql-connector-java-5.1.42-bin.jar;F:\spring02\lib\spring-expression-4.0.2.RELEASE.jar;F:\spring02\lib\spring-instrument-4.0.2.RELEASE.jar;F:\spring02\lib\spring-tx-4.0.2.RELEASE-javadoc.jar;F:\spring02\lib\spring-tx-4.0.2.RELEASE-sources.jar;F:\spring02\lib\spring-aop-4.0.2.RELEASE-javadoc.jar;F:\spring02\lib\spring-aop-4.0.2.RELEASE-sources.jar;F:\spring02\lib\spring-jms-4.0.2.RELEASE-javadoc.jar;F:\spring02\lib\spring-jms-4.0.2.RELEASE-sources.jar;F:\spring02\lib\spring-orm-4.0.2.RELEASE-javadoc.jar;F:\spring02\lib\spring-orm-4.0.2.RELEASE-sources.jar;F:\spring02\lib\spring-oxm-4.0.2.RELEASE-javadoc.jar;F:\spring02\lib\spring-oxm-4.0.2.RELEASE-sources.jar;F:\spring02\lib\spring-web-4.0.2.RELEASE-javadoc.jar;F:\spring02\lib\spring-web-4.0.2.RELEASE-sources.jar;F:\spring02\lib\spring-core-4.0.2.RELEASE-javadoc.jar;F:\spring02\lib\spring-core-4.0.2.RELEASE-sources.jar;F:\spring02\lib\spring-jdbc-4.0.2.RELEASE-javadoc.jar;F:\spring02\lib\spring-jdbc-4.0.2.RELEASE-sources.jar;F:\spring02\lib\spring-test-4.0.2.RELEASE-javadoc.jar;F:\spring02\lib\spring-test-4.0.2.RELEASE-sources.jar;F:\spring02\lib\spring-beans-4.0.2.RELEASE-javadoc.jar;F:\spring02\lib\spring-beans-4.0.2.RELEASE-sources.jar;F:\spring02\lib\spring-framework-bom-4.0.2.RELEASE.jar;F:\spring02\lib\spring-webmvc-4.0.2.RELEASE-javadoc.jar;F:\spring02\lib\spring-webmvc-4.0.2.RELEASE-sources.jar;F:\spring02\lib\spring-webmvc-portlet-4.0.2.RELEASE.jar;F:\spring02\lib\spring-aspects-4.0.2.RELEASE-javadoc.jar;F:\spring02\lib\spring-aspects-4.0.2.RELEASE-sources.jar;F:\spring02\lib\spring-context-4.0.2.RELEASE-javadoc.jar;F:\spring02\lib\spring-context-4.0.2.RELEASE-sources.jar;F:\spring02\lib\spring-context-support-4.0.2.RELEASE.jar;F:\spring02\lib\spring-instrument-tomcat-4.0.2.RELEASE.jar;F:\spring02\lib\spring-messaging-4.0.2.RELEASE-javadoc.jar;F:\spring02\lib\spring-messaging-4.0.2.RELEASE-sources.jar;F:\spring02\lib\spring-websocket-4.0.2.RELEASE-javadoc.jar;F:\spring02\lib\spring-websocket-4.0.2.RELEASE-sources.jar;F:\spring02\lib\spring-expression-4.0.2.RELEASE-javadoc.jar;F:\spring02\lib\spring-expression-4.0.2.RELEASE-sources.jar;F:\spring02\lib\spring-instrument-4.0.2.RELEASE-javadoc.jar;F:\spring02\lib\spring-instrument-4.0.2.RELEASE-sources.jar;F:\spring02\lib\spring-framework-bom-4.0.2.RELEASE-javadoc.jar;F:\spring02\lib\spring-framework-bom-4.0.2.RELEASE-sources.jar;F:\spring02\lib\spring-webmvc-portlet-4.0.2.RELEASE-javadoc.jar;F:\spring02\lib\spring-webmvc-portlet-4.0.2.RELEASE-sources.jar;F:\spring02\lib\spring-context-support-4.0.2.RELEASE-javadoc.jar;F:\spring02\lib\spring-context-support-4.0.2.RELEASE-sources.jar;F:\spring02\lib\spring-instrument-tomcat-4.0.2.RELEASE-javadoc.jar;F:\spring02\lib\spring-instrument-tomcat-4.0.2.RELEASE-sources.jar" com.yuehailin.aop.Main
一月 31, 2018 9:37:02 下午 org.springframework.context.support.AbstractApplicationContext prepareRefresh
信息: Refreshing org[email protected]6aa8ceb6: startup date [Wed Jan 31 21:37:02 CST 2018]; root of context hierarchy
一月 31, 2018 9:37:03 下午 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
信息: Loading XML bean definitions from class path resource [applicationContext.xml]
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'arithmeticCalculator' defined in file [F:\spring02\out\production\spring02\com\yuehailin\aop\ArithmeticCalculatorImpl.class]: Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: error at ::0 can't find referenced pointcut declareJointPointExpression
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:547)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:700)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:760)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
	at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
	at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
	at com.yuehailin.aop.Main.main(Main.java:11)
Caused by: java.lang.IllegalArgumentException: error at ::0 can't find referenced pointcut declareJointPointExpression
	at org.aspectj.weaver.tools.PointcutParser.parsePointcutExpression(PointcutParser.java:317)
	at org.springframework.aop.aspectj.AspectJExpressionPointcut.buildPointcutExpression(AspectJExpressionPointcut.java:212)
	at org.springframework.aop.aspectj.AspectJExpressionPointcut.buildPointcutExpression(AspectJExpressionPointcut.java:199)
	at org.springframework.aop.aspectj.AspectJExpressionPointcut.checkReadyToMatch(AspectJExpressionPointcut.java:188)
	at org.springframework.aop.aspectj.AspectJExpressionPointcut.getClassFilter(AspectJExpressionPointcut.java:168)
	at org.springframework.aop.support.AopUtils.canApply(AopUtils.java:208)
	at org.springframework.aop.support.AopUtils.canApply(AopUtils.java:262)
	at org.springframework.aop.support.AopUtils.findAdvisorsThatCanApply(AopUtils.java:294)
	at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findAdvisorsThatCanApply(AbstractAdvisorAutoProxyCreator.java:118)
	at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findEligibleAdvisors(AbstractAdvisorAutoProxyCreator.java:88)
	at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.getAdvicesAndAdvisorsForBean(AbstractAdvisorAutoProxyCreator.java:69)
	at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.wrapIfNecessary(AbstractAutoProxyCreator.java:376)
	at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessAfterInitialization(AbstractAutoProxyCreator.java:339)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:421)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1558)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
	... 11 more

Process finished with exit code 1
 解决办法:

 aspectjweaver.jar 和aspectjrt.jar这两个jar包的版本升级一下用aspectjweaver-1.7.0 和aspectjrt-1.7.2这两个版本的jar包就可以运行成功.

jar包下载地址:

http://download.csdn.net/download/yuehailin/10234272

没有积分的可以私聊我。