Search code examples
emailmediasap-commerce-cloudbusiness-process-management

Media not found Exception In Email Business Process (Hybris)


I've created a process to be able send email to the user on order confirmation. The problem is that on the DEV environment everything goes well but when I did a deploy to UAT server I got an exception during the task execution ( " Media not found (requested media location: hf0/h27/8861015965726.bin) "). Any Ideas what could be happening ? How can this issue be resolved and what causes this issue.


Solution

  • hybris creates emails using Velocity templates. Those Velocity Templates are stored as Medias on the hybris Servers. hybris Medias consist of two parts: an entry in the respective table in the database and a file on the hard drive. The database entry stores metadata about that media while the file stores the actual content.

    Now what hybris is telling you, is that the file on the hard drive is missing. The database entry directs to a file that is not existing. There could be a lot of reasons why that file is missing:

    • It was deleted during deployment.
    • It wasn't created during deployment.
    • The hybris server has no access/access rights to that directory.
    • In a clustered environment the file could have been stored on another node and is not accessible on the current node.