我正在尝试在 karaf 中部署 Web 应用程序包,但不知何故,即使在正确的架构之后,也无法找到 XML 架构命名空间的 Spring NamespaceHandler。
可能是什么问题?
Karaf version : 3.0.0
Spring version : 3.2.x
Jetty version : 8.x
更多详情如下:
部署时出错:
org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
Configuration problem: Unable to locate Spring NamespaceHandler for XML schema
namespace [http://www.springframework.org/schema/mvc]
上下文类
<context-param>
<param-name>contextClass</param-name>
<param-value>org.springframework.osgi.web.context.support.OsgiBundleXmlWebApplicationContext</param-value>
</context-param>
上下文文件:
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
<mvc:resources mapping="/mydcos/**" location="file:/opt/mydocs/css/" />