error the @annotation pointcut expression is only supported at Java 5 compliance level or above 异常解决

1、异常信息

严重: Exception sending context initialized event to listener instance of class or
g.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean wit
h name ‘httpConnection‘ defined in file [F:\workspace\.metadata\.plugins\org.ecl
ipse.wst.server.core\tmp1\wtpwebapps\timetable\WEB-INF\classes\com\benben\timeta
ble\common\HttpConnection.class]: Initialization of bean failed; nested exceptio
n is java.lang.IllegalArgumentException: error the @annotation pointcut expressi
on is only supported at Java 5 compliance level or above
    at 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(Ab
stractBeanFactory.java:294)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSi
ngleton(DefaultSingletonBeanRegistry.java:225)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(Abst
ractBeanFactory.java:291)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstra
ctBeanFactory.java:193)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInst
antiateSingletons(DefaultListableBeanFactory.java:585)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFac
toryInitialization(AbstractApplicationContext.java:913)
    at org.springframework.context.support.AbstractApplicationContext.refresh(Abstr
actApplicationContext.java:464)
    at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicat
ionContext(ContextLoader.java:385)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(Cont
extLoader.java:284)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(Con
textLoaderListener.java:111)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:
5016)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:
5524)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:15
75)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:15
65)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalArgumentException: error the @annotation pointcut ex
pression is only supported at Java 5 compliance level or above
    at org.aspectj.weaver.tools.PointcutParser.parsePointcutExpression(PointcutPars
er.java:317)
    at org.springframework.aop.aspectj.AspectJExpressionPointcut.buildPointcutExpre
ssion(AspectJExpressionPointcut.java:207)
    at org.springframework.aop.aspectj.AspectJExpressionPointcut.buildPointcutExpre
ssion(AspectJExpressionPointcut.java:193)
    at org.springframework.aop.aspectj.AspectJExpressionPointcut.checkReadyToMatch(
AspectJExpressionPointcut.java:182)
    at org.springframework.aop.aspectj.AspectJExpressionPointcut.getClassFilter(Asp
ectJExpressionPointcut.java:163)
    at org.springframework.aop.support.AopUtils.canApply(AopUtils.java:209)
    at org.springframework.aop.support.AopUtils.canApply(AopUtils.java:263)
    at org.springframework.aop.support.AopUtils.findAdvisorsThatCanApply(AopUtils.j
ava:295)
    at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.
findAdvisorsThatCanApply(AbstractAdvisorAutoProxyCreator.java:117)
    at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.
findEligibleAdvisors(AbstractAdvisorAutoProxyCreator.java:87)
    at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.
getAdvicesAndAdvisorsForBean(AbstractAdvisorAutoProxyCreator.java:68)
    at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.wrapIfN
ecessary(AbstractAutoProxyCreator.java:359)
    at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postPro
cessAfterInitialization(AbstractAutoProxyCreator.java:322)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.j
ava:407)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.initializeBean(AbstractAutowireCapableBeanFactory.java:1461)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
    ... 20 more

五月 15, 2015 3:29:25 下午 org.apache.catalina.core.StandardContext listenerStart
严重: Exception sending context initialized event to listener instance of class co
m.benben.timetable.device.component.listener.SocketListener
org.springframework.beans.factory.BeanCreationException: Error creating bean wit
h name ‘httpConnection‘ defined in file [F:\workspace\.metadata\.plugins\org.ecl
ipse.wst.server.core\tmp1\wtpwebapps\timetable\WEB-INF\classes\com\benben\timeta
ble\common\HttpConnection.class]: Initialization of bean failed; nested exceptio
n is java.lang.IllegalArgumentException: error the @annotation pointcut expressi
on is only supported at Java 5 compliance level or above
    at 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(Ab
stractBeanFactory.java:294)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSi
ngleton(DefaultSingletonBeanRegistry.java:225)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(Abst
ractBeanFactory.java:291)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstra
ctBeanFactory.java:193)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInst
antiateSingletons(DefaultListableBeanFactory.java:585)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFac
toryInitialization(AbstractApplicationContext.java:913)
    at org.springframework.context.support.AbstractApplicationContext.refresh(Abstr
actApplicationContext.java:464)
    at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicat
ionContext(ContextLoader.java:385)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(Cont
extLoader.java:284)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(Con
textLoaderListener.java:111)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:
5016)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:
5524)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:15
75)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:15
65)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalArgumentException: error the @annotation pointcut ex
pression is only supported at Java 5 compliance level or above
    at org.aspectj.weaver.tools.PointcutParser.parsePointcutExpression(PointcutPars
er.java:317)
    at org.springframework.aop.aspectj.AspectJExpressionPointcut.buildPointcutExpre
ssion(AspectJExpressionPointcut.java:207)
    at org.springframework.aop.aspectj.AspectJExpressionPointcut.buildPointcutExpre
ssion(AspectJExpressionPointcut.java:193)
    at org.springframework.aop.aspectj.AspectJExpressionPointcut.checkReadyToMatch(
AspectJExpressionPointcut.java:182)
    at org.springframework.aop.aspectj.AspectJExpressionPointcut.getClassFilter(Asp
ectJExpressionPointcut.java:163)
    at org.springframework.aop.support.AopUtils.canApply(AopUtils.java:209)
    at org.springframework.aop.support.AopUtils.canApply(AopUtils.java:263)
    at org.springframework.aop.support.AopUtils.findAdvisorsThatCanApply(AopUtils.j
ava:295)
    at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.
findAdvisorsThatCanApply(AbstractAdvisorAutoProxyCreator.java:117)
    at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.
findEligibleAdvisors(AbstractAdvisorAutoProxyCreator.java:87)
    at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.
getAdvicesAndAdvisorsForBean(AbstractAdvisorAutoProxyCreator.java:68)
    at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.wrapIfN
ecessary(AbstractAutoProxyCreator.java:359)
    at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postPro
cessAfterInitialization(AbstractAutoProxyCreator.java:322)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.j
ava:407)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.initializeBean(AbstractAutowireCapableBeanFactory.java:1461)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
    ... 20 more

2、解决

度娘之后,说是org.aspect包的问题。我的包是1.6.2版本的。升级到1.7.3版本后,问题得到解决

  <org.aspectj.version>1.6.2</org.aspectj.version>

换成:

  <org.aspectj.version>1.7.3</org.aspectj.version>
时间: 2024-10-07 21:00:52

error the @annotation pointcut expression is only supported at Java 5 compliance level or above 异常解决的相关文章

error the @annotation pointcut expression is only supported at Java 5

eclipse搭建环境后报错 the pointcut is supported at Java 5 错误意思大致是:注释切入点表达式只支持在Java 5版本以上,我就纳闷了我安装的是jdk1.8啊,不应该是jdk版本低的问题.仔细琢磨了下应该是Spring和注解相关的类包 aspectjweaver.jar中有关于JDK版本的判断.我就去我的项目中查看对应aspectjweaver.jar包的版本为1.5 有两种解决此错误的方法: 1.就是卸载1.7以上版本的JDK,重新安装1.6版本的JDK

Spring AOP中pointcut expression表达式解析 及匹配多个条件

Pointcut 是指那些方法需要被执行"AOP",是由"Pointcut Expression"来描述的. Pointcut可以有下列方式来定义或者通过&& || 和!的方式进行组合. args() @args() execution() this() target() @target() within() @within() @annotation 其中 execution 是用的最多的,其格式为: execution(modifiers-pat

Spring AOP中pointcut expression表达式解析

Pointcut 是指那些方法需要被执行"AOP",是由"Pointcut Expression"来描述的. Pointcut可以有下列方式来定义或者通过&& || 和!的方式进行组合. args() @args() execution() this() target() @target() within() @within() @annotation 其中execution 是用的最多的,其格式为: execution(modifiers-patt

Type Syntax error, insert &quot;)&quot; to complete Expression

今天倒持了 几个小时! 愣是 没有明白 ,为什么我的JSP的第一行没有代码?  还是报错! 错误是: Description Resource Path Location Type Syntax error, insert ")" to complete Expression left.jsp /qyrs/WebRoot/admin/iframe line 1 Client-side JavaScript Problem 翻译: 描述资源路径位置类型语法错误,插入")&quo

NDK编译可执行文件在Android 中运行显示error: only position independent executables (PIE) are supported.失败问题解决办法。

由于使用了NDK编译的可执行文件在应用中调用,在Android 7.0上的运行情况发现,当运行该可执行文件时,报如下错误: error: only position independent executables (PIE) are supported. PIE这个安全机制从4.1引入,但是Android L之前的系统版本并不会去检验可执行文件是否基于PIE编译出的.因此不会报错.但是Android L已经开启验证,如果调用的可执行文件不是基于PIE方式编译的,则无法运行.解决办法非常简单,在A

bullet, iOS真机编译错误error: identifier or immediate expression expected解决方法

刚才发现c3dEngine2(http://git.oschina.net/wantnon2/c3dEngine2 或 https://github.com/wantnon2/c3dEngine2)的bulletTest1 demo在iOS真机上编译不过,报error: identifier or immediate expression expected的编译错误. google了一下,找到下面帖子:http://www.bulletphysics.org/Bullet/phpBB3/view

Keil MDK C (error: #29: expected an expression) 错误的解决

今天,自己建了一个EFM32工程模版,调试代码时显示 ..\App\Panel_main.c(119): error:  #29: expected an expression 仔细的检查了半个小时,最后解决了!问题关键点如下图: Misc Controls 默认是C90,只要将改为C99即可解决 打完收工!!!

【AS扫盲】A built error “Renderscript support mode is not currently supported with target 21+”

前几天更新Android Studio1.5(以下简称AS)到2.0时,出现了这个错误:A built error “Renderscript support mode is not currently supported with target 21+” happened when my minSDKVersion is 21 后来从Stack Overflow上找到一个答案,说这是一个bug,唯有把build-tools升级到23.0.3版本才行,升级后就解决了. Stack Overflo

【转】NDK编译可执行文件在Android L中运行显示error: only position independent executables (PIE) are supported.失败问题解决办法。

原文网址:http://blog.csdn.net/hxdanya/article/details/39371759 由于使用了NDK编译的可执行文件在应用中调用,在4.4及之前的版本上一直没出问题.最近由于要测试在Android L上的运行情况发现,当运行该可执行文件时,报如下错误: error: only position independent executables (PIE) are supported. PIE这个安全机制从4.1引入,但是Android L之前的系统版本并不会去检验