GWT + JODConverter

104 views
Skip to first unread message

rohit jain

unread,
Jul 14, 2010, 7:20:02 PM7/14/10
to JODConverter
Hello,
I want to make a simple universal document converter and after going
through the reviews for this amazing library I'll use this only.
Now I want to use GWT to make the UI of the application. and use
JODConverter at the server.
But after looking at lot of jodconverter related documentation i'm a
bit confused.
Can you give me some pointers how should I go about using JODConverter
at my server end?

rohit jain

unread,
Jul 15, 2010, 6:47:23 AM7/15/10
to JODConverter
To get started i installed open office made a doc test.odt and used
the command
java -jar jodconverter-core-3.0-beta-3.jar test.odt test.pdf

This gave me an error that my openoffice.org is not at c:/program
files.
So I tried installing office there but couldn't do that. It installs
in c:/program files(x86)
So I just copy pasted my openoffice folder to c:/program files and
then the command worked. Now when I try to run a simple java code fore
conversion.
This is what I get



Jul 15, 2010 4:02:59 PM
org.artofsolving.jodconverter.office.ProcessPoolOfficeManager <init>
INFO: ProcessManager implementation is WindowsProcessManager
Exception in thread "main"
org.artofsolving.jodconverter.office.OfficeException: failed to start
and connect
at
org.artofsolving.jodconverter.office.ManagedOfficeProcess.startAndWait(ManagedOfficeProcess.java:
61)
at
org.artofsolving.jodconverter.office.PooledOfficeManager.start(PooledOfficeManager.java:
102)
at
org.artofsolving.jodconverter.office.ProcessPoolOfficeManager.start(ProcessPoolOfficeManager.java:
59)
at ImDocConverter.docuConverter.action(docuConverter.java:15)
at ImDocConverter.fileConverter.main(fileConverter.java:41)
Caused by: java.util.concurrent.ExecutionException:
org.artofsolving.jodconverter.office.OfficeException: could not
establish connection
at java.util.concurrent.FutureTask$Sync.innerGet(Unknown Source)
at java.util.concurrent.FutureTask.get(Unknown Source)
at
org.artofsolving.jodconverter.office.ManagedOfficeProcess.startAndWait(ManagedOfficeProcess.java:
59)
... 4 more
Caused by: org.artofsolving.jodconverter.office.OfficeException: could
not establish connection
at
org.artofsolving.jodconverter.office.ManagedOfficeProcess.doStartProcessAndConnect(ManagedOfficeProcess.java:
123)
at org.artofsolving.jodconverter.office.ManagedOfficeProcess.access
$000(ManagedOfficeProcess.java:31)
at org.artofsolving.jodconverter.office.ManagedOfficeProcess
$1.run(ManagedOfficeProcess.java:55)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown
Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown
Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalStateException: a process with
acceptString 'socket,host=127.0.0.1,port=2002' is already running; pid
5488
at
org.artofsolving.jodconverter.office.OfficeProcess.start(OfficeProcess.java:
59)
at
org.artofsolving.jodconverter.office.ManagedOfficeProcess.doStartProcessAndConnect(ManagedOfficeProcess.java:
112)
... 8 more


Please help.

Mirko Nasato

unread,
Jul 15, 2010, 11:03:41 AM7/15/10
to JODConverter
Did you read the Getting Started page?

http://code.google.com/p/jodconverter/wiki/GettingStarted

The second Java example shows you how to set officeHome, without
having to copy OpenOffice.org to a different folder.

At the end it mentions where to find a sample webapp.

Make sure you kill any soffice.bin processes left around from previous
tests (e.g. using Task Manager) if you get that "process already
running" exception again.

Kind regards

Mirko
Reply all
Reply to author
Forward
0 new messages