0

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>
Mark Bennett
  • 1,446
  • 2
  • 19
  • 37

2 Answers2

1

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.

Anton Kupias
  • 3,945
  • 3
  • 16
  • 20
  • I do have the attribute in poll, added from the GUI, but I'll post the XML. – Mark Bennett Apr 17 '14 at 15:16
  • I meant you need to do it like or to poll something. Drag a component inside the poll in the Studio. – Anton Kupias Apr 17 '14 at 19:16
  • OK, so the SalesForce connector needs to be dragged inside of the Poll box in the UI, which nests it in the XML; I didn't expect that because the UI didn't complain, and will put it inside or next to the poll. Now get another error "org.xml.sax.SAXParseException: ... Failed to read schema document 'http://www.mulesoft.org/schema/mule/sfdc/current/mule-sfdc.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not ." Seems like it's complaining about the Salesforce conn or config, but I've used both before. Thanks – Mark Bennett Apr 17 '14 at 22:05
  • For other readers: Reference for Mule's Poll element, AKA "cron / crontab", is here: http://www.mulesoft.org/documentation/display/current/Poll+Reference (not the first page google returns) – Mark Bennett Apr 17 '14 at 22:06
0

org.xml.sax.SAXParseException refers problem inside your XML file. Can be either dirty characters or some missing attributes most likely in the poller configuration.

Also double check the schema declarations at the top of your xml. If you have copied pasted some code directly into the xml the xmlns tag could be missing.

What I suggest is to recreate the project from scratch and use only the drag and drop feature of mule to perform an initial test, once is working you can move forward.

Andrea M.
  • 59
  • 1
  • 9
  • Agreed, but since the XML was generated by the GUI, there shouldn't be anything "wrong" with it, at least not syntactically. – Mark Bennett Apr 17 '14 at 15:13