首页 新闻 搜索 专区 学院

求问大神,在整合ssh的时候出现这个报错。

0
悬赏园豆:10 [已解决问题] 解决于 2017-05-11 01:13


五月 04, 2017 11:33:31 下午 org.apache.catalina.core.ApplicationContext log
信息: Initializing Spring root WebApplicationContext
2017-05-04 23:33:44,750 ERROR [org.springframework.web.context.ContextLoader] - Context initialization failed
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)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124)
at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:92)
at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)
at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:422)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5077)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5591)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1574)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1564)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: 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.context.config.ContextNamespaceHandler$1.parse(ContextNamespaceHandler.java:65)
at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:69)
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1297)
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1287)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:135)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:92)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:507)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:398)
... 22 more
五月 04, 2017 11:33:44 下午 org.apache.catalina.core.StandardContext listenerStart
严重: 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)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124)
at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:92)
at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)
at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:422)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5077)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5591)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1574)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1564)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: 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.context.config.ContextNamespaceHandler$1.parse(ContextNamespaceHandler.java:65)
at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:69)
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1297)
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1287)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:135)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:92)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:507)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:398)
... 22 more

五月 04, 2017 11:33:44 下午 org.apache.catalina.core.ApplicationContext log
信息: Set web app root system property: 'webapp.root' = [D:\TTS9\tts9\apache-tomcat-7.0.67\wtpwebapps\SSH\]
五月 04, 2017 11:33:44 下午 org.apache.catalina.core.ApplicationContext log
信息: Initializing log4j from [classpath:log4j.properties]
五月 04, 2017 11:33:44 下午 org.apache.catalina.core.StandardContext startInternal
严重: One or more listeners failed to start. Full details will be found in the appropriate container log file
五月 04, 2017 11:33:48 下午 org.apache.catalina.util.SessionIdGeneratorBase createSecureRandom
信息: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [3,820] milliseconds.
五月 04, 2017 11:33:48 下午 org.apache.catalina.core.StandardContext startInternal
严重: Context [/HSS] startup failed due to previous errors
五月 04, 2017 11:33:48 下午 org.apache.catalina.core.ApplicationContext log
信息: Shutting down log4j
五月 04, 2017 11:33:48 下午 org.apache.catalina.core.ApplicationContext log
信息: Closing Spring root WebApplicationContext
五月 04, 2017 11:33:48 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory D:\TTS9\tts9\apache-tomcat-7.0.67\webapps\docs
五月 04, 2017 11:33:48 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory D:\TTS9\tts9\apache-tomcat-7.0.67\webapps\docs has finished in 82 ms
五月 04, 2017 11:33:48 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory D:\TTS9\tts9\apache-tomcat-7.0.67\webapps\examples
五月 04, 2017 11:33:48 下午 org.apache.catalina.core.ApplicationContext log
信息: ContextListener: contextInitialized()
五月 04, 2017 11:33:48 下午 org.apache.catalina.core.ApplicationContext log
信息: SessionListener: contextInitialized()
五月 04, 2017 11:33:48 下午 org.apache.catalina.core.ApplicationContext log
信息: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@1619483')
五月 04, 2017 11:33:48 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory D:\TTS9\tts9\apache-tomcat-7.0.67\webapps\examples has finished in 209 ms
五月 04, 2017 11:33:48 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory D:\TTS9\tts9\apache-tomcat-7.0.67\webapps\host-manager
五月 04, 2017 11:33:48 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory D:\TTS9\tts9\apache-tomcat-7.0.67\webapps\host-manager has finished in 57 ms
五月 04, 2017 11:33:48 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory D:\TTS9\tts9\apache-tomcat-7.0.67\webapps\manager
五月 04, 2017 11:33:49 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory D:\TTS9\tts9\apache-tomcat-7.0.67\webapps\manager has finished in 48 ms
五月 04, 2017 11:33:49 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory D:\TTS9\tts9\apache-tomcat-7.0.67\webapps\ROOT
五月 04, 2017 11:33:49 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory D:\TTS9\tts9\apache-tomcat-7.0.67\webapps\ROOT has finished in 42 ms
五月 04, 2017 11:33:49 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-bio-8089"]
五月 04, 2017 11:33:49 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["ajp-bio-8009"]
五月 04, 2017 11:33:49 下午 org.apache.catalina.startup.Catalina start
信息: Server startup in 19545 ms

铭仔的主页 铭仔 | 初学一级 | 园豆:193
提问于:2017-05-04 23:59
< >
分享
最佳答案
1

Context namespace element 'component-scan' and its parser class [org.springframework.context.annotation.ComponentScanBeanDefinitionParser] are only available on JDK 1.5 and higher

1.5或者更高版本

收获园豆:10
lvyahui | 菜鸟二级 |园豆:236 | 2017-05-05 14:54
其他回答(2)
1

安装高版本jdk试试

花飘水流兮 | 园豆:11938 (专家六级) | 2017-05-05 03:31
1

用的是JDK8吧,改用7的吧,要不就修改源码

狼爷 | 园豆:1202 (小虾三级) | 2017-05-05 09:11
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册