新手求指教: java使用ssh框架配置web.xml文件启动tomcat报严重: 怎么解决

Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [applicationContext.xml]; nested exception is java.lang.IllegalStateException: Context namespace element 'component-scan' and its parser class [org.springframework.context.annotation.ComponentScanBeanDefinitionParser] are only available on JDK 1.5 and higher
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:420)

你项目的jdk版本是多少的?是项目设置的那个,点击项目右键,

追问

这个只有1.3到1.6的 没有其他版本了

追答

1.6不行嘛?我这选的1.6,jdk用的1.7的就可以,你那JDK版本是不是太高了。

温馨提示:内容为网友见解,仅供参考
第1个回答  2014-12-15
都用到1.8了啊,兄弟还停留在1.6呢,看这个字面的错误意思是component-scan这个标签只支持jdk1.5及以上,你没试试把jdk版本往下调调,是不是太高了
第2个回答  2014-12-15
看一下你的tomcat配置的对应java版本,也配置也java 8就可以了。
相似回答