4

I have sample Munit Test case in My Mule Project. But the file always showing an error mark at <munit:config> tag at the start of the configuration file.

Note: But currently I'm able to execute my munit test cases.

The error is:

cvc-complex-type.2.4.a: Invalid content was found starting with element 'munit:config'. One of '{"http://www.mulesoft.org/schema/mule/core":annotations, "http://www.mulesoft.org/schema/mule/core":description,

grebneke
  • 4,414
  • 17
  • 24
vikram kumar u
  • 205
  • 4
  • 15

4 Answers4

2

This is an old post, but I don't see an answer. I had the same issue:

I had

at the top of declarations. I deleted it since I also had

xmlns:core="http://www.mulesoft.org/schema/mule/core" below.

This fixed the error.

gohmer
  • 55
  • 1
  • 13
0

This error means that the munit jars are not in your classpath

genjosanzo
  • 3,264
  • 2
  • 16
  • 21
  • 1
    Hi paul, Thanks for the reply. No, the error still persist. I have all the munit dependent jar's in my project build path configuration from the starting. When I remove mule.xsd from schema location definations the error is not displaying. I believe the error lies with Mule.Xsd Currently I am pointing to below location for mule.xsd. http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd – vikram kumar u Feb 03 '14 at 04:15
0

To help anyone else and the future me who still face this issue in Anypoint Studio 6.5 and munit tools 3.9.0 we had to configure the munit configuration global element as follows

<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>
Rich
  • 1
  • 1
  • 'global element as follows' where are they – janith1024 Aug 30 '18 at 09:57
  • many apologies, I was a noob back then, I hadn't formatted the xml as a stackoverflow 'code block', without the code block markup on the post the code text will never appear! – Rich Nov 07 '19 at 23:41
0

check for duplicate names of files, or flow names. even if the files are in different folders or packages.

make them unique no matter what !

Ion Utale
  • 551
  • 1
  • 9
  • 22