问题描述
我正在运行时版本4.3.0上的Mule项目。 我正在尝试将Dataweave脚本外部化为DWL文件,如下所示:
<ee:transform doc:name="Transform Message" doc:id="6aeea8a6-1578-4991-ac5a-ed7ebfd1566b">
<ee:message>
<ee:set-payload resource="dataweave/dataweave-script.dwl" />
</ee:message>
</ee:transform>
Mule项目已成功部署,但是当对关联端点进行请求时,将引发以下异常:
ERROR 2020-10-27 15:49:54,703 [[MuleRuntime].cpuLight.14: [hello-world-api].hello-world-apiFlow.cpu_LITE @4e834155] [event: f48ac961-183d-11eb-8933-00090ffe0001] org.mule.runtime.core.internal.exception.OnErrorPropagateHandler:
********************************************************************************
Message : Invalid configuration found for parameter 'resource' in component [set-payload]:
Couldn't find resource: dataweave/dataweave-script.dwl neither on classpath or in file system.
Element : hello-world-apiFlow/processors/0 @ hello-world-api:hello-world-api.xml:17 (hello-worldSub_Flow)
Element XML : <flow-ref doc:name="hello-worldSub_Flow" doc:id="9069f14e-649b-4d29-b09b-220d9cf934f4" name="hello-worldSub_Flow"></flow-ref>
Error type : MULE:UNKNowN
--------------------------------------------------------------------------------
Root Exception stack trace:
org.mule.runtime.api.exception.MuleRuntimeException: Invalid configuration found for parameter 'resource' in component [set-payload]:
Couldn't find resource: dataweave/dataweave-script.dwl neither on classpath or in file system
********************************************************************************
我还尝试使用以下命令,但会抛出相同的错误:
<ee:transform doc:name="Transform Message" doc:id="6aeea8a6-1578-4991-ac5a-ed7ebfd1566b">
<ee:message>
<ee:set-payload resource="classpath://dataweave/dataweave-script.dwl" />
</ee:message>
</ee:transform>
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)