Error converting document: task did not complete within timeout解决方法
来源:互联网 发布:weka 删除数据 编辑:程序博客网 时间:2024/04/30 02:00
在openKM中使用到Openoffcie+Jodconvert实现WORD或Excel文件转换成PDF格式的功能,但是最近上传上一些大小为3M左右的Excel文件后,预览时总是 出现如下错误:
Caused by: com.openkm.core.ConversionException: Error converting document: task did not complete within timeout
at com.openkm.util.DocConverter.convert(DocConverter.java:279)
at com.openkm.util.DocConverter.doc2pdf(DocConverter.java:327)
... 46 more
从字面上可以理解是在转换过程中超时了,解决办法是在启动OpenOffice服务是初始化下askExecutionTimeout参数的值,通过了解一般设置如下值:
DefaultOfficeManagerConfiguration configuration = new DefaultOfficeManagerConfiguration();
configuration.setOfficeHome(OFFICE_HOME);// 设置OpenOffice.org安装目录
// 设置转换端口,默认为8100
configuration.setPortNumbers(port);
// 设置任务执行超时为5分钟,这里就是导致转换超时的配置
configuration.setTaskExecutionTimeout(1000 * 60 * 5L);
// 设置任务队列超时为24小时
configuration.setTaskQueueTimeout(1000 * 60 * 60 * 24L);
officeManager = configuration.buildOfficeManager();
officeManager.start(); // 启动服务
通过如上设置问题解决。
- Error converting document: task did not complete within timeout解决方法
- openoffice org.artofsolving.jodconverter.office.OfficeException: task did not complete within time
- Event ID 10010 - The server did not register with DCOM within the required timeout
- Did not receive a response to the deployment operation within the allowed timeout period [60 seconds
- JBAS015052: Did not receive a response to the deployment operation within the allowed timeout period
- Did not receive a response to the deployment operation within the allowed timeout period [60 seconds
- JLink Error: JTAG Timeout during adaptive clocking: RTCK did not respond.
- Error: The `brew link` step did not complete successfully 错误的
- Error: No ManagedConnections available within configured blocking timeout
- Timeout waiting for Tomcat v6.0 Server did not start
- freeipa执行命令出现出现(ipa: ERROR: did not receive Kerberos credentials)的解决方法
- The `brew link` step did not complete successfully
- Zend Server提示Error: Could not locate a free PHP process from the "application/x-httpd-php" pool within the 'Connection Timeout'.
- Error: source did not contain any PSON!
- Error: Module did not self-register.
- git did not exit cleanly 解决方法
- CHECK_NRPE: Error - Could not complete SSL handshake.
- CHECK_NRPE: Error - Could not complete SSL handshake.
- POJ 1873 凸包+枚举
- 118A String Task
- ubuntu9.10没有/etc/grub.conf文件
- Android ViewPager实现引导页
- 50A Domino piling
- Error converting document: task did not complete within timeout解决方法
- 【代码积累】JAVA读某文件夹下所有txt类型文件
- 非对称密码的编程使用
- Ubuntu的启动配置文件grub.cfg(menu.lst)设置指南-zz
- Android中使用一个textview实现不同颜色以及内容分割的显示
- iftables 官方文档
- C语言小知识点的笔记
- 动态链接库与静态链接库
- 一款转动随机数抽奖的JS特效代码