Search code examples
xmlmulesaxmule-studio

Error in trivial Mule flow using poll component: "The content of element 'poll' is not complete"


Trivial new project, 1 flow, 1 poll element, feeding to 1 other element.

ERROR 2014-04-16 14:49:19,565 [main] org.mule.module.launcher.application.DefaultMuleApplication: null
org.xml.sax.SAXParseException: cvc-complex-type.2.4.b: The content of element 'poll' is not complete. One of '{"http://www.mulesoft.org/schema/mule/core":annotations, "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}' is expected.
    at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
...

At the minutia level I understand what SAX is, and that probably one of the references is bad or something.

But at a higher level, I'm new to MuleStudio, what's the fix?

Stuff I thought of:

  • I'm using the latest December release
  • It's a new project, nothing weird.
  • It went through all it's maven downloads without complaint (although slow as usual)
  • And I tried restarting / rerunning it
  • Tried both Debug As... and Run As... Mule Application

Although I could include the XML, it's trivial, literally just 2 elements: poll -> salesforce query

Google search not helpful.

Feels like a number of things in Mule don't quite work as advertised... wondering if others experience that, but then again I'm new to it of course.

Edit: Adding the XML, but it was created from the GUI. Login credentials redacted.

<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:tracking="http://www.mulesoft.org/schema/mule/ee/tracking" xmlns:sfdc="http://www.mulesoft.org/schema/mule/sfdc" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:spring="http://www.springframework.org/schema/beans" xmlns:core="http://www.mulesoft.org/schema/mule/core" version="EE-3.4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/ee/tracking http://www.mulesoft.org/schema/mule/ee/tracking/current/mule-tracking-ee.xsd
http://www.mulesoft.org/schema/mule/sfdc http://www.mulesoft.org/schema/mule/sfdc/current/mule-sfdc.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd">
    <sfdc:config name="Salesforce" username="..." password="..." securityToken="..." doc:name="Salesforce">
        <sfdc:connection-pooling-profile initialisationPolicy="INITIALISE_ONE" exhaustedAction="WHEN_EXHAUSTED_GROW"/>
    </sfdc:config>
    <flow name="salesforce3Flow1" doc:name="salesforce3Flow1">
        <poll frequency="3600000" doc:name="Hourly"/>
        <sfdc:query config-ref="Salesforce" query="SELECT ID,CaseNumber, Description from Case LIMIT 100" doc:name="Salesforce"/>
    </flow>
</mule>

Solution

  • It would help if you shared your flow xml, but the error message sounds like you have a poll that polls nothing. You need something inside <poll></poll>. Either put your Salesforce query there or a dummy logger component.