java 调用linux openoffice,java 调用linux openoffice

在Java后台尝试使用OpenOffice将文件转换为PDF时遇到问题,启动过程报错,显示进程无法启动并连接。错误信息指出OpenOffice进程以exit code 127结束。系统环境为CentOS 6.3 x86_64。代码中使用了DefaultOfficeManagerConfiguration来配置和启动OpenOffice服务,然后尝试进行文件转换。问题在于无法成功启动和连接到OpenOffice服务。
摘要由CSDN通过智能技术生成

如题,Java后台调用OpenOffice将文件转换为PDF,在调用时报错,异常信息如下:

Mar 20, 2014 1:16:13 AM org.artofsolving.jodconverter.office.ProcessPoolOfficeManager

INFO: ProcessManager implementation is LinuxProcessManager

Mar 20, 2014 1:16:13 AM org.artofsolving.jodconverter.office.OfficeProcess start

INFO: starting process with acceptString 'socket,host=127.0.0.1,port=2002,tcpNoDelay=1' and profileDir '/home/Cloud/Cloud/apache-tomcat-6.0.37/temp/.jodconverter_socket_host-127.0.0.1_port-2002'

Mar 20, 2014 1:16:13 AM org.artofsolving.jodconverter.office.OfficeProcess start

INFO: started process; pid = 11178

org.artofsolving.jodconverter.office.OfficeException: failed to start and connect

at org.artofsolving.jodconverter.office.ManagedOfficeProcess.startAndWait(ManagedOfficeProcess.java:64)

at org.artofsolving.jodconverter.office.PooledOfficeManager.start(PooledOfficeManager.java:101)

at org.artofsolving.jodconverter.office.ProcessPoolOfficeManager.start(ProcessPoolOfficeManager.java:62)

at com.hp.cloud.commom.FileConvertUtils.openOffice2Pdf(FileConvertUtils.java:101)

at com.hp.cloud.action.ItemFileAction.fileConvertToPDF(ItemFileAction.java:697)

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 com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:452)

at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:291)

at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:254)

at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:176)

at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)

at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)

at com.opensymphony.xwork2.validator.Validati

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值