1

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

Nikos
  • 7,295
  • 7
  • 52
  • 88

1 Answers1

2

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.

David Dossot
  • 33,403
  • 4
  • 38
  • 72
  • Thanks mate, you've no idea how much that helps :)) – Nikos Jul 01 '13 at 12:22
  • I'm also finding the same issue(runs as app but not in Junit test) in non maven projects, For sample the error **Test.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 19 etc etc** is thrown at the config level of the .flow file **** can you suggest a solution for that? – Nikos Aug 08 '13 at 10:16
  • Seems the same issue: missing connector JAR on the classpath (assuming the`fooConnector` namespace is correctly configured). – David Dossot Aug 08 '13 at 16:29