我正在尝试在CentOS 6.2服务器上设置jodconverter-beta-4,但经过几天的尝试后,我无法超越我目前所处的位置。我不是* nix的巫师,所以如果我犯了一些新手错误,请耐心等待。
我使用添加/删除软件为OpenOffice.org安装的组件是:
我在/ opt /
中创建了一个符号链接ln -s /usr/lib64/openoffice.org3/ openoffice.org3
执行时:
java -jar jodconverter-core-3.0-beta-4.jar test.docx test.pdf
我得到以下内容:
Jun 12, 2012 10:56:40 a.m. org.artofsolving.jodconverter.office.ProcessPoolOfficeManager <init>
INFO: ProcessManager implementation is LinuxProcessManager
Exception in thread "main" 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 org.artofsolving.jodconverter.cli.Convert.main(Convert.java:112)
Caused by: java.util.concurrent.ExecutionException: java.lang.NoSuchMethodError: method java.util.regex.Pattern.quote with signature (Ljava.lang.String;)Ljava.lang.String; was not found.
at java.util.concurrent.FutureTask$Sync.innerGet(libgcj.so.10)
at java.util.concurrent.FutureTask.get(libgcj.so.10)
at org.artofsolving.jodconverter.office.ManagedOfficeProcess.startAndWait(ManagedOfficeProcess.java:62)
...3 more
Caused by: java.lang.NoSuchMethodError: method java.util.regex.Pattern.quote with signature (Ljava.lang.String;)Ljava.lang.String; was not found.
at org.artofsolving.jodconverter.process.LinuxProcessManager.findPid(LinuxProcessManager.java:51)
at org.artofsolving.jodconverter.office.OfficeProcess.start(OfficeProcess.java:65)
at org.artofsolving.jodconverter.office.OfficeProcess.start(OfficeProcess.java:60)
at org.artofsolving.jodconverter.office.ManagedOfficeProcess.doStartProcessAndConnect(ManagedOfficeProcess.java:119)
at org.artofsolving.jodconverter.office.ManagedOfficeProcess.access$000(ManagedOfficeProcess.java:31)
at org.artofsolving.jodconverter.office.ManagedOfficeProcess$1.run(ManagedOfficeProcess.java:58)
at java.util.concurrent.Executors$RunnableAdapter.call(libgcj.so.10)
at java.util.concurrent.FutureTask$Sync.innerRun(libgcj.so.10)
at java.util.concurrent.FutureTask.run(libgcj.so.10)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(libgcj.so.10)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(libgcj.so.10)
at java.lang.Thread.run(libgcj.so.10)
提前致谢!
答案 0 :(得分:0)
我安装了Java GCJ,导致同样的错误。即,确保安装了正确版本的JAVA(我假设您需要OpenJDK Runtime Environment)。
找到您想要的包yum search java
和/或yum provides java
。就我而言,它是java-1.7.0-openjdk.x86_64
,然后是:
yum install java-1.7.0-openjdk.x86_64
不要忘记删除以前的版本(yum remove
)