org.artofsolving.jodconverter.office.OfficeException

Java, C++, C#, Delphi... - Using the UNO bridges
Post Reply
chaitanya
Posts: 1
Joined: Tue Oct 01, 2019 9:01 pm

org.artofsolving.jodconverter.office.OfficeException

Post by chaitanya »

Hi ,

We are using Libre office 4.2 and we are using jodconverter to convert documents in ( docx format to pdf format using java API ) . Previously it is working but recently we are getting below exceptions
and PDF generation is not successful even once

Exception Type 1:

Caused by: org.artofsolving.jodconverter.office.OfficeException: could not connect to external office process
at org.artofsolving.jodconverter.office.ExternalOfficeManager.connect(ExternalOfficeManager.java:88)
at org.artofsolving.jodconverter.office.ExternalOfficeManager.start(ExternalOfficeManager.java:62)

... 47 more
Caused by: java.net.ConnectException: connection failed: 'socket,host=edbc001vw,port=8100,tcpNoDelay=1'; java.net.ConnectException: Connection refused: connect
at org.artofsolving.jodconverter.office.OfficeConnection.connect(OfficeConnection.java:100)
at org.artofsolving.jodconverter.office.ExternalOfficeManager.connect(ExternalOfficeManager.java:86)
... 49 more

Exception Type 2:

Caused by: org.artofsolving.jodconverter.office.OfficeException: could not establish connection
at org.artofsolving.jodconverter.office.ManagedOfficeProcess.doStartProcessAndConnect(ManagedOfficeProcess.java:142)
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(Executors.java:522)
at java.util.concurrent.FutureTask.run(FutureTask.java:277)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1160)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.lang.Thread.run(Thread.java:811)
Caused by: org.artofsolving.jodconverter.office.OfficeException: office process died with exit code -1073741701
at org.artofsolving.jodconverter.office.ManagedOfficeProcess$6.attempt(ManagedOfficeProcess.java:136)
at org.artofsolving.jodconverter.office.Retryable.execute(Retryable.java:40)
at org.artofsolving.jodconverter.office.Retryable.execute(Retryable.java:30)
at org.artofsolving.jodconverter.office.ManagedOfficeProcess.doStartProcessAndConnect(ManagedOfficeProcess.java:120)
... 7 more

Please help me in resolving this. I tried changing to different port number but no luck.
Windows 10 ,
LibreOffice 4.2
jlibster
Posts: 1
Joined: Sun Feb 21, 2021 7:35 pm

Re: org.artofsolving.jodconverter.office.OfficeException

Post by jlibster »

Have you checked to make sure OpenOffice is running headless? (By default I don't believe it is listening on any port).
To run openoffice as a listening service in MS Windows (Linux it's way easier), see this article:

https://groups.google.com/g/openmeeting ... ONkb-1QBLk

Next ensure Windows is listening on the expected port (default is generally port 2002).
the command:

netstat -an should show you the ports being listened on

You may also need to check your firewall (disable any firewall services including the internal MS windows firewall first to make sure firewall are not block local services)

Hopefully, that will help. Feel free to respond if none of these work. I've had OpenOffice/LibreOffice running for a few years and it's worked well for me. Cheers.
OpenOffice 4.8.1 on CentOS 7
Post Reply