在 mule 3.8 中,当我使用文件连接器处理文本文件时,出现如下异常,请帮助。
这是流xml
file:connector name="File" autoDelete="true" streaming="true" validateConnections="true" doc:name="File"/>
flow name="DW-FixedWidth-Processing">
file:inbound-endpoint path="D:/mule/input" connector-ref="File" responseTimeout="10000" doc:name="File"/>
file:file-to-string-transformer doc:name="File to String"/>
dw:transform-message doc:name="Transform Message">
dw:input-payload />
dw:set-payload><![CDATA[%dw 1.0
%output application/csv header=false
---
((payload splitBy /\n/)[0..8]) map {
location:trim $[0..14],
sku:trim $[15..39],
dtc:trim $[40..42],
tt:trim $[43..44],
txnqty:trim $[45..54],
um:trim $[55..56],
rcd:trim $[57..59],
te:trim $[60..89],
ul:trim $[90..104],
date:trim $[105..114],
time:trim $[115..120]
} ]]>
dw:set-payload>
dw:transform-message>
logger message="#[message.payloadAs(java.lang.String)]" level="INFO" doc:name="Logger"/>
file:outbound-endpoint path="D:/mule/output" responseTimeout="10000" doc:name="File"/>
例外
根异常堆栈跟踪:
java.lang.IllegalStateException:在 com.mulesoft.weave.module.flatfile.FlatFileReader.ffParser(FlatFileReader.scala:42 的 com.mulesoft.weave.module.flatfile.FlatFileSettings.loadSchema(FlatFileSettings.scala:45) 没有设置模式)