This usually happens when the mule-transport-vm
JAR is missing from the project classpath. Ensure it is present in the pom.xml
file with the provided
scope.
Configs loaded in Mule functional tests throw errors, but runs outside of a test
-
01-06-2022 - |
Question
I have a strange situation where Mule configs loaded in Mule functional tests throw errors of the sort below from flows with vm's. The annoying thing is this flow runs perfect as a mule application and sometimes by tweaking with mule studio I can get the test to run, almost randomly.
<flow name="simpleOutBoundFlow">
<vm:inbound-endpoint path="testV"
name="test" />
<logger level="ERROR"
message="blah #[payload]" />
<foo:outbound config-ref="fooOutbound" doc:name="baa" />
</flow>
the error occurs at the vm: line and says something like
org.mule.api.config.ConfigurationException: Line 21 in XML document from URL [file:/D:/config.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 21; columnNumber: 18; cvc-complex-type.2.4.a: Invalid content was found starting with element 'vm:inbound-endpoint'. One of '{"http://www.mulesoft.org/schema/mule/core":annotations, "http://www.mulesoft.org/schema/mule/core":description, "http://www.mulesoft.org/schema/mule/core":abstract-message-source, "http://www.mulesoft.org/schema/mule/core":abstract-inbound-endpoint, "http://www.mulesoft.org/schema/mule/core":abstract-message-processor, "http://www.mulesoft.org/schema/mule/core":abstract-outbound-endpoint, "http://www.mulesoft.org/schema/mule/core":abstract-mixed-content-message-processor, "http://www.mulesoft.org/schema/mule/core":response}' is expected. (org.mule.api.lifecycle.InitialisationException) at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:52)
Any ideas? Really strange one for me.
nb: the foo:outbound comes from a devKit update site I generated with the maven devkit archtype
Solution