ConverterSettings Cache implementations throws exception

If I set any ICache implementations other than NullCache, I get an exception during the conversion process. I’ve tried other internal cache implementations (MemoryCache and FileCache) and get the same exception.

I’ve also tried to run the example from the Github repo (“UseCacheWhenProcessingDocuments”) and it has the same behavior. How to use custom cache implementation | Documentation

This is using groupdocs-conversion version 22.3 (latest).

Exception
om.groupdocs.conversion.exceptions.GroupDocsConversionException: Type Name = AutoResetEvent, FullName = com.groupdocs.conversion.internal.c.a.ms.System.Threading.AutoResetEvent is not marked as Serializable.

Code
// HTML to PDF conversion (same behavior for image to PDF)
// CustomCache extends MemoryCache with delegates only.
final LoadOptions loadOptions = getLoadOptions(file);
final ConvertOptions<?> convertOptions = getConvertOptions(extension);
final ConverterSettings settings = new ConverterSettings();
settings.setCache(new CustomCache());

final ByteArrayOutputStream output = new ByteArrayOutputStream();
final Converter converter = new Converter(file.getInputStream(), loadOptions, settings);

converter.convert(output, convertOptions);
return output.toByteArray();

@jofish89

This issue is reproduced at our end. Therefore, we’ve logged it in our internal issue tracking system with ID CONVERSIONJAVA-1676.
You’ll be notified in case of any update.

1 Like

The issues you have found earlier (filed as CONVERSIONJAVA-1676) have been fixed in this update. This message was posted using Bugs notification tool by atir.tahir

1 Like