0
votes

I'm getting the following error while deploying the interface

org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'sfdc:query-single'. 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.

I have configured the salesforce connector globally.

PFB schema
xsi:schemaLocation="http://www.mulesoft.org/schema/mule/ee/wmq http://www.mulesoft.org/schema/mule/ee/wmq/current/mule-wmq-ee.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
http://www.mulesoft.org/schema/mule/ee/dw http://www.mulesoft.org/schema/mule/ee/dw/current/dw.xsd
http://www.mulesoft.org/schema/mule/sfdc http://www.mulesoft.org/schema/mule/sfdc/current/mule-sfdc.xsd
http://www.mulesoft.org/schema/mule/ee/tracking http://www.mulesoft.org/schema/mule/ee/tracking/current/mule-tracking-ee.xsd">
6
Its a SAX parser based exception , do check your your configuration xml , see of there are any schemas or namespaces are missingcharle819
please find updated schema details, it seems i didn't miss anything.Thiru
Can you upload the lines of the XML causing your error, along with the XSD declaration?Pierre B.

6 Answers

2
votes

If you are using Maven to build the mule flow you also need to include it in org.mule.tools.maven

<plugin>
    <groupId>org.mule.tools.maven</groupId>
    <artifactId>mule-app-maven-plugin</artifactId>
    <version>${mule.tools.version}</version>
    <extensions>true</extensions>
    <configuration>
        <copyToAppsDirectory>true</copyToAppsDirectory>
        <inclusions>
            <inclusion>
                <groupId>org.mule.modules</groupId>
                <artifactId>mule-module-sfdc</artifactId>
            </inclusion>
        </inclusions>
    </configuration>
</plugin>

Along with an entry in dependencies

<dependency>
    <groupId>org.mule.modules</groupId>
    <artifactId>mule-module-sfdc</artifactId>
    <version>6.2.3</version>
</dependency>
0
votes

If the namespace is in xml config, it could be a problem that the sfdc dependency is not included.

0
votes

If you are copy paste one flow xml from one project to another project then you can go to xml view and remove sfdc tag initial portion e.g "sfdc:query-single" then type "sfdc:" from your keyboard and hit ctrl+space it will show you the list of possibilities from there chose again the same value "sfdc:query-single". Now it will automatically import the required dependencies.

0
votes

This error occurs when salesforce library is not loaded in the project.Ideally any point studio take cares.But in case the code is copy pasted , we have to add library by using the following steps: 1 Build Path>Configure the Build Path>Add Library >Salesforce jar

0
votes

To use probably need SaleForce Dev Account connectivity account for finally connecting and your config file should contain sdfc xmlns, which I did not find in your snippet

I will look something like this

<mule xmlns="http://www.mulesoft.org/schema/mule/core"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:sfdc="http://www.mulesoft.org/schema/mule/sfdc"
      xsi:schemaLocation="
               http://www.mulesoft.org/schema/mule/core
               http://www.mulesoft.org/schema/mule/core/current/mule.xsd
               http://www.mulesoft.org/schema/mule/sfdc
               http://www.mulesoft.org/schema/mule/sfdc/current/mule-sfdc.xsd">

And also add Maven dependency, which will be something like

<dependency>
    <groupId>org.mule.modules</groupId>
    <artifactId>mule-module-sfdc</artifactId>
    <version>RELEASE</version>
</dependency>
0
votes

Try to add dependency in Mule like below and rerun the application using maven with mule

<dependency>
    <groupId>org.mule.modules</groupId>
    <artifactId>mule-module-sfdc</artifactId>
    <version>RELEASE</version>
</dependency>