I'm trying to call a simple stored procedure using the 2.0.2 community
edition jdbc connector.
Here's my mule config: http://www.nabble.com/file/p20625045/mule-config.xml
mule-config.xml
I'm getting the following error when the stored proc runs:
[21 Nov 2008 16:34:17] [ERROR][jdbcConnector.receiver.1]
org.mule.DefaultExceptionStrategy - Caught exception in Exception Strategy:
Incorrect syntax near '20'.
Query: call prc_sel_pub_tbl(20) Parameters: []
java.sql.SQLException: Incorrect syntax near '20'.
Query: call prc_sel_pub_tbl(20) 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:195)
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)
Any ideas?
Thanks,
Ronan
--
View this message in context: http://www.nabble.com/Problem-calling-sybase-stored-procedure-with-jdbc-connector-tp20625045p20625045.html
Sent from the Mule - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
The main error seems to be: "Incorrect syntax near '20'" so my guess is that
the parameter is causing problems.
Have you tried using parameters on the endpoints instead?
A
Antoine Borg, Senior Consultant | Tel: +32 28 504 696
ricston Ltd., BP 2, 1180 Uccle, Brussels, BELGIUM
email: antoin...@ricston.com | blog: blog.ricston.com | web: ricston.com
No, I haven't tried parameters, chiefly because I don't know how!!
What is the correct syntax for specifying parameters in the config?
Thanks,
Ronan
--
View this message in context: http://www.nabble.com/Problem-calling-sybase-stored-procedure-with-jdbc-connector-tp20625045p20657074.html
I tried making the changes you suggested - see attached mule-config:
http://www.nabble.com/file/p20678125/mule-config.xml mule-config.xml
I'm still getting errors:
[25 Nov 2008 09:33:30] [ERROR][jdbcConnector.receiver.1]
org.mule.DefaultExceptionStrategy - Caught exception in Exception Strategy:
Incorrect syntax near '#'.
Query: CALL prc_sel_pub_tbl(#[map-payload:value]) Parameters: []
java.sql.SQLException: Incorrect syntax near '#'.
Query: CALL prc_sel_pub_tbl(#[map-payload:value]) 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:195)
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)
This looks like a different issue, because the value isn't being
substituted, but I doubt it would work even if it was. The dbutils
QueryRunner class that is being called under the covers is using a
preparedStatement to query the database. I could be wrong, but I thought
stored procedures were called using the callableStatement class?
Thanks,
Ronan
--
View this message in context: http://www.nabble.com/Problem-calling-sybase-stored-procedure-with-jdbc-connector-tp20625045p20678125.html
Can you try with Mule 2.1.1? I think there were some improvements made to
the parameter handling mechanism
A
Antoine Borg, Senior Consultant | Tel: +32 28 504 696
ricston Ltd., BP 2, 1180 Uccle, Brussels, BELGIUM
email: antoin...@ricston.com | blog: blog.ricston.com | web: ricston.com
-----Original Message-----
From: RonanL [mailto:ronan....@fmr.com]
Sent: Tuesday, November 25, 2008 10:58 AM
To: us...@mule.codehaus.org
Subject: RE: [mule-user] Problem calling sybase stored procedure with jdbc
connector
Hi Antoine.
I tried making the changes you suggested - see attached mule-config:
http://www.nabble.com/file/p20678125/mule-config.xml mule-config.xml
I'm still getting errors:
[25 Nov 2008 09:33:30] [ERROR][jdbcConnector.receiver.1]
org.mule.DefaultExceptionStrategy - Caught exception in Exception Strategy:
Incorrect syntax near '#'.
Query: CALL prc_sel_pub_tbl(#[map-payload:value]) Parameters: []
java.sql.SQLException: Incorrect syntax near '#'.
Query: CALL prc_sel_pub_tbl(#[map-payload:value]) 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:195)
at
org.mule.transport.TransactedPollingMessageReceiver.poll(TransactedPollingMe
ssageReceiver.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)
This looks like a different issue, because the value isn't being
Thanks,
Ronan
> a:47)
>> at org.mule.work.WorkerContext.run(WorkerContext.java:310)
>> at
>> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.run
>> W
>> orker(
>> ThreadPoolExecutor.java:1061)
>> at
>> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Wor
>> k
I've moved away from using the jdbc connector entirely. I'm now using quartz
to fire trigger an event which kicks off a spring jdbc based component. It's
working well, so I'm happy with that.
If I get a chance, I'll go back and look at mule 2.1.1, but I can't see that
happening in the next week or so.
Thanks for getting back to me.
Ronan
--
View this message in context: http://www.nabble.com/Problem-calling-sybase-stored-procedure-with-jdbc-connector-tp20625045p20810808.html