2014-11-24 67 views
0

我試圖在karaf中部署Web應用程序包,但以某種方式無法爲XML模式名稱空間找到Spring NamespaceHandler,即使在正確的架構之後。無法在Web應用程序包中找到OSGi(Karaf)中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類

<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/" /> 

回答

0

請確保您在Karaf中安裝了spring-webmvc。 Spring DM有點遺憾,但MVC命名空間處理程序的註冊方式與其餘部分相同。

相關問題