简体   繁体   English

Mule 请求器模块在 cloudhub 中不起作用

[英]Mule requester module is not working in cloudhub

我正在使用 Mule 请求器模块使用文件连接器进行查找服务。它在 anypoint studio 中运行良好,但在 cloudhub 环境中无法正常工作。是否需要在 cloud hub 中进行任何配置?

Cloudhub only allows access to one flat directory '/tmp/'. Cloudhub 只允许访问一个平面目录“/tmp/”。 That's the only directory you can use with the file connector on Cloudhub.这是您可以与 Cloudhub 上的文件连接器一起使用的唯一目录。 https://github.com/mulesoft/mulesoft-docs/blob/9f9c8a3950c4cb68e22f579c0ef979658acd170d/runtime-manager/v/latest/cloudhub-and-mule.adoc#disk-persistence https://github.com/mulesoft/mulesoft-docs/blob/9f9c8a3950c4cb68e22f579c0ef979658acd170d/runtime-manager/v/latest/cloudhub-and-mule.adoc#disk-persistence

UPDATE FROM COMMENT:来自评论的更新:

You shouldn't use the Maven directory structure src/main.. etc. as thats not part of the packaged zip so its not on the classpath.您不应该使用 Maven 目录结构 src/main.. 等,因为那不是打包 zip 的一部分,因此它不在类路径上。 If you need to read a resource from the classpath i'm not sure you can do that with the file transport on Cloudhub.如果您需要从类路径中读取资源,我不确定您是否可以使用 Cloudhub 上的文件传输来做到这一点。 If you simply want to load a file from the classpath you're better off using something like:如果您只是想从类路径加载文件,最好使用以下内容:

<set-payload value="#[Thread.currentThread().getContextClassLoader().getResourceAsStream('my-file.abc')]" />

or use the parse-template transformer or other options detailed here: mule read single file from classpath during flow或使用解析模板转换器或此处详述的其他选项: mule read single file from classpath during flow

when we worked on Mule requester with Anypoint studio version 5.4.2, it was working fine for us.当我们使用 Anypoint studio 5.4.2 版处理 Mule requester 时,它对我们来说运行良好。 We deployed to cloudhub also and it was working for us.我们也部署到了 cloudhub,它正在为我们工作。 we did not faced any issues.我们没有遇到任何问题。

I am also facing issue with mulerequestor file name in resource path.i am using below Config,it's working in 3.8.6 version but i tried to update it to 3.9.5 i am getting error for #[flowVars.svarTmpDataFileName] filename.Please let me know how to reslove it?我也面临资源路径中 mulerequestor 文件名的问题。我正在使用下面的配置,它在 3.8.6 版本中工作,但我尝试将其更新到 3.9.5 我收到错误 #[flowVars.svarTmpDataFileName] 文件名。请让我知道如何重新爱上它?

<mulerequester:request resource="ftp://${ftpsap.username}:${ftpsap.password}@${ftpsap.host}:${ftpsap.port}/${ftpsap.pathSource}/ #[flowVars.svarTmpDataFileName] ?connector=ftpgSourceFiles" doc:name="getSourceDataFile" timeout="${ftpsap.connectiontimeout}"/> <mulerequester:request resource="ftp://${ftpsap.username}:${ftpsap.password}@${ftpsap.host}:${ftpsap.port}/${ftpsap.pathSource}/ #[flowVars. svarTmpDataFileName] ?connector=ftpgSourceFiles" doc:name="getSourceDataFile" timeout="${ftpsap.connectiontimeout}"/>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM