Hi,
I am trying to connect to a database, configuration file attached below. I am getting following error, please let me know what am I missing in the configuration file.
ERROR 2009-03-23 15:34:47,788 [main] org.mule.config.spring.SpringXmlConfigurationBuilder: Configuration with "org.mule.config.spring.SpringXmlConfigurationBuilder" failed.
org.mule.api.lifecycle.InitialisationException: Initialisation Failure: Line 28 in XML document from URL [file:/C:/workspace/test/conf/mule-config.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.1: Element 'jdbc:query' must have no character or element information item [children], because the type's content type is empty.
at org.mule.registry.AbstractRegistry.initialise(AbstractRegistry.java:76)
at org.mule.config.spring.SpringXmlConfigurationBuilder.createSpringRegistry(SpringXmlConfigurationBuilder.java:98)
at org.mule.config.spring.SpringXmlConfigurationBuilder.doConfigure(SpringXmlConfigurationBuilder.java:69)
at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:39)
at org.mule.config.builders.AbstractResourceConfigurationBuilder.configure(AbstractResourceConfigurationBuilder.java:78)
at org.mule.config.builders.AutoConfigurationBuilder.autoConfigure(AutoConfigurationBuilder.java:113)
at org.mule.config.builders.AutoConfigurationBuilder.doConfigure(AutoConfigurationBuilder.java:58)
at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:39)
-----------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns="http://www.mulesource.org/schema/mule/core/2.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jdbc="http://www.mulesource.org/schema/mule/jdbc/2.2"
xmlns:jms="http://www.mulesource.org/schema/mule/jms/2.2"
xmlns:stdio="http://www.mulesource.org/schema/mule/stdio/2.2"
xmlns:vm="http://www.mulesource.org/schema/mule/vm/2.2"
xmlns:spring="http://www.springframework.org/schema/beans"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
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/jms/2.2 http://www.mulesource.org/schema/mule/jms/2.2/mule-jms.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/stdio/2.2 http://www.mulesource.org/schema/mule/stdio/2.2/mule-stdio.xsd
http://www.mulesource.org/schema/mule/vm/2.2 http://www.mulesource.org/schema/mule/vm/2.2/mule-vm.xsd">
<spring:bean id="datasource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<spring:property name="driverClassName" value="com.mysql.jdbc.Driver"/>
<spring:property name="url" value="jdbc:mysql://localhost/employee"/>
<spring:property name="username" value="admin"/>
<spring:property name="password" value="admin"/>
</spring:bean>
<jdbc:connector name="jdbcConnector" dataSource-ref="datasource">
<jdbc:query key="alertQuery" value="select * from applicants">
</jdbc:query>
</jdbc:connector>
<model name="jdbcInboundModel">
<service name="jdbcInboundService">
<inbound>
<jdbc:inbound-endpoint pollingFrequency="600000" queryKey="alertQuery"/>
</inbound>
</service>
</model>
</mule>
Thanks
Chhaya
Is there a sample or example we can refer to for jdbc connector?
Thanks
Chhaya
Didn't user guide have those?
Andrew
On Mar 23, 2009 4:09 PM, "Mudgal, Chhaya" <Chhaya...@kenexa.com> wrote:
Is there a sample or example we can refer to for jdbc connector?
Thanks
Chhaya
From: Andrew Perepelytsya [mailto:aper...@gmail.com]
Sent: Monday, March 23, 2009 3:42 PM
To: us...@mule.codehaus.org
Subject: Re: [mule-user] jdbc:connector
<jdbc:query key="alertQuery" value="select * from applicants"/> - It must be an empty element. ...
Got it, thanks.
-Chhaya