[mule-user] Call stored procedure on jdbc:inbound-endpoint - with no arguments

1 view
Skip to first unread message

Stig Melling

unread,
Jun 30, 2009, 6:20:56 AM6/30/09
to us...@mule.codehaus.org
I'm not able to figure out how to call a stored proc on a
jdbc:inbound-endpoint with no arguments

Heres my code
<jdbc:connector name="jdbcConnector" dataSource-ref="dataSource" >
<jdbc:query key="myQuery" value="call myStoredProcedure()" />
</jdbc:connector>

...
<model name="test>
<service name="getData">
<inbound>
<jdbc:inbound-endpoint pollingFrequency="10000"
queryKey="myQuery" connector-ref="jdbcConnector"/>
</inbound>
</service>
</model>

I get the following error message
java.sql.SQLException: Incorrect syntax near ')'. Query: call
myStoredProcedure() Parameters: []
at org.apache.commons.dbutils.QueryRunner.rethrow(QueryRunner.java:359)
at org.apache.commons.dbutils.QueryRunner.query(QueryRunner.java:240)
at
org.mule.transport.jdbc.JdbcMessageReceiver.getMessages(JdbcMessageReceiver.java:202)
at
org.mule.transport.TransactedPollingMessageReceiver.poll(TransactedPollingMessageReceiver.java:136)
at
org.mule.transport.PollingReceiverWorker.run(PollingReceiverWorker.java:47)
at org.mule.work.WorkerContext.run(WorkerContext.java:310)
at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1061)
at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:575)
at java.lang.Thread.run(Unknown Source)


How to call a stored proc with no arguments as the inbound-endpoint?

Regards,
Stig Melling

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


Antoine Borg

unread,
Jul 1, 2009, 2:21:30 AM7/1/09
to us...@mule.codehaus.org
Have you seen the wiki on this subject?

http://www.mulesource.org/display/MULE2USER/JDBC+Transport#JDBCTransport-StoredProc

HTH

A

--

Antoine Borg, Senior Consultant | Tel: +32 28 504 696
ricston Ltd., BP 2, 1180 Uccle, Brussels, BELGIUM

See our full schedule of Mule and Android courses:
http://www.ricston.com/courses/schedules/

email: _antoin...@ricston.com <mailto:antoin...@ricston.com> |
blog: blog.ricston.com <http://blog.ricston.com> | web: ricston.com
<http://www.ricston.com/>

Stig Melling

unread,
Jul 3, 2009, 6:12:45 AM7/3/09
to us...@mule.codehaus.org
Hi Antoine - yes I've read the wiki (but maybe I've not understood it :-)

The problem is that I would like to run the proc as the *inbound
endpoint *triggered by a polling frequency.
The wiki is describing usage of stored procs as outbound endpoints.

/Stig


Antoine Borg skrev:

Puneet Gupta

unread,
Jul 6, 2009, 2:40:52 AM7/6/09
to us...@mule.codehaus.org
Stored procedure calls are only supported in outbound endpoints. You can still make this work by defining a quartz inbound endpoint and then defining the stored procedure call in the outbound endpoint.

Andrew Perepelytsya

unread,
Jul 6, 2009, 11:00:24 AM7/6/09
to us...@mule.codehaus.org
Reply all
Reply to author
Forward
0 new messages