maven 项目 install可以成功,tomcat启动报locate NamespaceHandler for namespace

ZacharyJH 发布于 2016/10/13 11:47
阅读 236
收藏 0

maven clean  install 都可以成功,tomcat 运行报错,请问怎么解决

严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener

org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate NamespaceHandler for namespace [http://www.springframework.org/schema/context]
Offending resource: class path resource [applicationContext-core.xml] atorg.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:57)
at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:64)
at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:55)
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1144)
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1137)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:145)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:89)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:499)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:407)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:357)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:126)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:142)
at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:123)
at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:91)
at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:94)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:294)
at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:156)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4812)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5255)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
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)


加载中
0
指尖的舞者
指尖的舞者
配置文件或者jar缺少.  理论上错误里会抛给你但是你发的错误看不出来啥来
ZacharyJH
ZacharyJH
回复 @指尖的舞者 : 配置文件是非maven项目的,可以运行,jar包也是原项目的,现在就是不知道什么问题
指尖的舞者
指尖的舞者
http://www.springframework.org/schema/context
0
阿信sxq
阿信sxq
你是不是缺少context的jar包
0
太黑_thj
太黑_thj
看下工程路径对不对吧,能是你的maven工程的相关路径有问题 导致找不到
0
草的高度
草的高度
估计是你的applicationContext.xml有错误
0
ZacharyJH
ZacharyJH
我又新建了一个项目,把依赖的jar包减少了些,现在是可以运行了,估计是jar包冲突了,或是jar包引入的不对,但非maven项目确实可以运行,具体原因目前还没找到。
返回顶部
顶部