Mule 弹药配置错误

Mule 弹药配置错误,mule,mule-studio,Mule,Mule Studio,我的Mule项目中有一个Munit测试用例示例。但该文件始终在配置文件开头的标记处显示错误标记 注意:但目前我能够执行我的munit测试用例 错误是: cvc复杂类型.2.4.a:发现以开头的内容无效 元素“munit:config”。什么之中的一个 “{”:注释, “”:说明 此错误表示munit jar不在您的类路径中这是一篇旧文章,但我看不到答案。我遇到了同样的问题: 我有 在声明的顶部。我删除了它,因为我也有 xmlns:core=”http://www.mulesoft.org/sc

我的Mule项目中有一个Munit测试用例示例。但该文件始终在配置文件开头的
标记处显示错误标记

注意:但目前我能够执行我的munit测试用例

错误是:

cvc复杂类型.2.4.a:发现以开头的内容无效 元素“munit:config”。什么之中的一个 “{”:注释, “”:说明


此错误表示munit jar不在您的类路径中

这是一篇旧文章,但我看不到答案。我遇到了同样的问题:

我有

在声明的顶部。我删除了它,因为我也有

xmlns:core=”http://www.mulesoft.org/schema/mule/core“下面


这修复了错误。

为了帮助在Anypoint Studio 6.5和munit tools 3.9.0中仍然面临此问题的任何其他人和未来的我,我们必须按照以下方式配置munit配置全局元素

<mule xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:munit="http://www.mulesoft.org/schema/mule/munit" xmlns:spring="http://www.springframework.org/schema/beans" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:tls="http://www.mulesoft.org/schema/mule/tls" xmlns:core="http://www.mulesoft.org/schema/mule/core" xmlns:mock="http://www.mulesoft.org/schema/mule/mock" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mulesoft.org/schema/mule/munit http://www.mulesoft.org/schema/mule/munit/current/mule-munit.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/tls http://www.mulesoft.org/schema/mule/tls/current/mule-tls.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/mock http://www.mulesoft.org/schema/mule/mock/current/mule-mock.xsd">
<munit:config mock-connectors="false" mock-inbounds="false" name="munit" 
    doc:name="MUnit configuration"/>
    <spring:beans>
        <spring:import resource="classpath:insurer-sys-api.xml"/>
        <spring:import resource="classpath:global.xml"/>
        <spring:import resource="classpath:insurer-sys-api-claims.xml"/>
        <spring:import resource="classpath:insurer-sys-api-policyValidation.xml"/>
        <spring:import resource="classpath:insurer-ctp-sys-api-shared.xml"/>
        <spring:import resource="classpath:insurer-ctp-sys-api-health.xml"/>
    </spring:beans>
    <http:request-config name="HTTPS_Request_Configuration" protocol="HTTPS" 
    host="localhost" port="8082" basePath="/api" doc:name="HTTP Request 
    Configuration">
        <tls:context>
            <tls:trust-store insecure="true"/>
        </tls:context>

    </http:request-config>

检查文件名或流名是否重复。 即使文件位于不同的文件夹或包中


不管怎样,都要使它们唯一!

这是否已排序?您是否已将munit jar添加到MuleStudio项目类路径中,并且错误消失了?嗨,paul,感谢您的回复。不,错误仍然存在。我从一开始就在项目构建路径配置中拥有所有依赖munit的jar。当我从架构位置defi删除mule.xsd时没有显示错误。我相信错误在于Mule.Xsd。目前,我指向Mule.Xsd的以下位置。“如下所示的全局元素”他们在哪里?许多抱歉,我当时是一个noob,我没有将xml格式化为stackoverflow“代码块”,如果帖子上没有代码块标记,代码文本将永远不会出现应收账!