JODConverter converts files when the service is stopped?

1.3k views Asked by At

I'm working with JODConverter bundled with Alfresco Enterprise 4.1.4 (I believe the JODConverter version is 3.2). I'm using it through the Alfresco RenditionService.

I'm trying to recreate a timeout error by stopping JODConverter before sending a conversion request. I used several word documents of different sizes, with and without formatting or images. Sometimes when JODConverter is stopped, the timeout error (see below) is thrown. But, other times, even with the same document, the PDF generates perfectly. Is there some feature of either Alfresco or JODConverter that explains why this is happening?

Code:

String targetRenditionName = "pdfRendition";
String targetMimetype = MimetypeMap.MIMETYPE_PDF;
RenditionDefinition renditionDef = getRenditionDefinition(targetRenditionName, targetMimetype);
ChildAssociationRef renditionAssoc = registry.getRenditionService().render(nodeRef, renditionDef);

Stack Trace:

Caused by: org.artofsolving.jodconverter.office.OfficeException: task did not complete within timeout
    at org.artofsolving.jodconverter.office.PooledOfficeManager.execute(PooledOfficeManager.java:88)
    at org.artofsolving.jodconverter.office.ProcessPoolOfficeManager.execute(ProcessPoolOfficeManager.java:78)
    at org.artofsolving.jodconverter.OfficeDocumentConverter.convert(OfficeDocumentConverter.java:78)
    at org.artofsolving.jodconverter.OfficeDocumentConverter.convert(OfficeDocumentConverter.java:69)
    at org.alfresco.enterprise.repo.content.transform.JodContentTransformer.convert(JodContentTransformer.java:62)
    at org.alfresco.repo.content.transform.OOoContentTransformerHelper.transform(OOoContentTransformerHelper.java:364)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.alfresco.repo.management.subsystems.SubsystemProxyFactory$1.invoke(SubsystemProxyFactory.java:72)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
    at $Proxy17.transform(Unknown Source)
    at org.alfresco.repo.content.transform.ProxyContentTransformer.transformInternal(ProxyContentTransformer.java:77)
    at org.alfresco.repo.content.transform.AbstractContentTransformer2.transform(AbstractContentTransformer2.java:245)
    ... 93 more
Caused by: java.util.concurrent.TimeoutException
    at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:228)
    at java.util.concurrent.FutureTask.get(FutureTask.java:91)
    at org.artofsolving.jodconverter.office.PooledOfficeManager.execute(PooledOfficeManager.java:85)
0

There are 0 answers