cancel
Showing results for 
Search instead for 
Did you mean: 

Product image conversion issue

Former Member
0 Kudos

We have a requirement that client uploads the new products through the hotfolder. As part of that, he will upload one image of the product and we need to convert it into different sizes to display in the storefront.

I am trying to do this using the MediaConversionJob. I have created the impex in below order.

 INSERT_UPDATE ConversionMediaFormat;qualifier[unique=true];inputFormat(qualifier);conversion
;SMALL;SMALL;-resize 30x30!

INSERT_UPDATE ConversionGroup;code[unique=true];supportedFormats(qualifier)
;productMediaConversionGroup;SMALL

INSERT_UPDATE MediaContainer;qualifier[unique=true];$catalogVersion;conversionGroup(code)
;productMediaContainer;;productMediaConversionGroup

INSERT_UPDATE Media;code[unique=true];mediaContainer(qualifier,$catalogVersion);$catalogVersion; mime;realfilename;mediaFormat(qualifier);@media[translator=de.hybris.platform.impex.jalo.media.MediaDataTranslator][forceWrite=true];
;testImage;productMediaContainer;;image/jpeg;testImage.jpg;Default-WorkingFormat;$siteResource/images/testImage.jpg;

INSERT_UPDATE MediaConversionCronJob;code[unique=true];$catalogVersion;job(code);includedFormats(qualifier);sessionLanguage(isoCode[default=$lang])
;productMediaConversionCronJob;;mediaConversionJob;SMALL;

When I run the ProductMediaConversionCronJob I am getting the below issue.

WARN  [MediaConversionJob-#0] [DefaultLockRowInTransactionStrategy] Row locking not supported in HSQLDB.
Exception in thread "MediaConversionJob-#0" java.lang.StackOverflowError
        at java.lang.StringBuilder.append(StringBuilder.java:136)
        at org.apache.logging.log4j.core.pattern.LevelPatternConverter.format(LevelPatternConverter.java:124)
        at org.apache.logging.log4j.core.pattern.PatternFormatter.format(PatternFormatter.java:36)
        at org.apache.logging.log4j.core.layout.PatternLayout$PatternSerializer.toSerializable(PatternLayout.java:289)....
.... at de.hybris.platform.tx.Transaction.execute(Transaction.java:1188)
 at de.hybris.platform.tx.Transaction.execute(Transaction.java:1153)
 at de.hybris.platform.mediaconversion.conversion.DefaultMediaConversionService.convertInTransaction(DefaultMediaConversionService.java:380)
 at de.hybris.platform.mediaconversion.conversion.DefaultMediaConversionService.getOrConvert(DefaultMediaConversionService.java:323)
 at de.hybris.platform.mediaconversion.conversion.DefaultMediaConversionService.doConvert(DefaultMediaConversionService.java:440)
 at de.hybris.platform.mediaconversion.conversion.DefaultMediaConversionService$2.execute(DefaultMediaConversionService.java:398)
 at de.hybris.platform.tx.Transaction.execute(Transaction.java:1188)

Is my approach is correct? Can anybody tell me how to resolve this issue. Thanks.

Former Member
0 Kudos

Is there an update on this?

Anybody got a suggestion how to fix this. Just tried it on [y] 6.2.1 and getting the same error -- [DefaultLockRowInTransactionStrategy] Row locking not supported in HSQLDB

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

"Row locking not supported in HSQLDB" is just a warning message and can be ignored. It won't stop the media conversion process.

Former Member
0 Kudos

Hi ,

Here are the steps you need to follow to get your Media conversion Job to Work.

1.Create an impex file with the below content and do an impex import

INSERT_UPDATE ConversionMediaFormat;qualifier[unique=true] ;conversionStrategy;conversion ;30Wx30H;imageMagickMediaConversionStrategy;-resize 30x30!>

On doing an impex import of the above, You can find a conversion media format of the name "30Wx30H" in multimedia under the "media format" section.

2.Go to HMC and then Under System->Cronjob Right Click on Cronjob and select as follows Create ->Media Conversion. GIve any name for your job in the "code:" attribute. In job definition select "mediaconversion job " from the drop down. Select the catalog version in which the products are present to which the media conversion needs to be done (example :if there is a product in default catalog :Staged to which the image is uploaded by the customer than you can select Default catalog;staged from the dropdown) next add media formats , search for "30Wx30H" and add it . on the top left click "Create " and then Click "Save" and then click "Start Cronjob now". * On Running the cron job you will be able to find the converted media in the multimedia section(Gallery Images->Media Container) of your Product.

Hope This Helps.

Former Member
0 Kudos

HI, how it's work in backoffice

0 Kudos

Hi Sainadh, Did you find any solution for this issue, we also have similar requirement.

Regards, Nishit