on 2021 Aug 19 10:20 AM
I am using SAP Commerce Cloud ccv2 2011. I can create media through the back-office and upload an image in it and convert it into different formats by clicking on the "Convert Missing Media" button in a media container in the back office. But when I try to convert a media created through the hot folder, it is giving me an error.
I tried using windowsAzureBlobStorageStrategy as well as cloudAzureBlobStorageStrategy and the error differs for both the strategies.
I am working with CatalogUnawareMedia but the error is same for Media (catalog specific) as well.
The configuration used is -
cloud.hotfolder.default.images.root.url=http:https://<account-name>.blob.core.windows.net/${azure.hotfolder.storage.container.name}/master/productimages/images
cloud.hotfolder.default.images.media.folder.qualifier=productasset
media.folder.productasset.storage.strategy=windowsAzureBlobStorageStrategy
media.folder.productasset.public.base.url=https://<account-name>.blob.core.windows.net/${azure.hotfolder.storage.container.name}
media.folder.productasset.containerAddress=hybris
media.globalSettings.windowsAzureBlobStorageStrategy.local.cache=true
media.globalSettings.windowsAzureBlobStorageStrategy.containerAddress=hybris
media.folder.productasset.url.strategy=windowsAzureBlobURLStrategy,localMediaWebURLStrategy
media.default.secured=false
With this configuration, the following error comes
de.hybris.platform.media.exceptions.ExternalStorageServiceException: Azure specific configuration not found [key: connection was empty" "class": "de.hybris.platform.cloud.storage.service.impl.DefaultAzureStorageService",
"method": "getConnectionString",
"file": "DefaultAzureStorageService.java",
"line": 72,
"exact": false,
"location": "cloudstorageserver.jar",
"version": "?"
},
{
"class": "de.hybris.platform.cloud.storage.service.impl.DefaultAzureStorageService",
"method": "getCloudBlobClient",
"file": "DefaultAzureStorageService.java",
"line": 64,
"exact": false,
"location": "cloudstorageserver.jar",
"version": "?"
},
{
"class": "de.hybris.platform.cloud.storage.service.impl.DefaultAzureStorageService",
"method": "getContainerForMediaFolder",
"file": "DefaultAzureStorageService.java",
"line": 162,
"exact": false,
"location": "cloudstorageserver.jar",
"version": "?"
},...
When I change the strategy to cloudAzureBlobStorageStrategy instead of windowsAzureBlobStorageStrategy, the error changes to following -
java.lang.IllegalArgumentException: The argument must not be null. Argument name: blobName.[{"class":"com.microsoft.azure.storage.core.Utility","method":"assertNotNull","file":"Utility.java","line":368,"exact":false,"location":"azure-storage-8.1.0.jar","version":"?"},{"class":"com.microsoft.azure.storage.core.Utility","method":"assertNotNullOrEmpty","file":"Utility.java","line":383,"exact":false,"location":"azure-storage-8.1.0.jar","version":"?"},...
Detailed error log is attached for reference.error-with-cloudazureblobstoragestrategy.txterror-with-windowsazureblobstoragestrategy.txt
Request clarification before answering.
Hi Shaurya,
I had raised SAP incident for this issue and got to know from them that SAP Commerce doesn't support media conversion for images uploaded directly through hot folder. They asked us to upload images in a zip file using hotfolder which will make use of unzip channel. The images uploaded using unzip channel through hotfolder can be converted. And this worked for me.
Hope it will help you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi phoude,
There are two options to insert images and associate them to products in hotfolder.
1. We can insert the images (the individual image files) in hotfolder and then a csv which contains the name of the image files, product code etc. (will vary as per your hotfolder configuration). When SAP Commerce reads the csv, it will find the mentioned file names in the hotfolder and add them to corresponding product. This works fine but using this way I was not able to convert the inserted image to different formats using media conversion.
2. SAP support asked us to create a zip file containing all the images and the corresponding csv with product codes, file names etc like we did in first approach, but now in a zip file, so earlier we were uploading multiple image files and one csv, and now we have to upload one zip file containing multiple image files and one csv. Everything what we had in approach one goes into a zip. This is supposedly done because SAP Commerce uses a different channel for unzipping and that channel adds the image to product in a slightly different manner which doesn't cause media conversion issue.
I don't know whether this issue exists in new versions of SAP Commerce or not. I faced this issue in 2011.
Hope this helps.
romit.c
Inside the media file do you only include the 1200x1200 image? I have found this article where it mentions that you have to specify an image for each format inside the zip file (https://me.sap.com/notes/0003129587). Is it the same image (1200x1200) repeated in each sub folders? Otherwise, I don't see the point of the batch conversion if we specify a resized image for each format.
phoude
No I didn't include image for each format. I used images in just one format.
Media conversion can be done manually in backoffice, or through hotfolder. I used the hotfolder approach as I had lots of medias.
For media conversion, I used the following approach -
1. Created a different csv to create media containers. This csv had the media container code and the image which needs to be added to the media container.
2. In the hotfolder configuration we can write a script which can be executed before/after importing a line from csv (same as we can do in impex). In this script I wrote a line of code to initiate media conversion for the media container just created.
Hence once the media containers are imported, they automatically have the converted medias without any manual work.
Thanks Romit. I will try this out
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Did you find a solution for this ? I am getting similar error.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
12 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.