I'm having problems to add a JDBC endpoint to my Mule project but I'm having problems during the initialization due to some XML parsing problems. The problems started after I've added the JDBC endpoints.
Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'jdbc:inbound-endpoint'. One of '{
"http://www.mulesource.org/schema/mule/core/2.2":description,
"http://www.springframework.org/schema/beans":beans,
"http://www.springframework.org/schema/beans":bean,
"http://www.springframework.org/schema/context":property-placeholder,
"http://www.mulesource.org/schema/mule/core/2.2":global-property,
"http://www.mulesource.org/schema/mule/core/2.2":configuration,
"http://www.mulesource.org/schema/mule/core/2.2":notifications,
"http://www.mulesource.org/schema/mule/core/2.2":abstract-extension,
"http://www.mulesource.org/schema/mule/core/2.2":abstract-security-manager,
"http://www.mulesource.org/schema/mule/core/2.2":abstract-transaction-manager,
"http://www.mulesource.org/schema/mule/core/2.2":abstract-connector,
"http://www.mulesource.org/schema/mule/core/2.2":abstract-global-endpoint,
"http://www.mulesource.org/schema/mule/core/2.2":abstract-transformer,
"http://www.mulesource.org/schema/mule/core/2.2":abstract-filter,
"http://www.mulesource.org/schema/mule/core/2.2":abstract-model,
"http://www.mulesource.org/schema/mule/core/2.2":abstract-interceptor-stack}'
is expected.
I've been following this guide http://www.mulesoft.org/documentation/display/MULE2USER/JDBC+Transport#JDBCTransport-ConfigurationReference
The Mule JDBC namespace have been added to my xml definition.
Any idea?
Check a piece of my configuration file:
<mule
xmlns="http://www.mulesource.org/schema/mule/core/2.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jms="http://www.mulesource.org/schema/mule/jms/2.2"
xmlns:xm="http://www.mulesource.org/schema/mule/xml/2.2"
xmlns:vm="http://www.mulesource.org/schema/mule/vm/2.2"
xmlns:jdbc="http://www.mulesource.org/schema/mule/jdbc/2.2"
xmlns:file="http://www.mulesource.org/schema/mule/file/2.2"
xsi:schemaLocation="
http://www.mulesource.org/schema/mule/jdbc/2.2 http://www.mulesource.org/schema/mule/jdbc/2.2/mule-jdbc.xsd
http://www.mulesource.org/schema/mule/core/2.2 http://www.mulesource.org/schema/mule/core/2.2/mule.xsd
http://www.mulesource.org/schema/mule/jms/2.2 http://www.mulesource.org/schema/mule/jms/2.2/mule-jms.xsd
http://www.mulesource.org/schema/mule/vm/2.2 http://www.mulesource.org/schema/mule/vm/2.2/mule-vm.xsd
http://www.mulesource.org/schema/mule/file/2.2 http://www.mulesource.org/schema/mule/file/2.2/mule-file.xsd
http://www.mulesource.org/schema/mule/xml/2.2 http://www.mulesource.org/schema/mule/xml/2.2/mule-xml.xsd">
<!-- Endpoints -->
<jdbc:inbound-endpoint
name="jdbcKapitalCommandIn"
connector-ref="jdbcConnector"
queryKey="queryKapitalProcessControl"
pollingFrequency="10000" synchronous="true">
</jdbc:inbound-endpoint>
<jdbc:outbound-endpoint
name="jdbcKapitalCommandOut"
connector-ref="jdbcConnector"
queryKey="updateKapitalProcessControl"
synchronous="true">
</jdbc:outbound-endpoint>
<file:endpoint
name="kapitalErrorBackup"
path="${APPS_HOME}/lbo-esb/files/kapital/error"
outputPattern="#[DATE:yyyy-MM-dd_HH-mm-ss]_error.txt">
</file:endpoint>
<file:endpoint
name="kapitalInputBackup"
path="${APPS_HOME}/lbo-esb/files/kapital/backup"
outputPattern="#[DATE:yyyy-MM-dd_HH-mm-ss]_kapital-command.xml">
</file:endpoint>
<file:endpoint
name="kapitalInvalidSchemaBackup"
path="${APPS_HOME}/lbo-esb/files/kapital/error"
outputPattern="#[DATE:yyyy-MM-dd_HH-mm-ss]_inv_schema.xml">
</file:endpoint>
<!-- Kapital -->
<vm:endpoint
name="kapitalTransactionInput"
path="kapital.transaction.input">
</vm:endpoint>
<vm:endpoint
name="kapitalError"
path="kapital.error.input">
</vm:endpoint>
<model
name="KapitalServices">
<default-service-exception-strategy>
<outbound-endpoint
ref="kapitalError">
</outbound-endpoint>
</default-service-exception-strategy>
<service
name="kapitalService">
<inbound>
<inbound-endpoint
ref="jdbcKapitalCommandIn">
</inbound-endpoint>
</inbound>
<echo-component />
<!-- more stuff from here -->
</service>
</model>
<!-- more stuff from here -->
</mule>
Since you're not showing your configuration, it's hard to help you.
From the exception, my impression is that the issue has nothing to do with JDBC. It seems you try to define an inbound-endpoint in a place where only global endpoints (not inbound, not outbound) can be declared. Global endpoints are declared out of services, in/out-bound ones inside services.
If I'm wrong in my diagnostic, please share your config.