gpt4 book ai didi

centos - CentOS 6 上的 Jodconverter - "failed to start and connect"

转载 作者:行者123 更新时间:2023-12-04 19:32:31 26 4
gpt4 key购买 nike

我正在尝试在 CentOS 6.2 服务器上设置 jodconverter-beta-4,但经过几天的尝试,我无法超越我目前所处的位置。我不是 *nix 的巫师,所以如果我犯了一些新手错误,请多多包涵。

我使用添加/删除软件为 OpenOffice.org 安装的组件是:

  • 核心品牌
  • 核心模块
  • 计算、绘图、印象、数学、作家
  • 电子表格、绘图、演示文稿、方程式、文字处理器库
  • 额外的图形过滤器
  • 欧诺

  • 我在/opt/中创建了一个符号链接(symbolic link)
    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)

    提前致谢!

    最佳答案

    我安装了 Java GCJ,它导致了同样的错误。即,确保您安装了正确版本的 JAVA(我假设您需要 OpenJDK 运行时环境)。

    找到你想要的包yum search java和/或 yum provides java .就我而言,它是 java-1.7.0-openjdk.x86_64 , 接着:

    yum install java-1.7.0-openjdk.x86_64

    不要忘记删除以前的版本( yum remove)

    关于centos - CentOS 6 上的 Jodconverter - "failed to start and connect",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11002221/

    26 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com