【问题标题】:Unable to locate NamespaceHandler for namespace http://www.mulesoft.org/schema/mule/jersey无法找到命名空间 http://www.mulesoft.org/schema/mule/jersey 的 NamespaceHandler
【发布时间】:2012-11-07 22:11:14
【问题描述】:

我可能真的不喜欢这个,但是任何人都可以查看这个配置并告诉我为什么我在 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> 

【问题讨论】:

  • 你错过了在类路径中处理配置文件中jersey xml 命名空间的 JAR 文件
  • 我已将 com.sun.jerseyjersey-client 添加到与网络远程相关的每个 pom.xml服务,我仍然遇到问题

标签: java xml web-services xsd mule


【解决方案1】:

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

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

【讨论】:

  • 我对球衣有错误的依赖关系谢谢你你在 tomcat 上的 sn-p 刚刚正确启动服务失败但那是我的问题:p 谢谢!
猜你喜欢
  • 2014-02-04
  • 2013-06-10
  • 2013-10-04
  • 2015-02-25
  • 2017-10-05
  • 2019-01-27
  • 1970-01-01
  • 2011-01-10
相关资源
最近更新 更多