JODConverter在服务停止时转换文件?

时间:2013-12-27 21:59:27

标签: java alfresco openoffice.org jodconverter

我正在使用捆绑了Alfresco Enterprise 4.1.4的JODConverter(我相信JODConverter版本是3.2)。我通过Alfresco RenditionService使用它。

我正在尝试通过在发送转换请求之前停止JODConverter来重新创建超时错误。我使用了几个不同大小的word文档,包括和不包含格式或图像。有时当JODConverter停止时,会抛出超时错误(见下文)。但是,其他时候,即使使用相同的文档,PDF也能完美生成。是否有Alfresco或JODConverter的某些功能可以解释为什么会发生这种情况?

代码:

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

堆栈追踪:

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 个答案:

没有答案