Question

I'm trying configure docsplit on a debian machine. After installing all of the dependencies I tried running a simple conversion form the command line to make sure it was working. I keep getting the following error with jodconverter:

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 wit signature (Ljava.lang.String;)Ljava.lang.String; was not found.
   at java.util.concurrent.FutureTask$Sync.innerGet(libgcj.so.90)
   at java.util.concurrent.FutureTask.get(libgcj.so.90)
   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.lan.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.90)
   at java.util.concurrent.FutureTask$Sync.innerRun(libgcj.so.90)
   at java.util.concurrent.FutureTask.run(libgcj.so.90)
   at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(libgcj.so.90)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(libgcj.so.90)
   at java.lang.Thread.run(libgcj.so.90)

I've tried starting openoffice in headless mode with hte following

/usr/bin/soffice -headless -accept="socket,host=127.0.0.1,port=2002;urp"

EDIT:

I solved the above issue by removing my current OpenOffice installation and grabbing the most up to date packages from download.openoffice.org

I was sucessful in converting nd odt file to a pdf using the jodconverter jar that came with the docsplit gem, as follows:

java -jar /usr/lib/ruby/gems/1.8/gems/docsplit-0.6.3/vendor/jodconverter/jodconverter-core-3.0-beta-4.jar test.odt test.pdf

Unfortunately I'm still having an issue with docsplit. If I try to extract images from the odt file using docsplit at the command line as so:

docsplit images test.odt --format jpg

I get the following error from jodconverter:

Exception in thread "main" org.artofsolving.jodconverter.office.OfficeException: could not load document: test.odt
    at org.artofsolving.jodconverter.AbstractConversionTask.loadDocument(AbstractConversionTask.java:92)
    at org.artofsolving.jodconverter.AbstractConversionTask.execute(AbstractConversionTask.java:59)
    at org.artofsolving.jodconverter.office.PooledOfficeManager$2.run(PooledOfficeManager.java:80)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
Caused by: com.sun.star.lang.IllegalArgumentException: URL seems to be an unsupported one.
    at com.sun.star.lib.uno.environments.remote.Job.remoteUnoRequestRaisedException(Job.java:177)
    at com.sun.star.lib.uno.environments.remote.Job.execute(Job.java:143)
    at com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:335)
    at com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:304)
    at com.sun.star.lib.uno.environments.remote.JavaThreadPool.enter(JavaThreadPool.java:91)
    at com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.sendRequest(java_remote_bridge.java:639)
    at com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.request(ProxyFactory.java:151)
    at com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.invoke(ProxyFactory.java:133)
    at $Proxy4.loadComponentFromURL(Unknown Source)
    at org.artofsolving.jodconverter.AbstractConversionTask.loadDocument(AbstractConversionTask.java:90)
    ... 8 more

Any input would be appreciated.

-Thanks

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top