问题描述
各位大神。小弟刚刚接触osgi和Spring,现在有个工程是基于osgi和Springmvc的,项目启动成功了。页面也访问了。但是在触发链接跳转controller的时候却报错,报错信息如下,org.springframework.beans.factory.BeanDefinitionStoreException:UnexpectedexceptionparsingXMLdocumentfromServletContextresource[/WEB-INF/spring-servlet.xml];nestedexceptionisorg.springframework.beans.FatalBeanException:NamespaceHandlerclass[org.springframework.context.config.ContextNamespaceHandler]fornamespace[http://www.springframework.org/schema/context]notfound;nestedexceptionisjava.lang.ClassNotFoundException:org.springframework.context.config.ContextNamespaceHandlerorg.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:412)org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124)org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:93)org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:467)org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:397)org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:442)org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:458)org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:339)org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:306)org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:127)javax.servlet.GenericServlet.init(GenericServlet.java:244)org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)org.eclipse.virgo.web.tomcat.support.ApplicationNameTrackingValve.invoke(ApplicationNameTrackingValve.java:33)org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:405)org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:269)org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:515)org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302)java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)java.lang.Thread.run(Thread.java:619)希望各位大神帮忙看看是什么原因。
解决方案
本帖最后由 bbshenyes 于 2014-08-20 18:56:00 编辑