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>
上一篇:中通快递物流单号查询API接口免费对接案例


下一篇:Xenserver主机闪断、其上虚拟机无法操作异常解决