1

I'm trying to set up jodconverter-beta-4 on a CentOS 6.2 server but after days of trying I cannot get past the point at which I am currently at. I am not a wizard with *nix, so please bear with me if I made some novice mistakes.

The components I have installed for OpenOffice.org using Add/Remove software are:

  • Core brand
  • Core modules
  • Calc, Draw, Impress, Math, Writer
  • Spreadsheet, drawing, presentation, equation, word processor libraries
  • Extra graphic filters
  • UNO

I have created a symlink in /opt/

ln -s /usr/lib64/openoffice.org3/ openoffice.org3

When I execute:

java -jar jodconverter-core-3.0-beta-4.jar test.docx test.pdf

I get the following:

    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)

Thanks in advance!

Danny Beckett
  • 20,529
  • 24
  • 107
  • 134
Godwin
  • 9,739
  • 6
  • 40
  • 58
  • I have since solved this issue by forgoing my installation of openoffice and instead installing libreoffice which simply required the symlink after installation. If anyone wants to post a lengthy useful answer for this question I will give you an answer, otherwise, once answering it myself becomes an option I will. – Godwin Jun 12 '12 at 22:13
  • I stuck with the same exception from my java code.Could you please help me? – skmaran.nr.iras Oct 10 '12 at 10:38

1 Answers1

0

I had Java GCJ installed and it was causing the same error. i.e, Ensure you have the correct version of JAVA installed (I assume you want OpenJDK Runtime Environment).

Find the package you want yum search java and/or yum provides java. In my case it was java-1.7.0-openjdk.x86_64, and then:

yum install java-1.7.0-openjdk.x86_64

Don't forget to remove the previous version (yum remove)

Kurt
  • 7,102
  • 2
  • 19
  • 16