0

Exported a Mule application as a deployable jar from Studio and trying to deploy it in CloudHub. However, deployment is failing with below error.

*"Error: Failed to deploy from URI: file:/tmp/mule-received-artifact-13949491667031238/<app-name>.jar. ArtifactDescriptorCreateException: Artifact descriptor does not exists: /opt/mule/mule-4.4.0/apps/<appname>/META-INF/mule-artifact/mule-artifact.json".*

Am I missing something here?

aled
  • 21,330
  • 3
  • 27
  • 34

1 Answers1

0

You probably exported the application project as one of the Java jar options. That would not work because a Java jar will miss the right format and Mule metadata. A Mule project is not a Java project.

If that is the issue then you must export it as a Mule Deployable file. While it respects the jar format and extension, it adds additional files and metadata to be deployable in a Mule Runtime.

Looking at the current version of Studio the export option is "Anypoint Studio Project to Mule Deployable Archive (includes Studio Metadata)". Ensure the export option is that or similar.

aled
  • 21,330
  • 3
  • 27
  • 34
  • hi @aled, thank you for your comment. However, that is not the case. I used the Export > Mule > Anypoint Studio Project to Deployable Archive(include studio metadata) option; checked the 'Attach Project Sources' and 'Include project modules and dependencies'. But, still the size of the jar is around 800 kb, which seems incorrect. I wonder what I am missing – Mule-Newbie Mar 05 '23 at 16:17
  • Then maybe your project is wrong. Does it work when you execute it inside Studio? – aled Mar 05 '23 at 17:52
  • Yes, it does work in Studio – Mule-Newbie Mar 06 '23 at 04:18
  • I noticed one more thing; when I deploy it as java jar, the jar file has 177 mb which seems correct. But still the jar couldn't be deployed with the same error. – Mule-Newbie Mar 06 '23 at 08:49
  • Please share the pom file. – aled Mar 06 '23 at 09:56