Reputation: 526
I have build the application using Mule Runtime 4.2.2 and anypoint studio 7.3.2 . As part of the application, I am using the parallel for each component. Application build and works fine. While Adding Munit I am seeing the below error.
org.mule.runtime.deployment.model.api.DeploymentInitException: MuleRuntimeException: There was '1' parsing the given file 'implementation.xml'.
Full list:
org.xml.sax.SAXParseException; lineNumber: 21; columnNumber: 58; cvc-complex-type.2.4.a: Invalid cound starting with element 'parallel-foreach'. One of '{"http://www.mulesoft.org/schema/mule/core":aage-processor, "http://www.mulesoft.org/schema/mule/core":abstract-mixed-content-message-processor}d.
Munit Version : 2.2.4 Could anyone able to help resolve this issue .Thanks
Upvotes: 1
Views: 886
Reputation: 4473
It looks that you have not fully defined xml for your app. It usually happens when you cut&paste part of the app source without paying attention of the xml include tag which is on the beginning of the source.
It usually works fine when you already have such component already in your flows. But when it is new one then include tag should be also full in your source.
Easy fix - drag and drop similar component from the palette to your flows. Drop it anywhere - Anypoint Studio will adjust import of the components. Then just delete this unnecessary component - you have your own already and Studio already modified the source.
Include tag could be also modified manually. Actually it is tag with all necessary schema definitions in the xmlns attribute. What is missing is in your question. It is
One of '{"http://www.mulesoft.org/schema/mule/core":aage-processor, "http://www.mulesoft.org/schema/mule/core":abstract-mixed-content-message-processor}d
But it could be tricky because you have to know how schema is defined in the tag. Usually it has 2 references for the schema and the xsd definition. If you are not familiar with it or cannot cat&paste from another working app - better use Studio help as described above.
-- Creating Mulesoft apps at https://simpleflatservice.com
Upvotes: 0
Reputation: 526
Though I changed Mule Run time to 4.2.2 in pom.xml. I forgot to change it in mule-artifact.json(4.1.5). Munit still runs with 4.1.5 based on mule-artifact.json. Since parallel foreach not supported in Mule 4.1.5. It caused the above error.
it works by changing the mule-artifact.json
{"minMuleVersion":"4.2.2"}
Upvotes: 1