org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [applicationContext.xml]; nested exception is java.lang.IllegalStateException: AnnotationAwareAspectJAutoProxyCreator is only available on Java 1.5 and higher
你的XML里面有不规范的写法,编译xml文件的时候出错,具体哪里不规范还得看代码,
写的很明显呀
AnnotationAwareAspectJAutoProxyCreator is only available on Java 1.5 and higher
切面注解至少需要jdk1.5或者更高版本
去下载jdk1.8
你是XML解析有问题,你再pom一下
你修改一下你的eclipse 里面的jdk版本,用maven 默认是1.5的版本,你要换成你本地安装的版本
建议你把 applicationContext.xml这个文件贴出来 让大家看看哪里有问题
项目右键属性里找修改eclipse的jdk版本
单击项目右键properties,Java compiler选项修改jdk的版本
<?xml version="1.0" encoding="UTF-8"?>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
<aop:aspectj-autoproxy></aop:aspectj-autoproxy>
<import resource="resource/budgettest/budgettest-spring.xml"/>
<import resource="resource/app/app-spring.xml"/>
<import resource="resource/cxf/cxf-beans-spring.xml"/>
<import resource="resource/supply/supplycontractapprove-spring.xml"/>
<import resource="resource/ids2/ids2-spring.xml"/>
<import resource="resource/app/service/service-beans-spring.xml"/>
<import resource="resource/task/task-beans-spring.xml"/>
<import resource="resource/app/monitor/monitor-spring.xml"/>
<import resource="resource/app/monitor/monitor-spring.xml"/>
<import resource="resource/app/timeoutwarning/timeoutwarning-spring.xml"/>
<import resource="resource/app/implement/implement-spring.xml"/>
<import resource="resource/app/basestationinfo/basestationinfo-spring.xml"/>
<import resource="resource/cache/common-cache-spring.xml"/>
<import resource="resource/app/paysta/paysta-spring.xml"/>
</beans>
项目运用jdk版本高的比喻:1.6/1.7/1.8编译后,启动便可
我感觉应该是你的配置文件里有错误,重点看ContextListenner相关的配置
提示错误明显:需要更高的jdk版本编译,项目运用jdk版本高的比喻:1.6/1.7/1.8编译后,启动便可
1.检查eclipse中已经引入的JDK版本,window-》preferences-》java-》installed jres,请引入JDK5以上的版本。
2.检查当前工程引入的JDK版本,右键项目,build path-》configurate build path -》检查Libraries下的JRE System Library版本,请使用JDK5以上的版本。
3.如果使用Maven创建项目,请在pom.xml中添加一下代码:
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<!-- Web项目 -->
<version>3.1</version>
<configuration>
<!-- JDK版本 -->
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
并且右键maven项目,properties-》project facets中修改JDK版本。
JDK
版本过低,更新版本或者如果你装的版本已经是高版本,那就在配置里改
AnnotationAwareAspectJAutoProxyCreator is only available on Java 1.5 and higher
, 单看这一句的话是Jdk版本太低,Java注解是在jdk1.5开始才支持的,难道你的版本还不到1.5吗??
如果是maven 文件的话,看下pom文件里知道的jdk版本是多少
这应该是你从别的地方拷贝的项目放到自己的eclipse上的,不是自己建的项目吧?
这应该是你自己电脑上的jdk版本和原项目使用的jdk不一致的原因,
在这个项目上右键 ->选择 Bulid Path -> 再选择 Configure Bulid Path
在弹窗中找到Java Bulid Path 点击 Libraries(一般默认打开)
再将Libraries里的所有内容都删除 Remove 掉
再点击Add Librariy 分别添加server runtime(tomact版本)、jre system Libraries(jdk版本(jre))、web app libraries(web项目都需要的)
如果用到了单元测试 可以再加上junit 保存 重启项目
系统和你jdk对用的版本不对啊
JDK可得版本过高,去降低你的JDK版本,再重新编译一下就好了