无法找到名称空间http://www.mulesoft.org/schema/mule/jersey的NamespaceHandler

时间:2012-11-19 22:05:49

标签: java xml web-services xsd mule

我可能真的不喜欢这个,但任何人都可以查看这个配置并告诉我为什么我在tomcat 7启动时会看到这个问题?我正在使用mule 3.3,但您可以从下面的标题中看到。

Unable to locate NamespaceHandler for namespace [http://www.mulesoft.org/schema/mule/jersey]

这是我的mule配置文件的标题:

<mule xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:spring="http://www.springframework.org/schema/beans"
    xmlns:mulexml="http://www.mulesoft.org/schema/mule/xml" xmlns:jersey="http://www.mulesoft.org/schema/mule/jersey" 
    xsi:schemaLocation="  
    http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd  
    http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/3.3/mule.xsd  
    http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/3.3/mule-http.xsd  
    http://www.mulesoft.org/schema/mule/xml http://www.mulesoft.org/schema/mule/xml/3.3/mule-xml.xsd 
    http://www.mulesoft.org/schema/mule/jersey http://www.mulesoft.org/schema/mule/jersey/3.0/mule-jersey.xsd
    http://jersey.apache.org/core http://jersey.apache.org/schemas/core.xsd">

这是使用球衣标签的内容:

<flow name="HelloWorld">
 <inbound-endpoint address="http://localhost:8081/helloworld"/>
     <jersey:resources>
         <component class="com.sample.helloworld.HelloRest"/>
     </jersey:resources>
</flow> 

1 个答案:

答案 0 :(得分:4)

如果您使用maven,请将以下依赖项添加到您的POM:

<dependency>
        <groupId>org.mule.modules</groupId>
        <artifactId>mule-module-jersey</artifactId>
        <version>3.3.0</version>
</dependency>