Error message: Write statement should be an insert / update / delete sql statement (java.lang.IllegalArgumentException)
You need to execute 'select' SQL statements in the inbound router endpoints and 'insert, update and delete' statements in the outbound router endpoints.
More specifically this error means you have tried to execute a 'select' statement in an outbound endpoint, move it to the inbound endpoint.
eg.
<connector name="jdbcConnector" className="org.mule.providers.jdbc.JdbcConnector">
<properties>
<container-property name="dataSource" reference="muleJdbcDatasource" required="true" />
<property name="pollingFrequency" value="10000" />
<map name="queries">
<property name="setData"
value="insert into customer values ('mule_last', 'mule_first', 'mule_address', 'mule.com');" />
<property name="getData"
value="select * from customer;" />
</map>
</properties>
</connector>
<inbound-router>
<endpoint address="jdbc: connector="jdbcConnector">
</endpoint>
</inbound-router>
<outbound-router>
<router className="org.mule.routing.outbound.OutboundPassThroughRouter">
<endpoint address="jdbc: connector="jdbcConnector"/>
</router>
</outbound-router>