1

I am using Mule requester module for lookup service using the file connector.it is working perfectly in anypoint studio and not working in cloudhub environment.Does it requires any configuration in cloud hub?

naag
  • 21
  • 3

2 Answers2

1

Cloudhub only allows access to one flat directory '/tmp/'. That's the only directory you can use with the file connector on Cloudhub. 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. If you need to read a resource from the classpath i'm not sure you can do that with the file transport on 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

Community
  • 1
  • 1
Ryan Carter
  • 11,441
  • 2
  • 20
  • 27
  • i have configured the resource in mule requester as "" . could you pls suggest how to configure for cloudhub env? – naag Jun 23 '16 at 14:32
  • i found the way to reference the file from the path in cloudhub as below resource="file://${app.home}/classes/<>?connector=ReadCSV" – naag Jun 23 '16 at 16:59
0

when we worked on Mule requester with Anypoint studio version 5.4.2, it was working fine for us. We deployed to cloudhub also and it was working for us. we did not faced any issues.