【发布时间】:2016-06-24 20:29:16
【问题描述】:
我必须在几乎没有知识的情况下对现有的 mule 流程进行一些更改,尽管我已经花了几天时间阅读在线文档和可能的解决方案,但我无法弄清楚为什么这个查询会失败,因为我还有更多动态在我的流程中使用 #[xxx] 参数进行查询。查询如下:
select times from user_request where
ip_address=SUBSTR(#message.inboundProperties.MULE_REMOTE_CLIENT_ADDRESS],2,INSTR(#[message.inboundProperties.MULE_REMOTE_CLIENT_ADDRESS], ':')-2)
and request_date=CAST(CURRENT_DATE as varchar2(8))
我得到的错误是:
消息:索引:0 (java.lang.IndexOutOfBoundsException)。有效载荷: {fecha_solicitud=2016-06-22,moneda=USD,client_id=RIVERA, user_ip=127.0.0.1, request_times=0} 负载类型: java.util.LinkedHashMap 元素: /OANDAFlow/processors/3@oanda:oanda.xml:126 元素 XML: 从 user_requestwhere 中选择时间 ip_address=SUBSTR(#[message.inboundProperties.MULE_REMOTE_CLIENT_ADDRESS],2,INSTR(#[message.inboundProperties.MULE_REMOTE_CLIENT_ADDRESS], ':')-2) 和 request_date=CAST(CURRENT_DATE 为 varchar2(8))>
注意:日期转换为varchar是因为request_date列是varchar。
我已经在 Oracle SQL 开发人员中直接尝试了这个查询,替换了 #[message.inboundProperties.MULE_REMOTE_CLIENT_ADDRESS]
和/127.0.0.1:55406之类的例子,它工作得很好,那么为什么通过mule会失败???
【问题讨论】:
标签: sql oracle mule mule-el anypoint-studio