[mule-dev] problem with JDBC Outbound Endpoint

0 views
Skip to first unread message

spidercochon

unread,
Dec 18, 2008, 5:36:16 PM12/18/08
to d...@mule.codehaus.org

Hi all,


I got the following stacktrace when i put a file in the /in directory.

ERROR 2008-12-18 23:27:17,349 [jdbcConnector.dispatcher.1]
org.mule.DefaultExceptionStrategy: Caught exception in Exception Strategy:
Unknown column '$' in 'field list' Query: insert into alerts values
(0,'esb01',${payload}) Parameters: []
java.sql.SQLException: Unknown column '$' in 'field list' Query: insert into
alerts values (0,'esb01',${payload}) Parameters: []
at org.apache.commons.dbutils.QueryRunner.rethrow(QueryRunner.java:359)
at org.apache.commons.dbutils.QueryRunner.update(QueryRunner.java:428)
at
org.mule.transport.jdbc.sqlstrategy.SimpleUpdateSQLStrategy.executeStatement(SimpleUpdateSQLStrategy.java:70)
at
org.mule.transport.jdbc.JdbcMessageDispatcher.doSend(JdbcMessageDispatcher.java:67)
at
org.mule.transport.jdbc.JdbcMessageDispatcher.doDispatch(JdbcMessageDispatcher.java:54)
at
org.mule.transport.AbstractMessageDispatcher$Worker.run(AbstractMessageDispatcher.java:273)
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)

Mule can't retrieve the content of ma file to insert it into the database.

Why mule don't recognize ${payload} ?

Here is my file config :

<spring:beans>
<spring:import resource="spring-config.xml"/>
</spring:beans>


<jdbc:connector name="jdbcConnector" dataSource-ref="dataSource">
<jdbc:query key="alertInsert" value="insert into alerts values
(0,'esb01',${payload})"/>
</jdbc:connector>

<model name="jdbcOutboundModel">
<service name="jdbcOutboundService">
<inbound>
<file:inbound-endpoint path="./in"/>
</inbound>
<outbound>
<pass-through-router>
<jdbc:outbound-endpoint queryKey="alertInsert"/>
</pass-through-router>
</outbound>
</service>


</model>
</mule>


Thanks a lot
--
View this message in context: http://www.nabble.com/problem-with-JDBC-Outbound-Endpoint-tp21082296p21082296.html
Sent from the Mule - Dev mailing list archive at Nabble.com.


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

http://xircles.codehaus.org/manage_email


Ken Yagen

unread,
Dec 18, 2008, 7:31:20 PM12/18/08
to d...@mule.codehaus.org
what version of mule? You may want to check out http://www.mulesource.org/display/MULE2USER/Expressions+Configuration+Reference#ExpressionsConfigurationReference-ExpressionEvaluatorReference

Ken Yagen
Senior Director Engineering | MuleSource Inc.
201 Mission St.| Suite 1380 | San Francisco, CA 94105
Direct: +1 415-229-2020 | Mobile: +1 415-902-5623
ken....@mulesource.com | www.mulesource.com

spidercochon

unread,
Dec 19, 2008, 3:19:55 AM12/19/08
to d...@mule.codehaus.org
Reply all
Reply to author
Forward
0 new messages