Have you seen the wiki on this subject?
http://www.mulesource.org/display/MULE2USER/JDBC+Transport#JDBCTransport-StoredProcHTH
A
Stig Melling wrote:
> 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, 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:
_antoine.borg_@... <mailto:
antoine.borg@...> |
blog: blog.ricston.com <
http://blog.ricston.com> | web: ricston.com
<
http://www.ricston.com/>
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email